OLD | NEW |
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/bootstrap_natives.h" | 5 #include "vm/bootstrap_natives.h" |
6 | 6 |
7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
9 #include "vm/exceptions.h" | 9 #include "vm/exceptions.h" |
10 #include "vm/heap.h" | 10 #include "vm/heap.h" |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } | 289 } |
290 | 290 |
291 | 291 |
292 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) { | 292 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) { |
293 const AbstractType& type = | 293 const AbstractType& type = |
294 AbstractType::CheckedHandle(arguments->NativeArgAt(0)); | 294 AbstractType::CheckedHandle(arguments->NativeArgAt(0)); |
295 return type.UserVisibleName(); | 295 return type.UserVisibleName(); |
296 } | 296 } |
297 | 297 |
298 | 298 |
| 299 DEFINE_NATIVE_ENTRY(LibraryPrefix_invalidateDependentCode, 1) { |
| 300 const LibraryPrefix& prefix = |
| 301 LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0)); |
| 302 prefix.InvalidateDependentCode(); |
| 303 return Bool::Get(true).raw(); |
| 304 } |
| 305 |
| 306 |
299 DEFINE_NATIVE_ENTRY(LibraryPrefix_load, 1) { | 307 DEFINE_NATIVE_ENTRY(LibraryPrefix_load, 1) { |
300 const LibraryPrefix& prefix = | 308 const LibraryPrefix& prefix = |
301 LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0)); | 309 LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0)); |
302 prefix.LoadLibrary(); | 310 bool hasCompleted = prefix.LoadLibrary(); |
303 return Bool::Get(true).raw(); | 311 return Bool::Get(hasCompleted).raw(); |
304 } | 312 } |
305 | 313 |
306 } // namespace dart | 314 } // namespace dart |
OLD | NEW |