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

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

Issue 932983002: To satisfy ASAN, use stub instead of & operator to get C++ stack pointer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/dart_entry.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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #endif 105 #endif
106 // Create the read-only handles area. 106 // Create the read-only handles area.
107 ASSERT(predefined_handles_ == NULL); 107 ASSERT(predefined_handles_ == NULL);
108 predefined_handles_ = new ReadOnlyHandles(); 108 predefined_handles_ = new ReadOnlyHandles();
109 // Create the VM isolate and finish the VM initialization. 109 // Create the VM isolate and finish the VM initialization.
110 ASSERT(thread_pool_ == NULL); 110 ASSERT(thread_pool_ == NULL);
111 thread_pool_ = new ThreadPool(); 111 thread_pool_ = new ThreadPool();
112 { 112 {
113 ASSERT(vm_isolate_ == NULL); 113 ASSERT(vm_isolate_ == NULL);
114 ASSERT(Flags::Initialized()); 114 ASSERT(Flags::Initialized());
115 vm_isolate_ = Isolate::Init("vm-isolate"); 115 const bool is_vm_isolate = true;
116 vm_isolate_ = Isolate::Init("vm-isolate", is_vm_isolate);
116 StackZone zone(vm_isolate_); 117 StackZone zone(vm_isolate_);
117 HandleScope handle_scope(vm_isolate_); 118 HandleScope handle_scope(vm_isolate_);
118 Heap::Init(vm_isolate_, 119 Heap::Init(vm_isolate_,
119 0, // New gen size 0; VM isolate should only allocate in old. 120 0, // New gen size 0; VM isolate should only allocate in old.
120 FLAG_old_gen_heap_size * MBInWords, 121 FLAG_old_gen_heap_size * MBInWords,
121 FLAG_external_max_size * MBInWords); 122 FLAG_external_max_size * MBInWords);
122 ObjectStore::Init(vm_isolate_); 123 ObjectStore::Init(vm_isolate_);
123 TargetCPUFeatures::InitOnce(); 124 TargetCPUFeatures::InitOnce();
124 Object::InitOnce(vm_isolate_); 125 Object::InitOnce(vm_isolate_);
125 ArgumentsDescriptor::InitOnce(); 126 ArgumentsDescriptor::InitOnce();
126 StubCode::InitOnce(); 127 StubCode::InitOnce();
128 // Now that the needed stub has been generated, set the stack limit.
129 vm_isolate_->InitializeStackLimit();
127 Symbols::InitOnce(vm_isolate_); 130 Symbols::InitOnce(vm_isolate_);
128 Scanner::InitOnce(); 131 Scanner::InitOnce();
129 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 132 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
130 // Dart VM requires at least SSE2. 133 // Dart VM requires at least SSE2.
131 if (!TargetCPUFeatures::sse2_supported()) { 134 if (!TargetCPUFeatures::sse2_supported()) {
132 return "SSE2 is required."; 135 return "SSE2 is required.";
133 } 136 }
134 #endif 137 #endif
135 Object::FinalizeVMIsolate(vm_isolate_); 138 Object::FinalizeVMIsolate(vm_isolate_);
136 } 139 }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 return predefined_handles_->handles_.AllocateScopedHandle(); 304 return predefined_handles_->handles_.AllocateScopedHandle();
302 } 305 }
303 306
304 307
305 bool Dart::IsReadOnlyHandle(uword address) { 308 bool Dart::IsReadOnlyHandle(uword address) {
306 ASSERT(predefined_handles_ != NULL); 309 ASSERT(predefined_handles_ != NULL);
307 return predefined_handles_->handles_.IsValidScopedHandle(address); 310 return predefined_handles_->handles_.IsValidScopedHandle(address);
308 } 311 }
309 312
310 } // namespace dart 313 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698