| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index a0d5f2defe1fa87b6f7f8ec9196a0182eacaa26e..44e9d23312d593d64b356ef300bad1de9e43d571 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -9487,6 +9487,7 @@ bool Library::LookupResolvedNamesCache(const String& name,
|
| // the name does not resolve to anything in this library scope.
|
| void Library::AddToResolvedNamesCache(const String& name,
|
| const Object& obj) const {
|
| + ASSERT(!Compiler::IsBackgroundCompilation());
|
| if (!FLAG_use_lib_cache) {
|
| return;
|
| }
|
| @@ -9545,6 +9546,7 @@ void Library::GrowDictionary(const Array& dict, intptr_t dict_size) const {
|
|
|
|
|
| void Library::AddObject(const Object& obj, const String& name) const {
|
| + ASSERT(!Compiler::IsBackgroundCompilation());
|
| ASSERT(obj.IsClass() ||
|
| obj.IsFunction() ||
|
| obj.IsField() ||
|
| @@ -9651,6 +9653,7 @@ RawObject* Library::LookupEntry(const String& name, intptr_t *index) const {
|
|
|
|
|
| void Library::ReplaceObject(const Object& obj, const String& name) const {
|
| + ASSERT(!Compiler::IsBackgroundCompilation());
|
| ASSERT(obj.IsClass() || obj.IsFunction() || obj.IsField());
|
| ASSERT(LookupLocalObject(name) != Object::null());
|
|
|
| @@ -9663,6 +9666,7 @@ void Library::ReplaceObject(const Object& obj, const String& name) const {
|
|
|
|
|
| bool Library::RemoveObject(const Object& obj, const String& name) const {
|
| + ASSERT(!Compiler::IsBackgroundCompilation());
|
| Object& entry = Object::Handle();
|
|
|
| intptr_t index;
|
| @@ -9708,6 +9712,7 @@ bool Library::RemoveObject(const Object& obj, const String& name) const {
|
|
|
|
|
| void Library::AddClass(const Class& cls) const {
|
| + ASSERT(!Compiler::IsBackgroundCompilation());
|
| const String& class_name = String::Handle(cls.Name());
|
| AddObject(cls, class_name);
|
| // Link class to this library.
|
| @@ -9715,6 +9720,7 @@ void Library::AddClass(const Class& cls) const {
|
| InvalidateResolvedName(class_name);
|
| }
|
|
|
| +
|
| static void AddScriptIfUnique(const GrowableObjectArray& scripts,
|
| const Script& candidate) {
|
| if (candidate.IsNull()) {
|
| @@ -9733,6 +9739,7 @@ static void AddScriptIfUnique(const GrowableObjectArray& scripts,
|
| scripts.Add(candidate);
|
| }
|
|
|
| +
|
| RawArray* Library::LoadedScripts() const {
|
| // We compute the list of loaded scripts lazily. The result is
|
| // cached in loaded_scripts_.
|
|
|