| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 } | 273 } |
| 274 String& bound_error_message = String::Handle(); | 274 String& bound_error_message = String::Handle(); |
| 275 if (bound_error.IsNull()) { | 275 if (bound_error.IsNull()) { |
| 276 const String& dst_name = String::ZoneHandle( | 276 const String& dst_name = String::ZoneHandle( |
| 277 Symbols::New(Exceptions::kCastErrorDstName)); | 277 Symbols::New(Exceptions::kCastErrorDstName)); |
| 278 | 278 |
| 279 Exceptions::CreateAndThrowTypeError( | 279 Exceptions::CreateAndThrowTypeError( |
| 280 location, instance_type_name, type_name, | 280 location, instance_type_name, type_name, |
| 281 dst_name, Object::null_string()); | 281 dst_name, Object::null_string()); |
| 282 } else { | 282 } else { |
| 283 ASSERT(isolate->flags().type_checks()); | 283 ASSERT(isolate->type_checks()); |
| 284 bound_error_message = String::New(bound_error.ToErrorCString()); | 284 bound_error_message = String::New(bound_error.ToErrorCString()); |
| 285 Exceptions::CreateAndThrowTypeError( | 285 Exceptions::CreateAndThrowTypeError( |
| 286 location, instance_type_name, Symbols::Empty(), | 286 location, instance_type_name, Symbols::Empty(), |
| 287 Symbols::Empty(), bound_error_message); | 287 Symbols::Empty(), bound_error_message); |
| 288 } | 288 } |
| 289 UNREACHABLE(); | 289 UNREACHABLE(); |
| 290 } | 290 } |
| 291 return instance.raw(); | 291 return instance.raw(); |
| 292 } | 292 } |
| 293 | 293 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 336 |
| 337 DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0) { | 337 DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0) { |
| 338 #if defined(ARCH_IS_64_BIT) | 338 #if defined(ARCH_IS_64_BIT) |
| 339 return Bool::True().raw(); | 339 return Bool::True().raw(); |
| 340 #else | 340 #else |
| 341 return Bool::False().raw(); | 341 return Bool::False().raw(); |
| 342 #endif // defined(ARCH_IS_64_BIT) | 342 #endif // defined(ARCH_IS_64_BIT) |
| 343 } | 343 } |
| 344 | 344 |
| 345 } // namespace dart | 345 } // namespace dart |
| OLD | NEW |