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

Side by Side Diff: runtime/vm/dart.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 | « no previous file | runtime/vm/object.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/code_observers.h" 7 #include "vm/code_observers.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/dart_api_state.h" 9 #include "vm/dart_api_state.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 Scanner::InitOnce(); 127 Scanner::InitOnce();
128 Object::CreateInternalMetaData(); 128 Object::CreateInternalMetaData();
129 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 129 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
130 // Dart VM requires at least SSE2. 130 // Dart VM requires at least SSE2.
131 if (!TargetCPUFeatures::sse2_supported()) { 131 if (!TargetCPUFeatures::sse2_supported()) {
132 return "SSE2 is required."; 132 return "SSE2 is required.";
133 } 133 }
134 #endif 134 #endif
135 PremarkingVisitor premarker(vm_isolate_); 135 PremarkingVisitor premarker(vm_isolate_);
136 vm_isolate_->heap()->WriteProtect(false); 136 vm_isolate_->heap()->WriteProtect(false);
137 ASSERT(vm_isolate_->heap()->UsedInWords(Heap::kNew) == 0);
137 vm_isolate_->heap()->IterateOldObjects(&premarker); 138 vm_isolate_->heap()->IterateOldObjects(&premarker);
138 vm_isolate_->heap()->WriteProtect(true); 139 vm_isolate_->heap()->WriteProtect(true);
139 } 140 }
140 // There is a planned and known asymmetry here: We enter one scope for the VM 141 // There is a planned and known asymmetry here: We enter one scope for the VM
141 // isolate so that we can allocate the "persistent" scoped handles for the 142 // isolate so that we can allocate the "persistent" scoped handles for the
142 // predefined API values (such as Dart_True, Dart_False and Dart_Null). 143 // predefined API values (such as Dart_True, Dart_False and Dart_Null).
143 Dart_EnterScope(); 144 Dart_EnterScope();
144 Api::InitHandles(); 145 Api::InitHandles();
145 146
146 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread. 147 Isolate::SetCurrent(NULL); // Unregister the VM isolate from this thread.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 return predefined_handles_->handles_.AllocateScopedHandle(); 287 return predefined_handles_->handles_.AllocateScopedHandle();
287 } 288 }
288 289
289 290
290 bool Dart::IsReadOnlyHandle(uword address) { 291 bool Dart::IsReadOnlyHandle(uword address) {
291 ASSERT(predefined_handles_ != NULL); 292 ASSERT(predefined_handles_ != NULL);
292 return predefined_handles_->handles_.IsValidScopedHandle(address); 293 return predefined_handles_->handles_.IsValidScopedHandle(address);
293 } 294 }
294 295
295 } // namespace dart 296 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698