Chromium Code Reviews| Index: runtime/vm/object.cc |
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
| index 6f88bbdc2685b86f60028bdb277ef74386ec688e..aa01d4be194d45dc82619ca9c6e5e6e382c33e17 100644 |
| --- a/runtime/vm/object.cc |
| +++ b/runtime/vm/object.cc |
| @@ -66,13 +66,15 @@ DEFINE_FLAG(bool, use_field_guards, true, "Guard field cids."); |
| DEFINE_FLAG(bool, use_lib_cache, true, "Use library name cache"); |
| DEFINE_FLAG(bool, trace_field_guards, false, "Trace changes in field's cids."); |
| +DECLARE_FLAG(charp, coverage_dir); |
| +DECLARE_FLAG(bool, load_deferred_eagerly); |
| +DECLARE_FLAG(bool, show_invisible_frames); |
| DECLARE_FLAG(bool, trace_compiler); |
| DECLARE_FLAG(bool, trace_deoptimization); |
| DECLARE_FLAG(bool, trace_deoptimization_verbose); |
| -DECLARE_FLAG(bool, show_invisible_frames); |
| -DECLARE_FLAG(charp, coverage_dir); |
| DECLARE_FLAG(bool, write_protect_code); |
| + |
| static const char* kGetterPrefix = "get:"; |
| static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix); |
| static const char* kSetterPrefix = "set:"; |
| @@ -10219,7 +10221,7 @@ void LibraryPrefix::AddImport(const Namespace& import) const { |
| RawObject* LibraryPrefix::LookupObject(const String& name) const { |
| - if (!is_loaded()) { |
| + if (!is_loaded() && !FLAG_load_deferred_eagerly) { |
| return Object::null(); |
| } |
| Array& imports = Array::Handle(this->imports()); |
| @@ -10366,9 +10368,13 @@ void LibraryPrefix::RegisterDependentCode(const Code& code) const { |
| void LibraryPrefix::InvalidateDependentCode() const { |
| - PrefixDependentArray a(*this); |
| - a.DisableCode(); |
| - set_is_loaded(); |
| + // When eagerely loading classes we emit runtime checks for loadef state of |
|
hausner
2015/07/08 18:19:57
loadef -> loaded.
I would change the compiler so
srdjan
2015/07/09 16:41:43
No deferred prefixes are allowed when eager deferr
|
| + // prefixes, therefore no recompilation is necessary/allowed. |
| + if (!FLAG_load_deferred_eagerly) { |
| + PrefixDependentArray a(*this); |
| + a.DisableCode(); |
| + set_is_loaded(); |
| + } |
| } |