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 17 matching lines...) Expand all Loading... |
28 smi_type_(Type::null()), | 28 smi_type_(Type::null()), |
29 mint_class_(Class::null()), | 29 mint_class_(Class::null()), |
30 mint_type_(Type::null()), | 30 mint_type_(Type::null()), |
31 bigint_class_(Class::null()), | 31 bigint_class_(Class::null()), |
32 double_class_(Class::null()), | 32 double_class_(Class::null()), |
33 double_type_(Type::null()), | 33 double_type_(Type::null()), |
34 float32x4_type_(Type::null()), | 34 float32x4_type_(Type::null()), |
35 int32x4_type_(Type::null()), | 35 int32x4_type_(Type::null()), |
36 float64x2_type_(Type::null()), | 36 float64x2_type_(Type::null()), |
37 string_type_(Type::null()), | 37 string_type_(Type::null()), |
| 38 future_class_(Class::null()), |
| 39 completer_class_(Class::null()), |
38 one_byte_string_class_(Class::null()), | 40 one_byte_string_class_(Class::null()), |
39 two_byte_string_class_(Class::null()), | 41 two_byte_string_class_(Class::null()), |
40 external_one_byte_string_class_(Class::null()), | 42 external_one_byte_string_class_(Class::null()), |
41 external_two_byte_string_class_(Class::null()), | 43 external_two_byte_string_class_(Class::null()), |
42 bool_type_(Type::null()), | 44 bool_type_(Type::null()), |
43 bool_class_(Class::null()), | 45 bool_class_(Class::null()), |
44 array_class_(Class::null()), | 46 array_class_(Class::null()), |
45 array_type_(Type::null()), | 47 array_type_(Type::null()), |
46 immutable_array_class_(Class::null()), | 48 immutable_array_class_(Class::null()), |
47 growable_object_array_class_(Class::null()), | 49 growable_object_array_class_(Class::null()), |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 const Stacktrace& stack_trace = | 161 const Stacktrace& stack_trace = |
160 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); | 162 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); |
161 // Expansion of inlined functions requires additional memory at run time, | 163 // Expansion of inlined functions requires additional memory at run time, |
162 // avoid it. | 164 // avoid it. |
163 stack_trace.set_expand_inlined(false); | 165 stack_trace.set_expand_inlined(false); |
164 set_preallocated_stack_trace(stack_trace); | 166 set_preallocated_stack_trace(stack_trace); |
165 | 167 |
166 return true; | 168 return true; |
167 } | 169 } |
168 | 170 |
| 171 |
| 172 void ObjectStore::InitAsyncObjects() { |
| 173 Isolate* isolate = Isolate::Current(); |
| 174 ASSERT(isolate != NULL && isolate->object_store() == this); |
| 175 |
| 176 const Library& async_lib = Library::Handle(async_library()); |
| 177 ASSERT(!async_lib.IsNull()); |
| 178 Class& cls = Class::Handle(isolate); |
| 179 cls = async_lib.LookupClass(Symbols::Future()); |
| 180 ASSERT(!cls.IsNull()); |
| 181 set_future_class(cls); |
| 182 cls = async_lib.LookupClass(Symbols::Completer()); |
| 183 ASSERT(!cls.IsNull()); |
| 184 set_completer_class(cls); |
| 185 } |
| 186 |
169 } // namespace dart | 187 } // namespace dart |
OLD | NEW |