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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 } | 264 } |
265 String& bound_error_message = String::Handle(); | 265 String& bound_error_message = String::Handle(); |
266 if (bound_error.IsNull()) { | 266 if (bound_error.IsNull()) { |
267 const String& dst_name = String::ZoneHandle( | 267 const String& dst_name = String::ZoneHandle( |
268 Symbols::New(Exceptions::kCastErrorDstName)); | 268 Symbols::New(Exceptions::kCastErrorDstName)); |
269 | 269 |
270 Exceptions::CreateAndThrowTypeError( | 270 Exceptions::CreateAndThrowTypeError( |
271 location, instance_type_name, type_name, | 271 location, instance_type_name, type_name, |
272 dst_name, Object::null_string()); | 272 dst_name, Object::null_string()); |
273 } else { | 273 } else { |
274 ASSERT(Isolate::Current()->TypeChecksEnabled()); | 274 ASSERT(isolate->flags().type_checks()); |
275 bound_error_message = String::New(bound_error.ToErrorCString()); | 275 bound_error_message = String::New(bound_error.ToErrorCString()); |
276 Exceptions::CreateAndThrowTypeError( | 276 Exceptions::CreateAndThrowTypeError( |
277 location, instance_type_name, Symbols::Empty(), | 277 location, instance_type_name, Symbols::Empty(), |
278 Symbols::Empty(), bound_error_message); | 278 Symbols::Empty(), bound_error_message); |
279 } | 279 } |
280 UNREACHABLE(); | 280 UNREACHABLE(); |
281 } | 281 } |
282 return instance.raw(); | 282 return instance.raw(); |
283 } | 283 } |
284 | 284 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0) { | 321 DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0) { |
322 #if defined(ARCH_IS_64_BIT) | 322 #if defined(ARCH_IS_64_BIT) |
323 return Bool::True().raw(); | 323 return Bool::True().raw(); |
324 #else | 324 #else |
325 return Bool::False().raw(); | 325 return Bool::False().raw(); |
326 #endif // defined(ARCH_IS_64_BIT) | 326 #endif // defined(ARCH_IS_64_BIT) |
327 } | 327 } |
328 | 328 |
329 } // namespace dart | 329 } // namespace dart |
OLD | NEW |