Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: runtime/vm/object.cc

Issue 1541133003: Incremental changes from background compilation work (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Adjust comments Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 9573 matching lines...) Expand 10 before | Expand all | Expand 10 after
9584 9584
9585 9585
9586 // Returns true if the name is found in the cache, false no cache hit. 9586 // Returns true if the name is found in the cache, false no cache hit.
9587 // obj is set to the cached entry. It may be null, indicating that the 9587 // obj is set to the cached entry. It may be null, indicating that the
9588 // name does not resolve to anything in this library. 9588 // name does not resolve to anything in this library.
9589 bool Library::LookupResolvedNamesCache(const String& name, 9589 bool Library::LookupResolvedNamesCache(const String& name,
9590 Object* obj) const { 9590 Object* obj) const {
9591 ResolvedNamesMap cache(resolved_names()); 9591 ResolvedNamesMap cache(resolved_names());
9592 bool present = false; 9592 bool present = false;
9593 *obj = cache.GetOrNull(name, &present); 9593 *obj = cache.GetOrNull(name, &present);
9594 ASSERT(cache.Release().raw() == resolved_names()); 9594 // Mutator compiler thread may add entries and therefore
9595 // change 'resolved_names()' while running a background compilation;
9596 // do not ASSERT that 'resolved_names()' has not changed.
siva 2015/12/22 19:43:46 The background compiler will only add entries and
srdjan 2015/12/22 20:23:10 I agreed with you originally, but realized that th
9597 cache.Release();
9595 return present; 9598 return present;
9596 } 9599 }
9597 9600
9598 9601
9599 // Add a name to the resolved name cache. This name resolves to the 9602 // Add a name to the resolved name cache. This name resolves to the
9600 // given object in this library scope. obj may be null, which means 9603 // given object in this library scope. obj may be null, which means
9601 // the name does not resolve to anything in this library scope. 9604 // the name does not resolve to anything in this library scope.
9602 void Library::AddToResolvedNamesCache(const String& name, 9605 void Library::AddToResolvedNamesCache(const String& name,
9603 const Object& obj) const { 9606 const Object& obj) const {
9604 if (!FLAG_use_lib_cache) { 9607 if (!FLAG_use_lib_cache) {
(...skipping 12388 matching lines...) Expand 10 before | Expand all | Expand 10 after
21993 return tag_label.ToCString(); 21996 return tag_label.ToCString();
21994 } 21997 }
21995 21998
21996 21999
21997 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 22000 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21998 Instance::PrintJSONImpl(stream, ref); 22001 Instance::PrintJSONImpl(stream, ref);
21999 } 22002 }
22000 22003
22001 22004
22002 } // namespace dart 22005 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698