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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 growable_object_array_class_(Class::null()), | 46 growable_object_array_class_(Class::null()), |
47 float32x4_class_(Class::null()), | 47 float32x4_class_(Class::null()), |
48 int32x4_class_(Class::null()), | 48 int32x4_class_(Class::null()), |
49 float64x2_class_(Class::null()), | 49 float64x2_class_(Class::null()), |
50 typed_data_classes_(Array::null()), | 50 typed_data_classes_(Array::null()), |
51 error_class_(Class::null()), | 51 error_class_(Class::null()), |
52 stacktrace_class_(Class::null()), | 52 stacktrace_class_(Class::null()), |
53 jsregexp_class_(Class::null()), | 53 jsregexp_class_(Class::null()), |
54 weak_property_class_(Class::null()), | 54 weak_property_class_(Class::null()), |
55 mirror_reference_class_(Class::null()), | 55 mirror_reference_class_(Class::null()), |
| 56 user_tag_class_(Class::null()), |
| 57 tag_table_(GrowableObjectArray::null()), |
| 58 current_tag_(UserTag::null()), |
56 symbol_table_(Array::null()), | 59 symbol_table_(Array::null()), |
57 canonical_type_arguments_(Array::null()), | 60 canonical_type_arguments_(Array::null()), |
58 async_library_(Library::null()), | 61 async_library_(Library::null()), |
59 builtin_library_(Library::null()), | 62 builtin_library_(Library::null()), |
60 core_library_(Library::null()), | 63 core_library_(Library::null()), |
61 isolate_library_(Library::null()), | 64 isolate_library_(Library::null()), |
62 math_library_(Library::null()), | 65 math_library_(Library::null()), |
63 mirrors_library_(Library::null()), | 66 mirrors_library_(Library::null()), |
64 native_wrappers_library_(Library::null()), | 67 native_wrappers_library_(Library::null()), |
65 root_library_(Library::null()), | 68 root_library_(Library::null()), |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 119 |
117 result = DartLibraryCalls::InstanceCreate(library, | 120 result = DartLibraryCalls::InstanceCreate(library, |
118 Symbols::StackOverflowError(), | 121 Symbols::StackOverflowError(), |
119 Symbols::Dot(), | 122 Symbols::Dot(), |
120 Object::empty_array()); | 123 Object::empty_array()); |
121 if (result.IsError()) { | 124 if (result.IsError()) { |
122 return false; | 125 return false; |
123 } | 126 } |
124 set_stack_overflow(Instance::Cast(result)); | 127 set_stack_overflow(Instance::Cast(result)); |
125 | 128 |
| 129 ASSERT(this->tag_table() == GrowableObjectArray::null()); |
| 130 this->tag_table_ = GrowableObjectArray::New(); |
| 131 |
126 result = DartLibraryCalls::InstanceCreate(library, | 132 result = DartLibraryCalls::InstanceCreate(library, |
127 Symbols::OutOfMemoryError(), | 133 Symbols::OutOfMemoryError(), |
128 Symbols::Dot(), | 134 Symbols::Dot(), |
129 Object::empty_array()); | 135 Object::empty_array()); |
130 if (result.IsError()) { | 136 if (result.IsError()) { |
131 return false; | 137 return false; |
132 } | 138 } |
133 set_out_of_memory(Instance::Cast(result)); | 139 set_out_of_memory(Instance::Cast(result)); |
134 const Array& code_array = Array::Handle( | 140 const Array& code_array = Array::Handle( |
135 isolate, | 141 isolate, |
136 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); | 142 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); |
137 const Array& pc_offset_array = Array::Handle( | 143 const Array& pc_offset_array = Array::Handle( |
138 isolate, | 144 isolate, |
139 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); | 145 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); |
140 const Stacktrace& stack_trace = | 146 const Stacktrace& stack_trace = |
141 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); | 147 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); |
142 // Expansion of inlined functions requires additional memory at run time, | 148 // Expansion of inlined functions requires additional memory at run time, |
143 // avoid it. | 149 // avoid it. |
144 stack_trace.set_expand_inlined(false); | 150 stack_trace.set_expand_inlined(false); |
145 set_preallocated_stack_trace(stack_trace); | 151 set_preallocated_stack_trace(stack_trace); |
146 | 152 |
147 return true; | 153 return true; |
148 } | 154 } |
149 | 155 |
150 } // namespace dart | 156 } // namespace dart |
OLD | NEW |