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

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

Issue 10911201: Reapply changes to Expando patching. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move code around a bit. Created 8 years, 3 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 | Annotate | Revision Log
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/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 RegisterClass(cls, name, core_impl_lib); 659 RegisterClass(cls, name, core_impl_lib);
660 pending_classes.Add(cls, Heap::kOld); 660 pending_classes.Add(cls, Heap::kOld);
661 // Super type set below, after Object is allocated. 661 // Super type set below, after Object is allocated.
662 662
663 cls = Class::New<JSRegExp>(); 663 cls = Class::New<JSRegExp>();
664 object_store->set_jsregexp_class(cls); 664 object_store->set_jsregexp_class(cls);
665 name = Symbols::JSSyntaxRegExp(); 665 name = Symbols::JSSyntaxRegExp();
666 RegisterClass(cls, name, core_impl_lib); 666 RegisterClass(cls, name, core_impl_lib);
667 pending_classes.Add(cls, Heap::kOld); 667 pending_classes.Add(cls, Heap::kOld);
668 668
669 cls = Class::New<WeakProperty>();
670 object_store->set_weak_property_class(cls);
671 name = Symbols::_WeakProperty();
672 RegisterPrivateClass(cls, name, core_impl_lib);
673 pending_classes.Add(cls, Heap::kOld);
674
675 // Initialize the base interfaces used by the core VM classes. 669 // Initialize the base interfaces used by the core VM classes.
676 const Script& script = Script::Handle(Bootstrap::LoadCoreScript(false)); 670 const Script& script = Script::Handle(Bootstrap::LoadCoreScript(false));
677 671
678 // Allocate and initialize the Object class and type. The Object 672 // Allocate and initialize the Object class and type. The Object
679 // class and ByteArray subclasses are the only pre-allocated, 673 // class and ByteArray subclasses are the only pre-allocated,
680 // non-interface classes in the core library. 674 // non-interface classes in the core library.
681 cls = Class::New<Instance>(kInstanceCid); 675 cls = Class::New<Instance>(kInstanceCid);
682 object_store->set_object_class(cls); 676 object_store->set_object_class(cls);
683 name = Symbols::Object(); 677 name = Symbols::Object();
684 cls.set_name(name); 678 cls.set_name(name);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 cls = Class::New<ExternalFloat32Array>(); 776 cls = Class::New<ExternalFloat32Array>();
783 object_store->set_external_float32_array_class(cls); 777 object_store->set_external_float32_array_class(cls);
784 name = Symbols::_ExternalFloat32Array(); 778 name = Symbols::_ExternalFloat32Array();
785 RegisterPrivateClass(cls, name, core_lib); 779 RegisterPrivateClass(cls, name, core_lib);
786 780
787 cls = Class::New<ExternalFloat64Array>(); 781 cls = Class::New<ExternalFloat64Array>();
788 object_store->set_external_float64_array_class(cls); 782 object_store->set_external_float64_array_class(cls);
789 name = Symbols::_ExternalFloat64Array(); 783 name = Symbols::_ExternalFloat64Array();
790 RegisterPrivateClass(cls, name, core_lib); 784 RegisterPrivateClass(cls, name, core_lib);
791 785
786 cls = Class::New<WeakProperty>();
787 object_store->set_weak_property_class(cls);
788 name = Symbols::_WeakProperty();
789 RegisterPrivateClass(cls, name, core_lib);
790
792 // Set the super type of class Stacktrace to Object type so that the 791 // Set the super type of class Stacktrace to Object type so that the
793 // 'toString' method is implemented. 792 // 'toString' method is implemented.
794 cls = object_store->stacktrace_class(); 793 cls = object_store->stacktrace_class();
795 cls.set_super_type(type); 794 cls.set_super_type(type);
796 795
797 // Note: The abstract class Function is represented by VM class 796 // Note: The abstract class Function is represented by VM class
798 // DartFunction, not VM class Function. 797 // DartFunction, not VM class Function.
799 name = Symbols::Function(); 798 name = Symbols::Function();
800 cls = Class::New<DartFunction>(); 799 cls = Class::New<DartFunction>();
801 RegisterClass(cls, name, core_lib); 800 RegisterClass(cls, name, core_lib);
(...skipping 10694 matching lines...) Expand 10 before | Expand all | Expand 10 after
11496 } 11495 }
11497 return result.raw(); 11496 return result.raw();
11498 } 11497 }
11499 11498
11500 11499
11501 const char* WeakProperty::ToCString() const { 11500 const char* WeakProperty::ToCString() const {
11502 return "_WeakProperty"; 11501 return "_WeakProperty";
11503 } 11502 }
11504 11503
11505 } // namespace dart 11504 } // namespace dart
OLDNEW
« runtime/lib/lib_impl_sources.gypi ('K') | « runtime/lib/lib_sources.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698