diff options
| author | 2018-04-11 16:58:49 +0000 | |
|---|---|---|
| committer | 2018-04-11 16:58:49 +0000 | |
| commit | 29d8d0b4c49c339bfc57d5b4ff74ee8a0657c640 (patch) | |
| tree | 302c35c77dba7ee6a0b7705d67a81570e9428f95 /runtime/compiler_callbacks.h | |
| parent | ba4f1a253e1eec424c79ae2ab99123b687856a21 (diff) | |
| parent | e1954f30cbf70ed4430b9ca7b85b5d52fdc42251 (diff) | |
Merge "Update hidden API membership of intrinsics" into pi-dev
Diffstat (limited to 'runtime/compiler_callbacks.h')
| -rw-r--r-- | runtime/compiler_callbacks.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/compiler_callbacks.h b/runtime/compiler_callbacks.h index 6855dcdb2b..279d5ab764 100644 --- a/runtime/compiler_callbacks.h +++ b/runtime/compiler_callbacks.h @@ -42,6 +42,7 @@ class CompilerCallbacks { public: enum class CallbackMode { // private kCompileBootImage, + kCompileCoreImage, kCompileApp }; @@ -67,8 +68,15 @@ class CompilerCallbacks { virtual void SetDoesClassUnloading(bool does_class_unloading ATTRIBUTE_UNUSED, CompilerDriver* compiler_driver ATTRIBUTE_UNUSED) {} + // Returns true if the compiler is compiling a boot image. + // Note that core image (a minimal boot image for testing) is also considered a boot image. bool IsBootImage() { - return mode_ == CallbackMode::kCompileBootImage; + return mode_ == CallbackMode::kCompileBootImage || mode_ == CallbackMode::kCompileCoreImage; + } + + // Returns true if the compiler is compiling a core image (a minimal boot image for testing). + bool IsCoreImage() { + return mode_ == CallbackMode::kCompileCoreImage; } virtual void UpdateClassState(ClassReference ref ATTRIBUTE_UNUSED, |