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

Side by Side Diff: vm/dart.cc

Issue 12052033: Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 | « vm/compiler.cc ('k') | vm/dart_api_impl.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/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 static void PrintLibrarySources(Isolate* isolate) { 148 static void PrintLibrarySources(Isolate* isolate) {
149 const GrowableObjectArray& libs = GrowableObjectArray::Handle( 149 const GrowableObjectArray& libs = GrowableObjectArray::Handle(
150 isolate->object_store()->libraries()); 150 isolate->object_store()->libraries());
151 intptr_t lib_count = libs.Length(); 151 intptr_t lib_count = libs.Length();
152 Library& lib = Library::Handle(); 152 Library& lib = Library::Handle();
153 Array& scripts = Array::Handle(); 153 Array& scripts = Array::Handle();
154 Script& script = Script::Handle(); 154 Script& script = Script::Handle();
155 String& url = String::Handle(); 155 String& url = String::Handle();
156 String& source = String::Handle(); 156 String& source = String::Handle();
157 for (int i = 0; i < lib_count; i++) { 157 for (int i = 0; i < lib_count; i++) {
158 lib |= libs.At(i); 158 lib ^= libs.At(i);
159 url = lib.url(); 159 url = lib.url();
160 OS::Print("Library %s:\n", url.ToCString()); 160 OS::Print("Library %s:\n", url.ToCString());
161 scripts = lib.LoadedScripts(); 161 scripts = lib.LoadedScripts();
162 intptr_t script_count = scripts.Length(); 162 intptr_t script_count = scripts.Length();
163 for (intptr_t i = 0; i < script_count; i++) { 163 for (intptr_t i = 0; i < script_count; i++) {
164 script |= scripts.At(i); 164 script ^= scripts.At(i);
165 url = script.url(); 165 url = script.url();
166 source = script.Source(); 166 source = script.Source();
167 OS::Print("Source for %s:\n", url.ToCString()); 167 OS::Print("Source for %s:\n", url.ToCString());
168 OS::Print("%s\n", source.ToCString()); 168 OS::Print("%s\n", source.ToCString());
169 } 169 }
170 } 170 }
171 } 171 }
172 172
173 173
174 RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) { 174 RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 delete isolate; 237 delete isolate;
238 238
239 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); 239 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback();
240 if (callback != NULL) { 240 if (callback != NULL) {
241 (callback)(callback_data); 241 (callback)(callback_data);
242 } 242 }
243 } 243 }
244 244
245 245
246 uword Dart::AllocateReadOnlyHandle() { 246 uword Dart::AllocateReadOnlyHandle() {
247 ASSERT(Isolate::Current() == Dart::vm_isolate());
247 ASSERT(predefined_handles_ != NULL); 248 ASSERT(predefined_handles_ != NULL);
248 return predefined_handles_->handles_.AllocateScopedHandle(); 249 return predefined_handles_->handles_.AllocateScopedHandle();
249 } 250 }
250 251
251 252
252 bool Dart::IsReadOnlyHandle(uword address) { 253 bool Dart::IsReadOnlyHandle(uword address) {
253 ASSERT(predefined_handles_ != NULL); 254 ASSERT(predefined_handles_ != NULL);
254 return predefined_handles_->handles_.IsValidScopedHandle(address); 255 return predefined_handles_->handles_.IsValidScopedHandle(address);
255 } 256 }
256 257
257 } // namespace dart 258 } // namespace dart
OLDNEW
« no previous file with comments | « vm/compiler.cc ('k') | vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698