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

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

Issue 1473403003: Move ApiLocalScope out of class ApiState into class Thread so that the API local handles and zone e… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-code-review Created 5 years 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 10673 matching lines...) Expand 10 before | Expand all | Expand 10 after
10684 Api::Scope api_scope(thread); 10684 Api::Scope api_scope(thread);
10685 Zone* zone = thread->zone(); 10685 Zone* zone = thread->zone();
10686 deferred_lib.SetLoadRequested(); 10686 deferred_lib.SetLoadRequested();
10687 const GrowableObjectArray& pending_deferred_loads = 10687 const GrowableObjectArray& pending_deferred_loads =
10688 GrowableObjectArray::Handle( 10688 GrowableObjectArray::Handle(
10689 isolate->object_store()->pending_deferred_loads()); 10689 isolate->object_store()->pending_deferred_loads());
10690 pending_deferred_loads.Add(deferred_lib); 10690 pending_deferred_loads.Add(deferred_lib);
10691 const String& lib_url = String::Handle(zone, deferred_lib.url()); 10691 const String& lib_url = String::Handle(zone, deferred_lib.url());
10692 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); 10692 Dart_LibraryTagHandler handler = isolate->library_tag_handler();
10693 handler(Dart_kImportTag, 10693 handler(Dart_kImportTag,
10694 Api::NewHandle(isolate, importer()), 10694 Api::NewHandle(thread, importer()),
10695 Api::NewHandle(isolate, lib_url.raw())); 10695 Api::NewHandle(thread, lib_url.raw()));
10696 } else { 10696 } else {
10697 // Another load request is in flight. 10697 // Another load request is in flight.
10698 ASSERT(deferred_lib.LoadRequested()); 10698 ASSERT(deferred_lib.LoadRequested());
10699 } 10699 }
10700 return false; // Load request not yet completed. 10700 return false; // Load request not yet completed.
10701 } 10701 }
10702 10702
10703 10703
10704 RawArray* LibraryPrefix::dependent_code() const { 10704 RawArray* LibraryPrefix::dependent_code() const {
10705 return raw_ptr()->dependent_code_; 10705 return raw_ptr()->dependent_code_;
(...skipping 11164 matching lines...) Expand 10 before | Expand all | Expand 10 after
21870 return tag_label.ToCString(); 21870 return tag_label.ToCString();
21871 } 21871 }
21872 21872
21873 21873
21874 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21874 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21875 Instance::PrintJSONImpl(stream, ref); 21875 Instance::PrintJSONImpl(stream, ref);
21876 } 21876 }
21877 21877
21878 21878
21879 } // namespace dart 21879 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698