Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8239782: CC_INTERP is only used by Zero interpreter
Change CC_INTERP conditional to ZERO and remove in places where unnecessary. Fix build to exclude compilers and rename CppInterpreter to ZeroInterpreter. The "C++ Interpreter" has been removed from the code a while ago.

Reviewed-by: dholmes, ihse
  • Loading branch information
coleenp committed Jun 24, 2020
1 parent 6b25119 commit 1550fd889b467d9866ac00a3bc7ab1f879e7f20a
Show file tree
Hide file tree
Showing 55 changed files with 289 additions and 640 deletions.
@@ -106,14 +106,16 @@ $(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl, \
$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl, \
-PARAM majorversion $(VERSION_FEATURE)))

JVMTI_BC_SRCDIR := $(TOPDIR)/src/hotspot/share/interpreter

$(eval $(call SetupXslTransform, bytecodeInterpreterWithChecks.cpp, \
XML_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xml, \
XSL_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xsl, \
OUTPUT_DIR := $(JVMTI_OUTPUTDIR), \
DEPS := $(JVMTI_BC_SRCDIR)/bytecodeInterpreter.cpp, \
))
JVMTI_BC_SRCDIR := $(TOPDIR)/src/hotspot/share/interpreter/zero

ifeq ($(call check-jvm-feature, zero), true)
$(eval $(call SetupXslTransform, bytecodeInterpreterWithChecks.cpp, \
XML_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xml, \
XSL_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xsl, \
OUTPUT_DIR := $(JVMTI_OUTPUTDIR), \
DEPS := $(JVMTI_BC_SRCDIR)/bytecodeInterpreter.cpp, \
))
endif

################################################################################
# Copy jvmti.h to include dir
@@ -45,11 +45,17 @@ else
endif

ifeq ($(call check-jvm-feature, zero), true)
JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
JVM_EXCLUDES += opto libadt
JVM_EXCLUDE_PATTERNS += c1_ c1/ c2_ runtime_ /c2/
JVM_EXCLUDE_FILES += templateInterpreter.cpp templateInterpreterGenerator.cpp \
bcEscapeAnalyzer.cpp ciTypeFlow.cpp
JVM_CFLAGS_FEATURES += -DZERO -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
JVM_LDFLAGS_FEATURES += $(call SET_EXECUTABLE_ORIGIN,/..)
endif
else
JVM_EXCLUDE_PATTERNS += /zero/
endif

ifeq ($(JVM_VARIANT), custom)
@@ -26,10 +26,6 @@
#ifndef CPU_PPC_GLOBALDEFINITIONS_PPC_HPP
#define CPU_PPC_GLOBALDEFINITIONS_PPC_HPP

#ifdef CC_INTERP
#error "CC_INTERP is no longer supported. Removed in change 8145117."
#endif

#ifndef FILE_AND_LINE
#define FILE_AND_LINE __FILE__ ":" XSTR(__LINE__)
#endif
@@ -26,10 +26,6 @@
#ifndef CPU_S390_GLOBALDEFINITIONS_S390_HPP
#define CPU_S390_GLOBALDEFINITIONS_S390_HPP

#ifdef CC_INTERP
#error "CC_INTERP is not supported on z/Architecture."
#endif

// Convenience macro that produces a string literal with the filename
// and linenumber of the location where the macro was used.
#ifndef FILE_AND_LINE
@@ -88,8 +88,8 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
//
// On entry:
// Z_ARG1 - intptr_t* Address of java argument list in memory.
// Z_state - cppInterpreter* Address of interpreter state for
// this method
// Z_state - zeroInterpreter* Address of interpreter state for
// this method
// Z_method
//
// On exit (just before return instruction):
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -24,8 +24,8 @@
*/

#include "precompiled.hpp"
#include "interpreter/bytecodeInterpreter.hpp"
#include "interpreter/cppInterpreter.hpp"
#include "interpreter/zero/bytecodeInterpreter.hpp"
#include "interpreter/zero/zeroInterpreter.hpp"
#include "runtime/frame.inline.hpp"
#include "utilities/globalDefinitions.hpp"

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright 2008 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -25,10 +25,9 @@

#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "interpreter/bytecodeInterpreter.hpp"
#include "interpreter/bytecodeInterpreter.inline.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterRuntime.hpp"
#include "interpreter/zero/bytecodeInterpreter.inline.hpp"
#include "oops/methodData.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline.hpp"
@@ -40,8 +39,6 @@
#include "runtime/vframeArray.hpp"
#include "utilities/debug.hpp"

