| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include "vm/exceptions.h" | 6 #include "vm/exceptions.h" |
| 7 #include "vm/object_store.h" | 7 #include "vm/object_store.h" |
| 8 #include "vm/runtime_entry.h" | 8 #include "vm/runtime_entry.h" |
| 9 #include "vm/stack_frame.h" | 9 #include "vm/stack_frame.h" |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 args.SetAt(1, String::Handle(script.url())); | 119 args.SetAt(1, String::Handle(script.url())); |
| 120 intptr_t line; | 120 intptr_t line; |
| 121 script.GetTokenLocation(error_pos, &line, NULL); | 121 script.GetTokenLocation(error_pos, &line, NULL); |
| 122 args.SetAt(2, Smi::Handle(Smi::New(line))); | 122 args.SetAt(2, Smi::Handle(Smi::New(line))); |
| 123 | 123 |
| 124 Exceptions::ThrowByType(Exceptions::kAbstractClassInstantiation, args); | 124 Exceptions::ThrowByType(Exceptions::kAbstractClassInstantiation, args); |
| 125 UNREACHABLE(); | 125 UNREACHABLE(); |
| 126 return Object::null(); | 126 return Object::null(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 // Rethrow an error with a stacktrace. |
| 130 DEFINE_NATIVE_ENTRY(Zone_rethrow, 2) { |
| 131 GET_NON_NULL_NATIVE_ARGUMENT(Instance, error, arguments->NativeArgAt(0)); |
| 132 GET_NON_NULL_NATIVE_ARGUMENT(Instance, stacktrace, arguments->NativeArgAt(1)); |
| 133 Exceptions::ReThrow(thread, error, stacktrace); |
| 134 return Object::null(); |
| 135 } |
| 136 |
| 129 } // namespace dart | 137 } // namespace dart |
| OLD | NEW |