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

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

Issue 10870064: Use patching for Expando so the implementation-specific files are not needed in the SDK. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
« no previous file with comments | « runtime/lib/lib_sources.gypi ('k') | no next file » | 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/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 RegisterClass(cls, name, core_impl_lib); 622 RegisterClass(cls, name, core_impl_lib);
623 pending_classes.Add(cls, Heap::kOld); 623 pending_classes.Add(cls, Heap::kOld);
624 // Super type set below, after Object is allocated. 624 // Super type set below, after Object is allocated.
625 625
626 cls = Class::New<JSRegExp>(); 626 cls = Class::New<JSRegExp>();
627 object_store->set_jsregexp_class(cls); 627 object_store->set_jsregexp_class(cls);
628 name = Symbols::JSSyntaxRegExp(); 628 name = Symbols::JSSyntaxRegExp();
629 RegisterClass(cls, name, core_impl_lib); 629 RegisterClass(cls, name, core_impl_lib);
630 pending_classes.Add(cls, Heap::kOld); 630 pending_classes.Add(cls, Heap::kOld);
631 631
632 cls = Class::New<WeakProperty>();
633 object_store->set_weak_property_class(cls);
634 name = Symbols::_WeakProperty();
635 RegisterPrivateClass(cls, name, core_impl_lib);
636 pending_classes.Add(cls, Heap::kOld);
Mads Ager (google) 2012/08/24 11:15:23 Carl, this reflects the move of the class from cor
cshapiro 2012/08/25 03:18:29 I believe you have done the right thing. When s
637
632 // Initialize the base interfaces used by the core VM classes. 638 // Initialize the base interfaces used by the core VM classes.
633 const Script& script = Script::Handle(Bootstrap::LoadCoreScript(false)); 639 const Script& script = Script::Handle(Bootstrap::LoadCoreScript(false));
634 640
635 // Allocate and initialize the Object class and type. The Object 641 // Allocate and initialize the Object class and type. The Object
636 // class and ByteArray subclasses are the only pre-allocated, 642 // class and ByteArray subclasses are the only pre-allocated,
637 // non-interface classes in the core library. 643 // non-interface classes in the core library.
638 cls = Class::New<Instance>(kInstanceCid); 644 cls = Class::New<Instance>(kInstanceCid);
639 object_store->set_object_class(cls); 645 object_store->set_object_class(cls);
640 name = Symbols::Object(); 646 name = Symbols::Object();
641 cls.set_name(name); 647 cls.set_name(name);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 cls = Class::New<ExternalFloat32Array>(); 745 cls = Class::New<ExternalFloat32Array>();
740 object_store->set_external_float32_array_class(cls); 746 object_store->set_external_float32_array_class(cls);
741 name = Symbols::_ExternalFloat32Array(); 747 name = Symbols::_ExternalFloat32Array();
742 RegisterPrivateClass(cls, name, core_lib); 748 RegisterPrivateClass(cls, name, core_lib);
743 749
744 cls = Class::New<ExternalFloat64Array>(); 750 cls = Class::New<ExternalFloat64Array>();
745 object_store->set_external_float64_array_class(cls); 751 object_store->set_external_float64_array_class(cls);
746 name = Symbols::_ExternalFloat64Array(); 752 name = Symbols::_ExternalFloat64Array();
747 RegisterPrivateClass(cls, name, core_lib); 753 RegisterPrivateClass(cls, name, core_lib);
748 754
749 cls = Class::New<WeakProperty>();
750 object_store->set_weak_property_class(cls);
751 name = Symbols::_WeakProperty();
752 RegisterPrivateClass(cls, name, core_lib);
753
754 // Set the super type of class Stacktrace to Object type so that the 755 // Set the super type of class Stacktrace to Object type so that the
755 // 'toString' method is implemented. 756 // 'toString' method is implemented.
756 cls = object_store->stacktrace_class(); 757 cls = object_store->stacktrace_class();
757 cls.set_super_type(type); 758 cls.set_super_type(type);
758 759
759 // Note: The abstract class Function is represented by VM class 760 // Note: The abstract class Function is represented by VM class
760 // DartFunction, not VM class Function. 761 // DartFunction, not VM class Function.
761 name = Symbols::Function(); 762 name = Symbols::Function();
762 cls = Class::New<DartFunction>(); 763 cls = Class::New<DartFunction>();
763 RegisterClass(cls, name, core_lib); 764 RegisterClass(cls, name, core_lib);
(...skipping 10417 matching lines...) Expand 10 before | Expand all | Expand 10 after
11181 } 11182 }
11182 return result.raw(); 11183 return result.raw();
11183 } 11184 }
11184 11185
11185 11186
11186 const char* WeakProperty::ToCString() const { 11187 const char* WeakProperty::ToCString() const {
11187 return "_WeakProperty"; 11188 return "_WeakProperty";
11188 } 11189 }
11189 11190
11190 } // namespace dart 11191 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/lib_sources.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698