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

Unified Diff: runtime/vm/object.h

Issue 22381002: Fixes to get Dart VM compiling on Ubuntu 13.04, Debian Wheezy. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Alternative type-punning fix Created 7 years, 4 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
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 812607de9731ad3ee0478a4db3203d8be5778c98..1023637b249b71e8f632652b9b2325d2f44d8fe6 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -5988,9 +5988,7 @@ intptr_t Instance::GetNativeField(Isolate* isolate, int index) const {
if (native_fields == TypedData::null()) {
return 0;
}
- intptr_t byte_offset = index * sizeof(intptr_t);
- return *reinterpret_cast<intptr_t*>(native_fields->ptr()->data_ +
- byte_offset);
+ return *(reinterpret_cast<intptr_t*>(native_fields->ptr()->data_) + index);
srdjan 2013/08/07 18:36:43 From Slava: nit: you can use array syntax for thi
}

Powered by Google App Engine
This is Rietveld 408576698