| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 CLASS_LIST_TYPED_DATA(REGISTER_EXT_TYPED_DATA_CLASS); | 907 CLASS_LIST_TYPED_DATA(REGISTER_EXT_TYPED_DATA_CLASS); |
| 908 #undef REGISTER_EXT_TYPED_DATA_CLASS | 908 #undef REGISTER_EXT_TYPED_DATA_CLASS |
| 909 // Register Float32x4 and Uint32x4 in the object store. | 909 // Register Float32x4 and Uint32x4 in the object store. |
| 910 cls = Class::New<Float32x4>(); | 910 cls = Class::New<Float32x4>(); |
| 911 object_store->set_float32x4_class(cls); | 911 object_store->set_float32x4_class(cls); |
| 912 RegisterPrivateClass(cls, Symbols::_Float32x4(), lib); | 912 RegisterPrivateClass(cls, Symbols::_Float32x4(), lib); |
| 913 cls = Class::New<Uint32x4>(); | 913 cls = Class::New<Uint32x4>(); |
| 914 object_store->set_uint32x4_class(cls); | 914 object_store->set_uint32x4_class(cls); |
| 915 RegisterPrivateClass(cls, Symbols::_Uint32x4(), lib); | 915 RegisterPrivateClass(cls, Symbols::_Uint32x4(), lib); |
| 916 | 916 |
| 917 cls = Class::New<Instance>(Symbols::Float32x4(), script, |
| 918 Scanner::kDummyTokenIndex); |
| 919 RegisterClass(cls, Symbols::Float32x4(), lib); |
| 920 pending_classes.Add(cls, Heap::kOld); |
| 921 type = Type::NewNonParameterizedType(cls); |
| 922 object_store->set_float32x4_type(type); |
| 923 |
| 924 cls = Class::New<Instance>(Symbols::Uint32x4(), script, |
| 925 Scanner::kDummyTokenIndex); |
| 926 pending_classes.Add(cls, Heap::kOld); |
| 927 type = Type::NewNonParameterizedType(cls); |
| 928 object_store->set_uint32x4_type(type); |
| 929 |
| 917 object_store->set_typeddata_classes(typeddata_classes); | 930 object_store->set_typeddata_classes(typeddata_classes); |
| 918 | 931 |
| 919 // Set the super type of class Stacktrace to Object type so that the | 932 // Set the super type of class Stacktrace to Object type so that the |
| 920 // 'toString' method is implemented. | 933 // 'toString' method is implemented. |
| 921 cls = object_store->stacktrace_class(); | 934 cls = object_store->stacktrace_class(); |
| 922 cls.set_super_type(type); | 935 cls.set_super_type(type); |
| 923 | 936 |
| 924 // Note: The abstract class Function is represented by VM class | 937 // Note: The abstract class Function is represented by VM class |
| 925 // DartFunction, not VM class Function. | 938 // DartFunction, not VM class Function. |
| 926 cls = Class::New<DartFunction>(); | 939 cls = Class::New<DartFunction>(); |
| (...skipping 8312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9239 (type_class() == Type::Handle(Type::IntType()).type_class()); | 9252 (type_class() == Type::Handle(Type::IntType()).type_class()); |
| 9240 } | 9253 } |
| 9241 | 9254 |
| 9242 | 9255 |
| 9243 bool AbstractType::IsDoubleType() const { | 9256 bool AbstractType::IsDoubleType() const { |
| 9244 return HasResolvedTypeClass() && | 9257 return HasResolvedTypeClass() && |
| 9245 (type_class() == Type::Handle(Type::Double()).type_class()); | 9258 (type_class() == Type::Handle(Type::Double()).type_class()); |
| 9246 } | 9259 } |
| 9247 | 9260 |
| 9248 | 9261 |
| 9262 bool AbstractType::IsFloat32x4Type() const { |
| 9263 return HasResolvedTypeClass() && |
| 9264 (type_class() == Type::Handle(Type::Float32x4()).type_class()); |
| 9265 } |
| 9266 |
| 9267 |
| 9268 bool AbstractType::IsUint32x4Type() const { |
| 9269 return HasResolvedTypeClass() && |
| 9270 (type_class() == Type::Handle(Type::Uint32x4()).type_class()); |
| 9271 } |
| 9272 |
| 9273 |
| 9249 bool AbstractType::IsNumberType() const { | 9274 bool AbstractType::IsNumberType() const { |
| 9250 return HasResolvedTypeClass() && | 9275 return HasResolvedTypeClass() && |
| 9251 (type_class() == Type::Handle(Type::Number()).type_class()); | 9276 (type_class() == Type::Handle(Type::Number()).type_class()); |
| 9252 } | 9277 } |
| 9253 | 9278 |
| 9254 | 9279 |
| 9255 bool AbstractType::IsStringType() const { | 9280 bool AbstractType::IsStringType() const { |
| 9256 return HasResolvedTypeClass() && | 9281 return HasResolvedTypeClass() && |
| 9257 (type_class() == Type::Handle(Type::StringType()).type_class()); | 9282 (type_class() == Type::Handle(Type::StringType()).type_class()); |
| 9258 } | 9283 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9387 RawType* Type::MintType() { | 9412 RawType* Type::MintType() { |
| 9388 return Isolate::Current()->object_store()->mint_type(); | 9413 return Isolate::Current()->object_store()->mint_type(); |
| 9389 } | 9414 } |
| 9390 | 9415 |
| 9391 | 9416 |
| 9392 RawType* Type::Double() { | 9417 RawType* Type::Double() { |
| 9393 return Isolate::Current()->object_store()->double_type(); | 9418 return Isolate::Current()->object_store()->double_type(); |
| 9394 } | 9419 } |
| 9395 | 9420 |
| 9396 | 9421 |
| 9422 RawType* Type::Float32x4() { |
| 9423 return Isolate::Current()->object_store()->float32x4_type(); |
| 9424 } |
| 9425 |
| 9426 |
| 9427 RawType* Type::Uint32x4() { |
| 9428 return Isolate::Current()->object_store()->uint32x4_type(); |
| 9429 } |
| 9430 |
| 9431 |
| 9397 RawType* Type::Number() { | 9432 RawType* Type::Number() { |
| 9398 return Isolate::Current()->object_store()->number_type(); | 9433 return Isolate::Current()->object_store()->number_type(); |
| 9399 } | 9434 } |
| 9400 | 9435 |
| 9401 | 9436 |
| 9402 RawType* Type::StringType() { | 9437 RawType* Type::StringType() { |
| 9403 return Isolate::Current()->object_store()->string_type(); | 9438 return Isolate::Current()->object_store()->string_type(); |
| 9404 } | 9439 } |
| 9405 | 9440 |
| 9406 | 9441 |
| (...skipping 3647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13054 } | 13089 } |
| 13055 return result.raw(); | 13090 return result.raw(); |
| 13056 } | 13091 } |
| 13057 | 13092 |
| 13058 | 13093 |
| 13059 const char* WeakProperty::ToCString() const { | 13094 const char* WeakProperty::ToCString() const { |
| 13060 return "_WeakProperty"; | 13095 return "_WeakProperty"; |
| 13061 } | 13096 } |
| 13062 | 13097 |
| 13063 } // namespace dart | 13098 } // namespace dart |
| OLD | NEW |