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

Unified Diff: runtime/vm/object.cc

Issue 1790593002: Move the VM's typed_data implementation to runtime/lib. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 7b847749a3bfe505facb5a68c5ae516c3a46cc04..4b77bd4c44ff7c200edb79964cff6ad04d60d6f1 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1437,10 +1437,10 @@ NOT_IN_PRODUCT(
ASSERT(!lib.IsNull());
ASSERT(lib.raw() == Library::TypedDataLibrary());
#define REGISTER_TYPED_DATA_CLASS(clazz) \
- cls = Class::NewTypedDataClass(kTypedData##clazz##Cid); \
- RegisterPrivateClass(cls, Symbols::_##clazz(), lib); \
+ cls = Class::NewTypedDataClass(kTypedData##clazz##ArrayCid); \
+ RegisterClass(cls, Symbols::clazz##List(), lib); \
- CLASS_LIST_TYPED_DATA(REGISTER_TYPED_DATA_CLASS);
+ DART_CLASS_LIST_TYPED_DATA(REGISTER_TYPED_DATA_CLASS);
#undef REGISTER_TYPED_DATA_CLASS
#define REGISTER_TYPED_DATA_VIEW_CLASS(clazz) \
cls = Class::NewTypedDataViewClass(kTypedData##clazz##ViewCid); \
@@ -1459,46 +1459,39 @@ NOT_IN_PRODUCT(
cls = Class::New<Instance>(kByteBufferCid);
cls.set_instance_size(0);
cls.set_next_field_offset(-kWordSize);
- RegisterPrivateClass(cls, Symbols::_ByteBuffer(), lib);
+ RegisterClass(cls, Symbols::ByteBuffer(), lib);
pending_classes.Add(cls);
CLASS_LIST_TYPED_DATA(REGISTER_EXT_TYPED_DATA_CLASS);
#undef REGISTER_EXT_TYPED_DATA_CLASS
// Register Float32x4 and Int32x4 in the object store.
cls = Class::New<Float32x4>();
- object_store->set_float32x4_class(cls);
- RegisterPrivateClass(cls, Symbols::_Float32x4(), lib);
- cls = Class::New<Int32x4>();
- object_store->set_int32x4_class(cls);
- RegisterPrivateClass(cls, Symbols::_Int32x4(), lib);
- cls = Class::New<Float64x2>();
- object_store->set_float64x2_class(cls);
- RegisterPrivateClass(cls, Symbols::_Float64x2(), lib);
-
- cls = Class::New<Instance>(kIllegalCid);
RegisterClass(cls, Symbols::Float32x4(), lib);
cls.set_num_type_arguments(0);
cls.set_num_own_type_arguments(0);
cls.set_is_prefinalized();
pending_classes.Add(cls);
+ object_store->set_float32x4_class(cls);
type = Type::NewNonParameterizedType(cls);
object_store->set_float32x4_type(type);
- cls = Class::New<Instance>(kIllegalCid);
+ cls = Class::New<Int32x4>();
RegisterClass(cls, Symbols::Int32x4(), lib);
cls.set_num_type_arguments(0);
cls.set_num_own_type_arguments(0);
cls.set_is_prefinalized();
pending_classes.Add(cls);
+ object_store->set_int32x4_class(cls);
type = Type::NewNonParameterizedType(cls);
object_store->set_int32x4_type(type);
- cls = Class::New<Instance>(kIllegalCid);
+ cls = Class::New<Float64x2>();
RegisterClass(cls, Symbols::Float64x2(), lib);
cls.set_num_type_arguments(0);
cls.set_num_own_type_arguments(0);
cls.set_is_prefinalized();
pending_classes.Add(cls);
+ object_store->set_float64x2_class(cls);
type = Type::NewNonParameterizedType(cls);
object_store->set_float64x2_type(type);
@@ -7051,7 +7044,6 @@ bool Function::CheckSourceFingerprint(const char* prefix, int32_t fp) const {
// This output can be copied into a file, then used with sed
// to replace the old values.
// sed -i .bak -f /tmp/newkeys runtime/vm/method_recognizer.h
- // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h
THR_Print("s/V(%s, %d)/V(%s, %d)/\n",
prefix, fp, prefix, SourceFingerprint());
} else {
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | runtime/vm/precompiler.cc » ('j') | runtime/vm/vm.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698