| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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), | 153 UnhandledException::New(Instance::Cast(result), |
| 154 Stacktrace::Handle(isolate))); | 154 Stacktrace::Handle(isolate))); |
| 155 set_preallocated_unhandled_exception(unhandled_exception); | 155 set_preallocated_unhandled_exception(unhandled_exception); |
| 156 | 156 |
| 157 const Array& code_array = Array::Handle( | 157 const Array& code_array = Array::Handle(isolate, |
| 158 isolate, | |
| 159 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); | 158 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); |
| 160 const Array& pc_offset_array = Array::Handle( | 159 const Array& pc_offset_array = Array::Handle(isolate, |
| 161 isolate, | |
| 162 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); | 160 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); |
| 163 const Stacktrace& stack_trace = | 161 const Stacktrace& stack_trace = Stacktrace::Handle(isolate, |
| 164 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); | 162 Stacktrace::New(code_array, pc_offset_array)); |
| 165 // Expansion of inlined functions requires additional memory at run time, | 163 // Expansion of inlined functions requires additional memory at run time, |
| 166 // avoid it. | 164 // avoid it. |
| 167 stack_trace.set_expand_inlined(false); | 165 stack_trace.set_expand_inlined(false); |
| 168 set_preallocated_stack_trace(stack_trace); | 166 set_preallocated_stack_trace(stack_trace); |
| 169 | 167 |
| 170 return true; | 168 return true; |
| 171 } | 169 } |
| 172 | 170 |
| 173 | 171 |
| 174 void ObjectStore::InitKnownObjects() { | 172 void ObjectStore::InitKnownObjects() { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 187 cls = async_lib.LookupClass(Symbols::StreamIterator()); | 185 cls = async_lib.LookupClass(Symbols::StreamIterator()); |
| 188 ASSERT(!cls.IsNull()); | 186 ASSERT(!cls.IsNull()); |
| 189 set_stream_iterator_class(cls); | 187 set_stream_iterator_class(cls); |
| 190 | 188 |
| 191 const Library& internal_lib = Library::Handle(internal_library()); | 189 const Library& internal_lib = Library::Handle(internal_library()); |
| 192 cls = internal_lib.LookupClass(Symbols::Symbol()); | 190 cls = internal_lib.LookupClass(Symbols::Symbol()); |
| 193 set_symbol_class(cls); | 191 set_symbol_class(cls); |
| 194 } | 192 } |
| 195 | 193 |
| 196 } // namespace dart | 194 } // namespace dart |
| OLD | NEW |