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

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

Issue 247623007: Remove VM isolate new-space allocation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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/vm/dart.cc ('k') | runtime/vm/scavenger.h » ('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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 664
665 // Allocate and initialize singleton true and false boolean objects. 665 // Allocate and initialize singleton true and false boolean objects.
666 cls = Class::New<Bool>(); 666 cls = Class::New<Bool>();
667 isolate->object_store()->set_bool_class(cls); 667 isolate->object_store()->set_bool_class(cls);
668 *bool_true_ = Bool::New(true); 668 *bool_true_ = Bool::New(true);
669 *bool_false_ = Bool::New(false); 669 *bool_false_ = Bool::New(false);
670 670
671 *smi_illegal_cid_ = Smi::New(kIllegalCid); 671 *smi_illegal_cid_ = Smi::New(kIllegalCid);
672 672
673 String& error_str = String::Handle(); 673 String& error_str = String::Handle();
674 error_str = String::New("SnapshotWriter Error"); 674 error_str = String::New("SnapshotWriter Error", Heap::kOld);
675 *snapshot_writer_error_ = LanguageError::New(error_str); 675 *snapshot_writer_error_ = LanguageError::New(error_str, Heap::kOld);
676 error_str = String::New("Branch offset overflow"); 676 error_str = String::New("Branch offset overflow", Heap::kOld);
677 *branch_offset_error_ = LanguageError::New(error_str); 677 *branch_offset_error_ = LanguageError::New(error_str, Heap::kOld);
678 678
679 ASSERT(!null_object_->IsSmi()); 679 ASSERT(!null_object_->IsSmi());
680 ASSERT(!null_array_->IsSmi()); 680 ASSERT(!null_array_->IsSmi());
681 ASSERT(null_array_->IsArray()); 681 ASSERT(null_array_->IsArray());
682 ASSERT(!null_string_->IsSmi()); 682 ASSERT(!null_string_->IsSmi());
683 ASSERT(null_string_->IsString()); 683 ASSERT(null_string_->IsString());
684 ASSERT(!null_instance_->IsSmi()); 684 ASSERT(!null_instance_->IsSmi());
685 ASSERT(null_instance_->IsInstance()); 685 ASSERT(null_instance_->IsInstance());
686 ASSERT(!null_type_arguments_->IsSmi()); 686 ASSERT(!null_type_arguments_->IsSmi());
687 ASSERT(null_type_arguments_->IsTypeArguments()); 687 ASSERT(null_type_arguments_->IsTypeArguments());
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 760
761 void Object::CreateInternalMetaData() { 761 void Object::CreateInternalMetaData() {
762 // Initialize meta data for VM internal classes. 762 // Initialize meta data for VM internal classes.
763 Class& cls = Class::Handle(); 763 Class& cls = Class::Handle();
764 Array& fields = Array::Handle(); 764 Array& fields = Array::Handle();
765 Field& fld = Field::Handle(); 765 Field& fld = Field::Handle();
766 String& name = String::Handle(); 766 String& name = String::Handle();
767 767
768 // TODO(iposva): Add more of the VM classes here. 768 // TODO(iposva): Add more of the VM classes here.
769 cls = context_class_; 769 cls = context_class_;
770 fields = Array::New(1); 770 fields = Array::New(1, Heap::kOld);
771 name = Symbols::New("@parent_"); 771 name = Symbols::New("@parent_");
772 fld = Field::New(name, false, false, false, cls, 0); 772 fld = Field::New(name, false, false, false, cls, 0);
773 fields.SetAt(0, fld); 773 fields.SetAt(0, fld);
774 cls.SetFields(fields); 774 cls.SetFields(fields);
775 } 775 }
776 776
777 777
778 // Make unused space in an object whose type has been transformed safe 778 // Make unused space in an object whose type has been transformed safe
779 // for traversing during GC. 779 // for traversing during GC.
780 // The unused part of the transformed object is marked as an TypedDataInt8Array 780 // The unused part of the transformed object is marked as an TypedDataInt8Array
(...skipping 17750 matching lines...) Expand 10 before | Expand all | Expand 10 after
18531 return tag_label.ToCString(); 18531 return tag_label.ToCString();
18532 } 18532 }
18533 18533
18534 18534
18535 void UserTag::PrintToJSONStream(JSONStream* stream, bool ref) const { 18535 void UserTag::PrintToJSONStream(JSONStream* stream, bool ref) const {
18536 Instance::PrintToJSONStream(stream, ref); 18536 Instance::PrintToJSONStream(stream, ref);
18537 } 18537 }
18538 18538
18539 18539
18540 } // namespace dart 18540 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698