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

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

Issue 11773008: - Preallocate non-named ArgumentsDescriptors with a small amount of parameters. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/dart_entry.h » ('j') | runtime/vm/dart_entry.h » ('J')
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/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/code_observers.h" 7 #include "vm/code_observers.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/dart_entry.h"
9 #include "vm/flags.h" 10 #include "vm/flags.h"
10 #include "vm/freelist.h" 11 #include "vm/freelist.h"
11 #include "vm/handles.h" 12 #include "vm/handles.h"
12 #include "vm/heap.h" 13 #include "vm/heap.h"
13 #include "vm/isolate.h" 14 #include "vm/isolate.h"
14 #include "vm/object.h" 15 #include "vm/object.h"
15 #include "vm/object_store.h" 16 #include "vm/object_store.h"
16 #include "vm/port.h" 17 #include "vm/port.h"
17 #include "vm/snapshot.h" 18 #include "vm/snapshot.h"
18 #include "vm/stub_code.h" 19 #include "vm/stub_code.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 thread_pool_ = new ThreadPool(); 102 thread_pool_ = new ThreadPool();
102 { 103 {
103 ASSERT(vm_isolate_ == NULL); 104 ASSERT(vm_isolate_ == NULL);
104 ASSERT(Flags::Initialized()); 105 ASSERT(Flags::Initialized());
105 vm_isolate_ = Isolate::Init("vm-isolate"); 106 vm_isolate_ = Isolate::Init("vm-isolate");
106 StackZone zone(vm_isolate_); 107 StackZone zone(vm_isolate_);
107 HandleScope handle_scope(vm_isolate_); 108 HandleScope handle_scope(vm_isolate_);
108 Heap::Init(vm_isolate_); 109 Heap::Init(vm_isolate_);
109 ObjectStore::Init(vm_isolate_); 110 ObjectStore::Init(vm_isolate_);
110 Object::InitOnce(); 111 Object::InitOnce();
112 ArgumentsDescriptor::InitOnce();
111 StubCode::InitOnce(); 113 StubCode::InitOnce();
112 Scanner::InitOnce(); 114 Scanner::InitOnce();
113 Symbols::InitOnce(vm_isolate_); 115 Symbols::InitOnce(vm_isolate_);
114 CPUFeatures::InitOnce(); 116 CPUFeatures::InitOnce();
115 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 117 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
116 // Dart VM requires at least SSE2. 118 // Dart VM requires at least SSE2.
117 if (!CPUFeatures::sse2_supported()) { 119 if (!CPUFeatures::sse2_supported()) {
118 return "SSE2 is required."; 120 return "SSE2 is required.";
119 } 121 }
120 #endif 122 #endif
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 return predefined_handles_->handles_.AllocateScopedHandle(); 244 return predefined_handles_->handles_.AllocateScopedHandle();
243 } 245 }
244 246
245 247
246 bool Dart::IsReadOnlyHandle(uword address) { 248 bool Dart::IsReadOnlyHandle(uword address) {
247 ASSERT(predefined_handles_ != NULL); 249 ASSERT(predefined_handles_ != NULL);
248 return predefined_handles_->handles_.IsValidScopedHandle(address); 250 return predefined_handles_->handles_.IsValidScopedHandle(address);
249 } 251 }
250 252
251 } // namespace dart 253 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_entry.h » ('j') | runtime/vm/dart_entry.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698