#ifdef CC_INTERP

const char *BytecodeInterpreter::name_of_field_at_address(address addr) {
#define DO(member) {if (addr == (address) &(member)) return XSTR(member);}
DO(_thread);
@@ -102,5 +99,3 @@ void BytecodeInterpreter::layout_interpreterState(interpreterState istate,
istate->set_stack(stack);
istate->set_stack_limit(stack_base - method->max_stack() - 1);
}

#endif // CC_INTERP

This file was deleted.

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -26,7 +26,7 @@
#ifndef CPU_ZERO_ENTRY_ZERO_HPP
#define CPU_ZERO_ENTRY_ZERO_HPP

#include "interpreter/cppInterpreter.hpp"
#include "interpreter/zero/zeroInterpreter.hpp"

class ZeroEntry {
public:
@@ -69,7 +69,7 @@ class ZeroEntry {
private:
static void maybe_deoptimize(int deoptimized_frames, TRAPS) {
if (deoptimized_frames)
CppInterpreter::main_loop(deoptimized_frames - 1, THREAD);
ZeroInterpreter::main_loop(deoptimized_frames - 1, THREAD);
}

public:
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -24,26 +24,16 @@
*/

#include "precompiled.hpp"
#include "code/scopeDesc.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterRuntime.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/markWord.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/monitorChunk.hpp"
#include "runtime/signature.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include "vmreg_zero.inline.hpp"
#ifdef COMPILER1
#include "c1/c1_Runtime1.hpp"
#include "runtime/vframeArray.hpp"
#endif

#ifdef ASSERT
void RegisterMap::check_location_valid() {
@@ -87,15 +77,13 @@ frame frame::sender(RegisterMap* map) const {
return sender_for_nonentry_frame(map);
}

#ifdef CC_INTERP
BasicObjectLock* frame::interpreter_frame_monitor_begin() const {
return get_interpreterState()->monitor_base();
}

BasicObjectLock* frame::interpreter_frame_monitor_end() const {
return (BasicObjectLock*) get_interpreterState()->stack_base();
}
#endif // CC_INTERP

void frame::patch_pc(Thread* thread, address pc) {
if (pc != NULL) {
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -26,8 +26,6 @@
#ifndef CPU_ZERO_FRAME_ZERO_HPP
#define CPU_ZERO_FRAME_ZERO_HPP

#include "runtime/synchronizer.hpp"

// A frame represents a physical stack frame on the Zero stack.

public:
@@ -51,9 +49,7 @@
return (intptr_t *) zeroframe();
}

#ifdef CC_INTERP
inline interpreterState get_interpreterState() const;
#endif // CC_INTERP

public:
const EntryFrame *zero_entryframe() const {
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -82,7 +82,6 @@ inline intptr_t* frame::link() const {
return NULL;
}

#ifdef CC_INTERP
inline interpreterState frame::get_interpreterState() const {
return zero_interpreterframe()->interpreter_state();
}
@@ -119,7 +118,6 @@ inline oop* frame::interpreter_frame_temp_oop_addr() const {
interpreterState istate = get_interpreterState();
return (oop *)&istate->_oop_temp;
}
#endif // CC_INTERP

inline int frame::interpreter_frame_monitor_size() {
return BasicObjectLock::size();
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright 2008, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -26,13 +26,12 @@
#ifndef CPU_ZERO_INTERPRETERFRAME_ZERO_HPP
#define CPU_ZERO_INTERPRETERFRAME_ZERO_HPP

#include "interpreter/bytecodeInterpreter.hpp"
#include "interpreter/zero/bytecodeInterpreter.hpp"
#include "oops/method.hpp"
#include "runtime/thread.hpp"
#include "stack_zero.hpp"
#include "utilities/align.hpp"

#ifdef CC_INTERP
// | ... |
// +--------------------+ ------------------
// | stack slot n-1 | low addresses
@@ -79,6 +78,5 @@ class InterpreterFrame : public ZeroFrame {
char* valuebuf,
int buflen) const;
};
#endif // CC_INTERP

#endif // CPU_ZERO_INTERPRETERFRAME_ZERO_HPP

0 comments on commit 1550fd8

Please sign in to comment.