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

Unified Diff: runtime/vm/object.h

Issue 21966003: Adapt Random class to be able to run in javascript integer compatibility mode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 25742)
+++ runtime/vm/object.h (working copy)
@@ -5349,7 +5349,7 @@
}
- TypeDataElementType ElementType() const {
+ TypedDataElementType ElementType() const {
zra 2013/08/02 21:22:22 Is this renaming related to the Random fix?
intptr_t cid = raw()->GetClassId();
return ElementType(cid);
}
@@ -5383,6 +5383,8 @@
TYPED_GETTER_SETTER(Float64, double)
TYPED_GETTER_SETTER(Float32x4, simd128_value_t)
+#undef TYPED_GETTER_SETTER
+
static intptr_t length_offset() {
return OFFSET_OF(RawTypedData, length_);
}
@@ -5406,9 +5408,9 @@
return element_size[ElementType(class_id)];
}
- static TypeDataElementType ElementType(intptr_t class_id) {
+ static TypedDataElementType ElementType(intptr_t class_id) {
ASSERT(RawObject::IsTypedDataClassId(class_id));
- return static_cast<TypeDataElementType>(
+ return static_cast<TypedDataElementType>(
class_id - kTypedDataInt8ArrayCid);
}
@@ -5475,7 +5477,7 @@
return ElementSizeInBytes(cid);
}
- TypeDataElementType ElementType() const {
+ TypedDataElementType ElementType() const {
intptr_t cid = raw()->GetClassId();
return ElementType(cid);
}
@@ -5513,6 +5515,8 @@
TYPED_GETTER_SETTER(Float64, double)
TYPED_GETTER_SETTER(Float32x4, simd128_value_t);
+#undef TYPED_GETTER_SETTER
+
FinalizablePersistentHandle* AddFinalizer(
void* peer, Dart_WeakPersistentHandleFinalizer callback) const;
@@ -5533,9 +5537,9 @@
return TypedData::element_size[ElementType(class_id)];
}
- static TypeDataElementType ElementType(intptr_t class_id) {
+ static TypedDataElementType ElementType(intptr_t class_id) {
ASSERT(RawObject::IsExternalTypedDataClassId(class_id));
- return static_cast<TypeDataElementType>(
+ return static_cast<TypedDataElementType>(
class_id - kExternalTypedDataInt8ArrayCid);
}
« runtime/lib/math.cc ('K') | « runtime/vm/intrinsifier.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698