OLD | NEW |
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 Loading... |
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 return predefined_handles_->handles_.AllocateScopedHandle(); | 248 return predefined_handles_->handles_.AllocateScopedHandle(); |
249 } | 249 } |
250 | 250 |
251 | 251 |
252 bool Dart::IsReadOnlyHandle(uword address) { | 252 bool Dart::IsReadOnlyHandle(uword address) { |
253 ASSERT(predefined_handles_ != NULL); | 253 ASSERT(predefined_handles_ != NULL); |
254 return predefined_handles_->handles_.IsValidScopedHandle(address); | 254 return predefined_handles_->handles_.IsValidScopedHandle(address); |
255 } | 255 } |
256 | 256 |
257 } // namespace dart | 257 } // namespace dart |
OLD | NEW |