| Index: runtime/vm/isolate.h
|
| diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
|
| index 316c26a488a9ca4e285ef916ed10bbac92b8a276..aa884de0d1d62ca3b8efe84502ec736ffd969468 100644
|
| --- a/runtime/vm/isolate.h
|
| +++ b/runtime/vm/isolate.h
|
| @@ -140,7 +140,8 @@ typedef FixedCache<intptr_t, CatchEntryState, 16> CatchEntryStateCache;
|
| V(error_on_bad_override, ErrorOnBadOverride, enable_error_on_bad_override, \
|
| FLAG_error_on_bad_override) \
|
| V(use_field_guards, UseFieldGuards, use_field_guards, FLAG_use_field_guards) \
|
| - V(use_osr, UseOsr, use_osr, FLAG_use_osr)
|
| + V(use_osr, UseOsr, use_osr, FLAG_use_osr) \
|
| + V(obfuscate, Obfuscate, obfuscate, false_by_default)
|
|
|
| class Isolate : public BaseIsolate {
|
| public:
|
| @@ -295,9 +296,9 @@ class Isolate : public BaseIsolate {
|
| MessageHandler* message_handler() const { return message_handler_; }
|
| void set_message_handler(MessageHandler* value) { message_handler_ = value; }
|
|
|
| - bool is_runnable() const { return RunnableBit::decode(isolate_flags_); }
|
| + bool is_runnable() const { return IsRunnableBit::decode(isolate_flags_); }
|
| void set_is_runnable(bool value) {
|
| - isolate_flags_ = RunnableBit::update(value, isolate_flags_);
|
| + isolate_flags_ = IsRunnableBit::update(value, isolate_flags_);
|
| #if !defined(PRODUCT)
|
| if (is_runnable()) {
|
| set_last_resume_timestamp();
|
| @@ -685,10 +686,14 @@ class Isolate : public BaseIsolate {
|
| RawFunction* ClosureFunctionFromIndex(intptr_t idx) const;
|
|
|
| bool is_service_isolate() const {
|
| - return ServiceIsolateBit::decode(isolate_flags_);
|
| + return IsServiceIsolateBit::decode(isolate_flags_);
|
| }
|
| void set_is_service_isolate(bool value) {
|
| - isolate_flags_ = ServiceIsolateBit::update(value, isolate_flags_);
|
| + isolate_flags_ = IsServiceIsolateBit::update(value, isolate_flags_);
|
| + }
|
| +
|
| + Dart_QualifiedFunctionName* embedder_entry_points() const {
|
| + return embedder_entry_points_;
|
| }
|
|
|
| // Isolate-specific flag handling.
|
| @@ -805,55 +810,37 @@ class Isolate : public BaseIsolate {
|
| ClassTable class_table_;
|
| bool single_step_;
|
|
|
| +#define ISOLATE_FLAG_BITS(V) \
|
| + V(ErrorsFatal) \
|
| + V(IsRunnable) \
|
| + V(IsServiceIsolate) \
|
| + V(CompilationAllowed) \
|
| + V(AllClassesFinalized) \
|
| + V(RemappingCids) \
|
| + V(ResumeRequest) \
|
| + V(HasAttemptedReload) \
|
| + V(ShouldPausePostServiceRequest) \
|
| + V(UseDartFrontEnd) \
|
| + V(EnableTypeChecks) \
|
| + V(EnableAsserts) \
|
| + V(ErrorOnBadType) \
|
| + V(ErrorOnBadOverride) \
|
| + V(UseFieldGuards) \
|
| + V(UseOsr) \
|
| + V(Obfuscate)
|
| +
|
| // Isolate specific flags.
|
| enum FlagBits {
|
| - kErrorsFatalBit = 0,
|
| - kIsRunnableBit = 1,
|
| - kIsServiceIsolateBit = 2,
|
| - kCompilationAllowedBit = 3,
|
| - kAllClassesFinalizedBit = 4,
|
| - kRemappingCidsBit = 5,
|
| - kResumeRequestBit = 6,
|
| - kHasAttemptedReloadBit = 7,
|
| - kShouldPausePostServiceRequestBit = 8,
|
| - kUseDartFrontEndBit = 9,
|
| - kEnableTypeChecksBit = 10,
|
| - kEnableAssertsBit = 11,
|
| - kErrorOnBadTypeBit = 12,
|
| - kErrorOnBadOverrideBit = 13,
|
| - kUseFieldGuardsBit = 14,
|
| - kUseOsrBit = 15,
|
| +#define DECLARE_BIT(Name) k##Name##Bit,
|
| + ISOLATE_FLAG_BITS(DECLARE_BIT)
|
| +#undef DECLARE_BIT
|
| };
|
| - class ErrorsFatalBit : public BitField<uint32_t, bool, kErrorsFatalBit, 1> {};
|
| - class RunnableBit : public BitField<uint32_t, bool, kIsRunnableBit, 1> {};
|
| - class ServiceIsolateBit
|
| - : public BitField<uint32_t, bool, kIsServiceIsolateBit, 1> {};
|
| - class CompilationAllowedBit
|
| - : public BitField<uint32_t, bool, kCompilationAllowedBit, 1> {};
|
| - class AllClassesFinalizedBit
|
| - : public BitField<uint32_t, bool, kAllClassesFinalizedBit, 1> {};
|
| - class RemappingCidsBit
|
| - : public BitField<uint32_t, bool, kRemappingCidsBit, 1> {};
|
| - class ResumeRequestBit
|
| - : public BitField<uint32_t, bool, kResumeRequestBit, 1> {};
|
| - class HasAttemptedReloadBit
|
| - : public BitField<uint32_t, bool, kHasAttemptedReloadBit, 1> {};
|
| - class ShouldPausePostServiceRequestBit
|
| - : public BitField<uint32_t, bool, kShouldPausePostServiceRequestBit, 1> {
|
| - };
|
| - class UseDartFrontEndBit
|
| - : public BitField<uint32_t, bool, kUseDartFrontEndBit, 1> {};
|
| - class EnableTypeChecksBit
|
| - : public BitField<uint32_t, bool, kEnableTypeChecksBit, 1> {};
|
| - class EnableAssertsBit
|
| - : public BitField<uint32_t, bool, kEnableAssertsBit, 1> {};
|
| - class ErrorOnBadTypeBit
|
| - : public BitField<uint32_t, bool, kErrorOnBadTypeBit, 1> {};
|
| - class ErrorOnBadOverrideBit
|
| - : public BitField<uint32_t, bool, kErrorOnBadOverrideBit, 1> {};
|
| - class UseFieldGuardsBit
|
| - : public BitField<uint32_t, bool, kUseFieldGuardsBit, 1> {};
|
| - class UseOsrBit : public BitField<uint32_t, bool, kUseOsrBit, 1> {};
|
| +
|
| +#define DECLARE_BITFIELD(Name) \
|
| + class Name##Bit : public BitField<uint32_t, bool, k##Name##Bit, 1> {};
|
| + ISOLATE_FLAG_BITS(DECLARE_BITFIELD)
|
| +#undef DECLARE_BITFIELD
|
| +
|
| uint32_t isolate_flags_;
|
|
|
| // Background compilation.
|
| @@ -968,6 +955,7 @@ class Isolate : public BaseIsolate {
|
|
|
| HandlerInfoCache handler_info_cache_;
|
| CatchEntryStateCache catch_entry_state_cache_;
|
| + Dart_QualifiedFunctionName* embedder_entry_points_;
|
|
|
| static Dart_IsolateCreateCallback create_callback_;
|
| static Dart_IsolateShutdownCallback shutdown_callback_;
|
|
|