Permalink
Browse files

Move the interpreter into C++.

Change-Id: I4b7d6ed9c54dbf3244304a7ea0f13e6c37cca2aa
  • Loading branch information...
1 parent 58ddbad commit cd8f5e701547739f241594b43e9470c92d98e9cf Carl Shapiro committed Apr 20, 2011
Showing 552 changed files with 1,242 additions and 1,228 deletions.
View
@@ -147,7 +147,7 @@ LOCAL_SRC_FILES := \
jdwp/JdwpMain.cpp \
jdwp/JdwpSocket.cpp \
mterp/Mterp.cpp.arm \
- mterp/out/InterpC-portable.c.arm \
+ mterp/out/InterpC-portable.cpp.arm \
native/InternalNative.cpp \
native/dalvik_bytecode_OpcodeInfo.cpp \
native/dalvik_system_DexFile.cpp \
@@ -246,8 +246,8 @@ ifeq ($(dvm_arch),arm)
LOCAL_SRC_FILES += \
arch/arm/CallOldABI.S \
arch/arm/CallEABI.S \
- arch/arm/HintsEABI.c \
- mterp/out/InterpC-$(dvm_arch_variant).c.arm \
+ arch/arm/HintsEABI.cpp \
+ mterp/out/InterpC-$(dvm_arch_variant).cpp.arm \
mterp/out/InterpAsm-$(dvm_arch_variant).S
ifeq ($(WITH_JIT),true)
@@ -270,8 +270,8 @@ ifeq ($(dvm_arch),x86)
LOCAL_CFLAGS += -DDVM_JMP_TABLE_MTERP=1
LOCAL_SRC_FILES += \
arch/$(dvm_arch_variant)/Call386ABI.S \
- arch/$(dvm_arch_variant)/Hints386ABI.c \
- mterp/out/InterpC-$(dvm_arch_variant).c \
+ arch/$(dvm_arch_variant)/Hints386ABI.cpp \
+ mterp/out/InterpC-$(dvm_arch_variant).cpp \
mterp/out/InterpAsm-$(dvm_arch_variant).S
ifeq ($(WITH_JIT),true)
LOCAL_SRC_FILES += \
@@ -288,8 +288,8 @@ ifeq ($(dvm_arch),sh)
MTERP_ARCH_KNOWN := true
LOCAL_SRC_FILES += \
arch/sh/CallSH4ABI.S \
- arch/generic/Hints.c \
- mterp/out/InterpC-allstubs.c \
+ arch/generic/Hints.cpp \
+ mterp/out/InterpC-allstubs.cpp \
mterp/out/InterpAsm-allstubs.S
endif
@@ -305,9 +305,9 @@ ifeq ($(MTERP_ARCH_KNOWN),false)
endif
LOCAL_SRC_FILES += \
- arch/generic/Call.c \
- arch/generic/Hints.c \
- mterp/out/InterpC-allstubs.c
+ arch/generic/Call.cpp \
+ arch/generic/Hints.cpp \
+ mterp/out/InterpC-allstubs.cpp
# The following symbols are usually defined in the asm file, but
# since we don't have an asm file in this case, we instead just
View
@@ -22,7 +22,7 @@
#include "Dalvik.h"
#include "analysis/CodeVerify.h"
#include "analysis/RegisterMap.h"
-#include "mterp/c/header.c"
+#include "mterp/c/header.cpp"
#undef LOG_TAG
#include "jdwp/JdwpPriv.h"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -49,6 +49,12 @@ bool dvmCheckAsmConstants(void);
bool dvmMterpStdRun(Thread* self);
void dvmMterpStdBail(Thread* self, bool changeInterp);
+/*
+ * Helper for common_printMethod(), invoked from the assembly
+ * interpreter.
+ */
+void dvmMterpPrintMethod(Method* method);
+
#ifdef __cplusplus
}
#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1 +0,0 @@
-%include "c/OP_MOVE.c"
@@ -0,0 +1 @@
+%include "c/OP_MOVE.cpp"
@@ -1 +0,0 @@
-%include "c/OP_MOVE_16.c"
@@ -0,0 +1 @@
+%include "c/OP_MOVE_16.cpp"
@@ -1 +0,0 @@
-%include "c/OP_MOVE_FROM16.c"
@@ -0,0 +1 @@
+%include "c/OP_MOVE_FROM16.cpp"
File renamed without changes.
@@ -1 +0,0 @@
-%include "c/OP_MOVE_RESULT.c"
@@ -0,0 +1 @@
+%include "c/OP_MOVE_RESULT.cpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1 +0,0 @@
-%include "c/OP_RETURN.c"
@@ -0,0 +1 @@
+%include "c/OP_RETURN.cpp"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.

1 comment on commit cd8f5e7

@Julio-Guerra

Why did/do you need to change the language ? What is the benefit of this change ?

Please sign in to comment.