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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 ASSERT(caller_frame != NULL); | 258 ASSERT(caller_frame != NULL); |
259 const TokenPosition location = caller_frame->GetTokenPos(); | 259 const TokenPosition location = caller_frame->GetTokenPos(); |
260 const AbstractType& instance_type = | 260 const AbstractType& instance_type = |
261 AbstractType::Handle(instance.GetType()); | 261 AbstractType::Handle(instance.GetType()); |
262 const String& instance_type_name = | 262 const String& instance_type_name = |
263 String::Handle(instance_type.UserVisibleName()); | 263 String::Handle(instance_type.UserVisibleName()); |
264 String& type_name = String::Handle(); | 264 String& type_name = String::Handle(); |
265 if (!type.IsInstantiated()) { | 265 if (!type.IsInstantiated()) { |
266 // Instantiate type before reporting the error. | 266 // Instantiate type before reporting the error. |
267 const AbstractType& instantiated_type = AbstractType::Handle( | 267 const AbstractType& instantiated_type = AbstractType::Handle( |
268 type.InstantiateFrom(instantiator_type_arguments, NULL)); | 268 type.InstantiateFrom(instantiator_type_arguments, NULL, |
| 269 NULL, NULL, Heap::kNew)); |
269 // Note that instantiated_type may be malformed. | 270 // Note that instantiated_type may be malformed. |
270 type_name = instantiated_type.UserVisibleName(); | 271 type_name = instantiated_type.UserVisibleName(); |
271 } else { | 272 } else { |
272 type_name = type.UserVisibleName(); | 273 type_name = type.UserVisibleName(); |
273 } | 274 } |
274 String& bound_error_message = String::Handle(); | 275 String& bound_error_message = String::Handle(); |
275 if (bound_error.IsNull()) { | 276 if (bound_error.IsNull()) { |
276 const String& dst_name = String::ZoneHandle( | 277 const String& dst_name = String::ZoneHandle( |
277 Symbols::New(Exceptions::kCastErrorDstName)); | 278 Symbols::New(Exceptions::kCastErrorDstName)); |
278 | 279 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 337 |
337 DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0) { | 338 DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0) { |
338 #if defined(ARCH_IS_64_BIT) | 339 #if defined(ARCH_IS_64_BIT) |
339 return Bool::True().raw(); | 340 return Bool::True().raw(); |
340 #else | 341 #else |
341 return Bool::False().raw(); | 342 return Bool::False().raw(); |
342 #endif // defined(ARCH_IS_64_BIT) | 343 #endif // defined(ARCH_IS_64_BIT) |
343 } | 344 } |
344 | 345 |
345 } // namespace dart | 346 } // namespace dart |
OLD | NEW |