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

Unified Diff: runtime/lib/byte_array.cc

Issue 10704216: Fix type checking of void type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/lib/byte_array.cc
===================================================================
--- runtime/lib/byte_array.cc (revision 9649)
+++ runtime/lib/byte_array.cc (working copy)
@@ -46,7 +46,7 @@
#define SETTER(ArrayT, ObjectT, Getter, ValueT) \
SETTER_ARGUMENTS(ArrayT, ObjectT, ValueT); \
RangeCheck(array, index.Value() * sizeof(ValueT), sizeof(ValueT)); \
- ValueT value = value_object.Getter(); \
+ ValueT value = value_object.Getter(); \
array.SetAt(index.Value(), value);
@@ -62,10 +62,7 @@
SETTER_ARGUMENTS(ArrayT, ObjectT, ValueT); \
RangeCheck(array, index.Value(), sizeof(ValueT)); \
ValueT src = value_object.Getter(); \
- ByteArray::Copy(array, index.Value(), &src, sizeof(ValueT)); \
- Integer& result = Integer::Handle(); \
- result ^= Integer::New(index.Value() + sizeof(ValueT)); \
- arguments->SetReturn(result);
+ ByteArray::Copy(array, index.Value(), &src, sizeof(ValueT));
siva 2012/07/16 16:41:33 I think the setter methods of byte array need to r
regis 2012/07/16 18:05:34 Good point! I reverted the change here and instead
#define UINT64_TO_INTEGER(value, integer) \
@@ -124,10 +121,7 @@
RangeCheck(array, index.Value(), sizeof(uint64_t)); \
uint64_t value; \
INTEGER_TO_UINT64(value_object, value); \
- ByteArray::Copy(array, index.Value(), &value, sizeof(uint64_t)); \
- Integer& result = Integer::Handle(); \
- result ^= Integer::New(index.Value() + sizeof(uint64_t)); \
- arguments->SetReturn(result);
+ ByteArray::Copy(array, index.Value(), &value, sizeof(uint64_t));
siva 2012/07/16 16:41:33 Ditto.
regis 2012/07/16 18:05:34 Done.
DEFINE_NATIVE_ENTRY(ByteArray_getLength, 1) {

Powered by Google App Engine
This is Rietveld 408576698