| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/object_store.h" | 5 #include "vm/object_store.h" |
| 6 | 6 |
| 7 #include "vm/exceptions.h" | 7 #include "vm/exceptions.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 Symbols::Dot(), | 143 Symbols::Dot(), |
| 144 Object::empty_array()); | 144 Object::empty_array()); |
| 145 if (result.IsError()) { | 145 if (result.IsError()) { |
| 146 return false; | 146 return false; |
| 147 } | 147 } |
| 148 set_out_of_memory(Instance::Cast(result)); | 148 set_out_of_memory(Instance::Cast(result)); |
| 149 | 149 |
| 150 // Allocate pre-allocated unhandled exception object initialized with the | 150 // Allocate pre-allocated unhandled exception object initialized with the |
| 151 // pre-allocated OutOfMemoryError. | 151 // pre-allocated OutOfMemoryError. |
| 152 const UnhandledException& unhandled_exception = UnhandledException::Handle( | 152 const UnhandledException& unhandled_exception = UnhandledException::Handle( |
| 153 UnhandledException::New(Instance::Cast(result), Object::null_instance())); | 153 UnhandledException::New(Instance::Cast(result), |
| 154 Stacktrace::Handle(isolate))); |
| 154 set_preallocated_unhandled_exception(unhandled_exception); | 155 set_preallocated_unhandled_exception(unhandled_exception); |
| 155 | 156 |
| 156 const Array& code_array = Array::Handle( | 157 const Array& code_array = Array::Handle( |
| 157 isolate, | 158 isolate, |
| 158 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); | 159 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); |
| 159 const Array& pc_offset_array = Array::Handle( | 160 const Array& pc_offset_array = Array::Handle( |
| 160 isolate, | 161 isolate, |
| 161 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); | 162 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); |
| 162 const Stacktrace& stack_trace = | 163 const Stacktrace& stack_trace = |
| 163 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); | 164 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 186 cls = async_lib.LookupClass(Symbols::StreamIterator()); | 187 cls = async_lib.LookupClass(Symbols::StreamIterator()); |
| 187 ASSERT(!cls.IsNull()); | 188 ASSERT(!cls.IsNull()); |
| 188 set_stream_iterator_class(cls); | 189 set_stream_iterator_class(cls); |
| 189 | 190 |
| 190 const Library& internal_lib = Library::Handle(internal_library()); | 191 const Library& internal_lib = Library::Handle(internal_library()); |
| 191 cls = internal_lib.LookupClass(Symbols::Symbol()); | 192 cls = internal_lib.LookupClass(Symbols::Symbol()); |
| 192 set_symbol_class(cls); | 193 set_symbol_class(cls); |
| 193 } | 194 } |
| 194 | 195 |
| 195 } // namespace dart | 196 } // namespace dart |
| OLD | NEW |