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

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

Issue 2005723004: Fraction class prototype and test (not to be committed). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: work in progress Created 4 years, 5 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
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 fraction_class_(Class::null()),
34 float32x4_type_(Type::null()), 35 float32x4_type_(Type::null()),
35 int32x4_type_(Type::null()), 36 int32x4_type_(Type::null()),
36 float64x2_type_(Type::null()), 37 float64x2_type_(Type::null()),
37 string_type_(Type::null()), 38 string_type_(Type::null()),
38 future_class_(Class::null()), 39 future_class_(Class::null()),
39 completer_class_(Class::null()), 40 completer_class_(Class::null()),
40 stream_iterator_class_(Class::null()), 41 stream_iterator_class_(Class::null()),
41 symbol_class_(Class::null()), 42 symbol_class_(Class::null()),
42 one_byte_string_class_(Class::null()), 43 one_byte_string_class_(Class::null()),
43 two_byte_string_class_(Class::null()), 44 two_byte_string_class_(Class::null()),
44 external_one_byte_string_class_(Class::null()), 45 external_one_byte_string_class_(Class::null()),
45 external_two_byte_string_class_(Class::null()), 46 external_two_byte_string_class_(Class::null()),
46 bool_type_(Type::null()), 47 bool_type_(Type::null()),
47 bool_class_(Class::null()), 48 bool_class_(Class::null()),
48 array_class_(Class::null()), 49 array_class_(Class::null()),
49 array_type_(Type::null()), 50 array_type_(Type::null()),
50 immutable_array_class_(Class::null()), 51 immutable_array_class_(Class::null()),
51 growable_object_array_class_(Class::null()), 52 growable_object_array_class_(Class::null()),
52 linked_hash_map_class_(Class::null()), 53 linked_hash_map_class_(Class::null()),
53 float32x4_class_(Class::null()), 54 float32x4_class_(Class::null()),
54 int32x4_class_(Class::null()), 55 int32x4_class_(Class::null()),
55 float64x2_class_(Class::null()), 56 float64x2_class_(Class::null()),
56 error_class_(Class::null()), 57 error_class_(Class::null()),
57 weak_property_class_(Class::null()), 58 weak_property_class_(Class::null()),
59 byte_buffer_class_(Class::null()),
58 symbol_table_(Array::null()), 60 symbol_table_(Array::null()),
59 canonical_types_(Array::null()), 61 canonical_types_(Array::null()),
60 canonical_type_arguments_(Array::null()), 62 canonical_type_arguments_(Array::null()),
61 async_library_(Library::null()), 63 async_library_(Library::null()),
62 builtin_library_(Library::null()), 64 builtin_library_(Library::null()),
63 core_library_(Library::null()), 65 core_library_(Library::null()),
64 collection_library_(Library::null()), 66 collection_library_(Library::null()),
65 convert_library_(Library::null()), 67 convert_library_(Library::null()),
66 developer_library_(Library::null()), 68 developer_library_(Library::null()),
67 internal_library_(Library::null()), 69 internal_library_(Library::null()),
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 this->resume_capabilities_ = GrowableObjectArray::New(); 159 this->resume_capabilities_ = GrowableObjectArray::New();
158 this->exit_listeners_ = GrowableObjectArray::New(); 160 this->exit_listeners_ = GrowableObjectArray::New();
159 this->error_listeners_ = GrowableObjectArray::New(); 161 this->error_listeners_ = GrowableObjectArray::New();
160 162
161 Object& result = Object::Handle(); 163 Object& result = Object::Handle();
162 const Library& library = Library::Handle(Library::CoreLibrary()); 164 const Library& library = Library::Handle(Library::CoreLibrary());
163 165
164 result = DartLibraryCalls::InstanceCreate(library, 166 result = DartLibraryCalls::InstanceCreate(library,
165 Symbols::StackOverflowError(), 167 Symbols::StackOverflowError(),
166 Symbols::Dot(), 168 Symbols::Dot(),
169 false, // Not a factory.
167 Object::empty_array()); 170 Object::empty_array());
168 if (result.IsError()) { 171 if (result.IsError()) {
169 return Error::Cast(result).raw(); 172 return Error::Cast(result).raw();
170 } 173 }
171 set_stack_overflow(Instance::Cast(result)); 174 set_stack_overflow(Instance::Cast(result));
172 175
173 result = DartLibraryCalls::InstanceCreate(library, 176 result = DartLibraryCalls::InstanceCreate(library,
174 Symbols::OutOfMemoryError(), 177 Symbols::OutOfMemoryError(),
175 Symbols::Dot(), 178 Symbols::Dot(),
179 false, // Not a factory.
176 Object::empty_array()); 180 Object::empty_array());
177 if (result.IsError()) { 181 if (result.IsError()) {
178 return Error::Cast(result).raw(); 182 return Error::Cast(result).raw();
179 } 183 }
180 set_out_of_memory(Instance::Cast(result)); 184 set_out_of_memory(Instance::Cast(result));
181 185
182 // Allocate pre-allocated unhandled exception object initialized with the 186 // Allocate pre-allocated unhandled exception object initialized with the
183 // pre-allocated OutOfMemoryError. 187 // pre-allocated OutOfMemoryError.
184 const UnhandledException& unhandled_exception = UnhandledException::Handle( 188 const UnhandledException& unhandled_exception = UnhandledException::Handle(
185 UnhandledException::New(Instance::Cast(result), 189 UnhandledException::New(Instance::Cast(result),
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 ASSERT(!cls.IsNull()); 228 ASSERT(!cls.IsNull());
225 set_stream_iterator_class(cls); 229 set_stream_iterator_class(cls);
226 230
227 const Library& internal_lib = Library::Handle(internal_library()); 231 const Library& internal_lib = Library::Handle(internal_library());
228 cls = internal_lib.LookupClass(Symbols::Symbol()); 232 cls = internal_lib.LookupClass(Symbols::Symbol());
229 set_symbol_class(cls); 233 set_symbol_class(cls);
230 #endif 234 #endif
231 } 235 }
232 236
233 } // namespace dart 237 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698