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

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

Issue 1712843002: Remove mirrors in product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 RegisterPrivateClass(cls, Symbols::_Closure(), core_lib); 1358 RegisterPrivateClass(cls, Symbols::_Closure(), core_lib);
1359 pending_classes.Add(cls); 1359 pending_classes.Add(cls);
1360 object_store->set_closure_class(cls); 1360 object_store->set_closure_class(cls);
1361 1361
1362 cls = Class::New<WeakProperty>(); 1362 cls = Class::New<WeakProperty>();
1363 object_store->set_weak_property_class(cls); 1363 object_store->set_weak_property_class(cls);
1364 RegisterPrivateClass(cls, Symbols::_WeakProperty(), core_lib); 1364 RegisterPrivateClass(cls, Symbols::_WeakProperty(), core_lib);
1365 1365
1366 // Pre-register the mirrors library so we can place the vm class 1366 // Pre-register the mirrors library so we can place the vm class
1367 // MirrorReference there rather than the core library. 1367 // MirrorReference there rather than the core library.
1368 NOT_IN_PRODUCT(
1368 lib = Library::LookupLibrary(Symbols::DartMirrors()); 1369 lib = Library::LookupLibrary(Symbols::DartMirrors());
1369 if (lib.IsNull()) { 1370 if (lib.IsNull()) {
1370 lib = Library::NewLibraryHelper(Symbols::DartMirrors(), true); 1371 lib = Library::NewLibraryHelper(Symbols::DartMirrors(), true);
1371 lib.SetLoadRequested(); 1372 lib.SetLoadRequested();
1372 lib.Register(); 1373 lib.Register();
1373 object_store->set_bootstrap_library(ObjectStore::kMirrors, lib); 1374 object_store->set_bootstrap_library(ObjectStore::kMirrors, lib);
1374 } 1375 }
1375 ASSERT(!lib.IsNull()); 1376 ASSERT(!lib.IsNull());
1376 ASSERT(lib.raw() == Library::MirrorsLibrary()); 1377 ASSERT(lib.raw() == Library::MirrorsLibrary());
1377 1378
1378 cls = Class::New<MirrorReference>(); 1379 cls = Class::New<MirrorReference>();
1379 RegisterPrivateClass(cls, Symbols::_MirrorReference(), lib); 1380 RegisterPrivateClass(cls, Symbols::_MirrorReference(), lib));
1380 1381
1381 // Pre-register the collection library so we can place the vm class 1382 // Pre-register the collection library so we can place the vm class
1382 // LinkedHashMap there rather than the core library. 1383 // LinkedHashMap there rather than the core library.
1383 lib = Library::LookupLibrary(Symbols::DartCollection()); 1384 lib = Library::LookupLibrary(Symbols::DartCollection());
1384 if (lib.IsNull()) { 1385 if (lib.IsNull()) {
1385 lib = Library::NewLibraryHelper(Symbols::DartCollection(), true); 1386 lib = Library::NewLibraryHelper(Symbols::DartCollection(), true);
1386 lib.SetLoadRequested(); 1387 lib.SetLoadRequested();
1387 lib.Register(); 1388 lib.Register();
1388 object_store->set_bootstrap_library(ObjectStore::kCollection, lib); 1389 object_store->set_bootstrap_library(ObjectStore::kCollection, lib);
1389 } 1390 }
(...skipping 20071 matching lines...) Expand 10 before | Expand all | Expand 10 after
21461 return UserTag::null(); 21462 return UserTag::null();
21462 } 21463 }
21463 21464
21464 21465
21465 const char* UserTag::ToCString() const { 21466 const char* UserTag::ToCString() const {
21466 const String& tag_label = String::Handle(label()); 21467 const String& tag_label = String::Handle(label());
21467 return tag_label.ToCString(); 21468 return tag_label.ToCString();
21468 } 21469 }
21469 21470
21470 } // namespace dart 21471 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698