Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: runtime/vm/object_store.cc

Issue 634603002: Await always waits (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 13 matching lines...) Expand all
24 number_type_(Type::null()), 24 number_type_(Type::null()),
25 int_type_(Type::null()), 25 int_type_(Type::null()),
26 integer_implementation_class_(Class::null()), 26 integer_implementation_class_(Class::null()),
27 smi_class_(Class::null()), 27 smi_class_(Class::null()),
28 mint_class_(Class::null()), 28 mint_class_(Class::null()),
29 double_class_(Class::null()), 29 double_class_(Class::null()),
30 float32x4_type_(Type::null()), 30 float32x4_type_(Type::null()),
31 int32x4_type_(Type::null()), 31 int32x4_type_(Type::null()),
32 float64x2_type_(Type::null()), 32 float64x2_type_(Type::null()),
33 string_type_(Type::null()), 33 string_type_(Type::null()),
34 future_class_(Class::null()),
35 completer_class_(Class::null()),
34 one_byte_string_class_(Class::null()), 36 one_byte_string_class_(Class::null()),
35 two_byte_string_class_(Class::null()), 37 two_byte_string_class_(Class::null()),
36 external_one_byte_string_class_(Class::null()), 38 external_one_byte_string_class_(Class::null()),
37 external_two_byte_string_class_(Class::null()), 39 external_two_byte_string_class_(Class::null()),
38 bool_type_(Type::null()), 40 bool_type_(Type::null()),
39 bool_class_(Class::null()), 41 bool_class_(Class::null()),
40 array_class_(Class::null()), 42 array_class_(Class::null()),
41 array_type_(Type::null()), 43 array_type_(Type::null()),
42 immutable_array_class_(Class::null()), 44 immutable_array_class_(Class::null()),
43 growable_object_array_class_(Class::null()), 45 growable_object_array_class_(Class::null()),
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 const Stacktrace& stack_trace = 148 const Stacktrace& stack_trace =
147 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); 149 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array));
148 // Expansion of inlined functions requires additional memory at run time, 150 // Expansion of inlined functions requires additional memory at run time,
149 // avoid it. 151 // avoid it.
150 stack_trace.set_expand_inlined(false); 152 stack_trace.set_expand_inlined(false);
151 set_preallocated_stack_trace(stack_trace); 153 set_preallocated_stack_trace(stack_trace);
152 154
153 return true; 155 return true;
154 } 156 }
155 157
158
159 bool ObjectStore::InitAsyncObjects() {
160 Isolate* isolate = Isolate::Current();
161 ASSERT(isolate != NULL && isolate->object_store() == this);
162
163 const Library& async_lib = Library::Handle(async_library());
164 ASSERT(!async_lib.IsNull());
165 Class& cls = Class::Handle(isolate);
166 cls = async_lib.LookupClass(Symbols::Future());
167 ASSERT(!cls.IsNull());
168 set_future_class(cls);
169 cls = async_lib.LookupClass(Symbols::Completer());
170 ASSERT(!cls.IsNull());
171 set_completer_class(cls);
172 return true;
173 }
174
156 } // namespace dart 175 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698