summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/art.go3
-rw-r--r--runtime/interpreter/interpreter.cc4
-rw-r--r--test/testrunner/target_config.py6
3 files changed, 13 insertions, 0 deletions
diff --git a/build/art.go b/build/art.go
index 0b5ee4435c..1c8be0f056 100644
--- a/build/art.go
+++ b/build/art.go
@@ -53,6 +53,9 @@ func globalFlags(ctx android.BaseContext) ([]string, []string) {
cflags = append(cflags, "-DART_HEAP_POISONING=1")
asflags = append(asflags, "-DART_HEAP_POISONING=1")
}
+ if envTrue(ctx, "ART_USE_CXX_INTERPRETER") {
+ cflags = append(cflags, "-DART_USE_CXX_INTERPRETER=1")
+ }
if !envFalse(ctx, "ART_USE_READ_BARRIER") && ctx.AConfig().ArtUseReadBarrier() {
// Used to change the read barrier type. Valid values are BAKER, BROOKS,
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc
index 5784b9b898..d004d642d0 100644
--- a/runtime/interpreter/interpreter.cc
+++ b/runtime/interpreter/interpreter.cc
@@ -237,7 +237,11 @@ enum InterpreterImplKind {
kMterpImplKind // Assembly interpreter
};
+#if ART_USE_CXX_INTERPRETER
+static constexpr InterpreterImplKind kInterpreterImplKind = kSwitchImplKind;
+#else
static constexpr InterpreterImplKind kInterpreterImplKind = kMterpImplKind;
+#endif
static inline JValue Execute(
Thread* self,
diff --git a/test/testrunner/target_config.py b/test/testrunner/target_config.py
index 978e9cb313..9efe435dc2 100644
--- a/test/testrunner/target_config.py
+++ b/test/testrunner/target_config.py
@@ -40,6 +40,12 @@ target_config = {
'art-interpreter' : {
'run-test' : ['--interpreter']
},
+ 'art-interpreter-cxx' : {
+ 'run-test' : ['--interpreter'],
+ 'env' : {
+ 'ART_USE_CXX_INTERPRETER' : 'true'
+ }
+ },
'art-interpreter-access-checks' : {
'run-test' : ['--interp-ac']
},