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

Side by Side Diff: runtime/lib/byte_array.cc

Issue 10784020: Revert fix for type checking of void type, because some top level tests fail. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | runtime/lib/byte_array.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/exceptions.h" 8 #include "vm/exceptions.h"
9 #include "vm/native_entry.h" 9 #include "vm/native_entry.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 28 matching lines...) Expand all
39 #define GETTER(ArrayT, ObjectT, ValueT) \ 39 #define GETTER(ArrayT, ObjectT, ValueT) \
40 GETTER_ARGUMENTS(ArrayT, ValueT); \ 40 GETTER_ARGUMENTS(ArrayT, ValueT); \
41 RangeCheck(array, index.Value() * sizeof(ValueT), sizeof(ValueT)); \ 41 RangeCheck(array, index.Value() * sizeof(ValueT), sizeof(ValueT)); \
42 ValueT result = array.At(index.Value()); \ 42 ValueT result = array.At(index.Value()); \
43 arguments->SetReturn(ObjectT::Handle(ObjectT::New(result))); 43 arguments->SetReturn(ObjectT::Handle(ObjectT::New(result)));
44 44
45 45
46 #define SETTER(ArrayT, ObjectT, Getter, ValueT) \ 46 #define SETTER(ArrayT, ObjectT, Getter, ValueT) \
47 SETTER_ARGUMENTS(ArrayT, ObjectT, ValueT); \ 47 SETTER_ARGUMENTS(ArrayT, ObjectT, ValueT); \
48 RangeCheck(array, index.Value() * sizeof(ValueT), sizeof(ValueT)); \ 48 RangeCheck(array, index.Value() * sizeof(ValueT), sizeof(ValueT)); \
49 ValueT value = value_object.Getter(); \ 49 ValueT value = value_object.Getter(); \
50 array.SetAt(index.Value(), value); 50 array.SetAt(index.Value(), value);
51 51
52 52
53 #define UNALIGNED_GETTER(ArrayT, ObjectT, ValueT) \ 53 #define UNALIGNED_GETTER(ArrayT, ObjectT, ValueT) \
54 GETTER_ARGUMENTS(ArrayT, ValueT); \ 54 GETTER_ARGUMENTS(ArrayT, ValueT); \
55 RangeCheck(array, index.Value(), sizeof(ValueT)); \ 55 RangeCheck(array, index.Value(), sizeof(ValueT)); \
56 ValueT result; \ 56 ValueT result; \
57 ByteArray::Copy(&result, array, index.Value(), sizeof(ValueT)); \ 57 ByteArray::Copy(&result, array, index.Value(), sizeof(ValueT)); \
58 arguments->SetReturn(ObjectT::Handle(ObjectT::New(result))); 58 arguments->SetReturn(ObjectT::Handle(ObjectT::New(result)));
59 59
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_getIndexed, 2) { 619 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_getIndexed, 2) {
620 GETTER(ExternalFloat64Array, Double, double); 620 GETTER(ExternalFloat64Array, Double, double);
621 } 621 }
622 622
623 623
624 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_setIndexed, 3) { 624 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_setIndexed, 3) {
625 SETTER(ExternalFloat64Array, Double, value, double); 625 SETTER(ExternalFloat64Array, Double, value, double);
626 } 626 }
627 627
628 } // namespace dart 628 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | runtime/lib/byte_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698