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

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

Issue 11471014: Fix failures in byte array tests, reenabled test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 | « no previous file | 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 uint8_t* bytes = OS::AllocateAlignedArray<uint8_t>( 360 uint8_t* bytes = OS::AllocateAlignedArray<uint8_t>(
361 len, 361 len,
362 ExternalByteArrayData<uint8_t>::kAlignment); 362 ExternalByteArrayData<uint8_t>::kAlignment);
363 return ExternalUint8ClampedArray::New(bytes, 363 return ExternalUint8ClampedArray::New(bytes,
364 len, 364 len,
365 bytes, 365 bytes,
366 OS::AlignedFree); 366 OS::AlignedFree);
367 } 367 }
368 368
369 369
370 DEFINE_NATIVE_ENTRY(Uint8ClampedArray_getIndexed, 2) {
371 GETTER(Uint8ClampedArray, Smi, uint8_t);
372 }
373
374
375 DEFINE_NATIVE_ENTRY(Uint8ClampedArray_setIndexed, 3) {
376 SETTER(Uint8ClampedArray, Smi, Value, uint8_t);
377 }
378
379
370 // Int16Array 380 // Int16Array
371 381
372 DEFINE_NATIVE_ENTRY(Int16Array_new, 1) { 382 DEFINE_NATIVE_ENTRY(Int16Array_new, 1) {
373 GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0)); 383 GET_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
374 intptr_t len = length.Value(); 384 intptr_t len = length.Value();
375 LengthCheck(len, Int16Array::kMaxElements); 385 LengthCheck(len, Int16Array::kMaxElements);
376 return Int16Array::New(len); 386 return Int16Array::New(len);
377 } 387 }
378 388
379 389
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_getIndexed, 2) { 762 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_getIndexed, 2) {
753 GETTER(ExternalFloat64Array, Double, double); 763 GETTER(ExternalFloat64Array, Double, double);
754 } 764 }
755 765
756 766
757 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_setIndexed, 3) { 767 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_setIndexed, 3) {
758 SETTER(ExternalFloat64Array, Double, value, double); 768 SETTER(ExternalFloat64Array, Double, value, double);
759 } 769 }
760 770
761 } // namespace dart 771 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/byte_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698