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

Unified Diff: runtime/vm/snapshot.cc

Issue 12303013: Simd128Float32, Simd128Mask, and Simd128Float32List additions for dart:scalarlist (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix strict aliasing warning Created 7 years, 10 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
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 70941d97b11e2dede370790cd9e7270f697d2936..71336c5fcf18a9b5a89066e85068cf2ae4883587 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -578,6 +578,36 @@ RawGrowableObjectArray* SnapshotReader::NewGrowableObjectArray() {
}
+RawFloat32x4* SnapshotReader::NewFloat32x4(float v0, float v1, float v2,
+ float v3) {
+ ASSERT(kind_ == Snapshot::kFull);
+ ASSERT(isolate()->no_gc_scope_depth() != 0);
+ cls_ = object_store()->float32x4_class();
+ RawFloat32x4* obj = reinterpret_cast<RawFloat32x4*>(
+ AllocateUninitialized(cls_, Float32x4::InstanceSize()));
+ obj->ptr()->value_[0] = v0;
+ obj->ptr()->value_[1] = v1;
+ obj->ptr()->value_[2] = v2;
+ obj->ptr()->value_[3] = v3;
+ return obj;
+}
+
+
+RawUint32x4* SnapshotReader::NewUint32x4(uint32_t v0, uint32_t v1, uint32_t v2,
+ uint32_t v3) {
+ ASSERT(kind_ == Snapshot::kFull);
+ ASSERT(isolate()->no_gc_scope_depth() != 0);
+ cls_ = object_store()->uint32x4_class();
+ RawUint32x4* obj = reinterpret_cast<RawUint32x4*>(
+ AllocateUninitialized(cls_, Uint32x4::InstanceSize()));
+ obj->ptr()->value_[0] = v0;
+ obj->ptr()->value_[1] = v1;
+ obj->ptr()->value_[2] = v2;
+ obj->ptr()->value_[3] = v3;
+ return obj;
+}
+
+
RawApiError* SnapshotReader::NewApiError() {
ALLOC_NEW_OBJECT(ApiError, Object::api_error_class());
}
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698