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

Side by Side Diff: vm/dart.cc

Issue 9108036: - Remove redundant initialization in Array::New (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 8 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 | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_index_table.h" 7 #include "vm/code_index_table.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/freelist.h" 9 #include "vm/freelist.h"
10 #include "vm/handles.h" 10 #include "vm/handles.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 Isolate* Dart::CreateIsolate() { 58 Isolate* Dart::CreateIsolate() {
59 // Create a new isolate. 59 // Create a new isolate.
60 Isolate* isolate = Isolate::Init(); 60 Isolate* isolate = Isolate::Init();
61 ASSERT(isolate != NULL); 61 ASSERT(isolate != NULL);
62 return isolate; 62 return isolate;
63 } 63 }
64 64
65 65
66 void Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { 66 void Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
67 // Initialize the new isolate. 67 // Initialize the new isolate.
68 TIMERSCOPE(time_isolate_initialization);
68 Isolate* isolate = Isolate::Current(); 69 Isolate* isolate = Isolate::Current();
69 ASSERT(isolate != NULL); 70 ASSERT(isolate != NULL);
70 Zone zone(isolate); 71 Zone zone(isolate);
71 HandleScope handle_scope(isolate); 72 HandleScope handle_scope(isolate);
72 Heap::Init(isolate); 73 Heap::Init(isolate);
73 ObjectStore::Init(isolate); 74 ObjectStore::Init(isolate);
74 75
75 if (snapshot_buffer == NULL) { 76 if (snapshot_buffer == NULL) {
76 Object::Init(isolate); 77 Object::Init(isolate);
77 } else { 78 } else {
(...skipping 13 matching lines...) Expand all
91 } 92 }
92 93
93 94
94 void Dart::ShutdownIsolate() { 95 void Dart::ShutdownIsolate() {
95 Isolate* isolate = Isolate::Current(); 96 Isolate* isolate = Isolate::Current();
96 isolate->Shutdown(); 97 isolate->Shutdown();
97 delete isolate; 98 delete isolate;
98 } 99 }
99 100
100 } // namespace dart 101 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698