| OLD | NEW |
| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 ByteArray& dst = ByteArray::CheckedHandle(arguments->At(0)); | 259 ByteArray& dst = ByteArray::CheckedHandle(arguments->At(0)); |
| 260 GET_NATIVE_ARGUMENT(Smi, dst_start, arguments->At(1)); | 260 GET_NATIVE_ARGUMENT(Smi, dst_start, arguments->At(1)); |
| 261 GET_NATIVE_ARGUMENT(Smi, length, arguments->At(2)); | 261 GET_NATIVE_ARGUMENT(Smi, length, arguments->At(2)); |
| 262 GET_NATIVE_ARGUMENT(ByteArray, src, arguments->At(3)); | 262 GET_NATIVE_ARGUMENT(ByteArray, src, arguments->At(3)); |
| 263 GET_NATIVE_ARGUMENT(Smi, src_start, arguments->At(4)); | 263 GET_NATIVE_ARGUMENT(Smi, src_start, arguments->At(4)); |
| 264 intptr_t length_value = length.Value(); | 264 intptr_t length_value = length.Value(); |
| 265 intptr_t src_start_value = src_start.Value(); | 265 intptr_t src_start_value = src_start.Value(); |
| 266 intptr_t dst_start_value = dst_start.Value(); | 266 intptr_t dst_start_value = dst_start.Value(); |
| 267 if (length_value < 0) { | 267 if (length_value < 0) { |
| 268 const String& error = String::Handle(String::NewFormatted( | 268 const String& error = String::Handle(String::NewFormatted( |
| 269 "length (%ld) must be non-negative", index)); | 269 "length (%ld) must be non-negative", length_value)); |
| 270 GrowableArray<const Object*> args; | 270 GrowableArray<const Object*> args; |
| 271 args.Add(&error); | 271 args.Add(&error); |
| 272 Exceptions::ThrowByType(Exceptions::kIllegalArgument, args); | 272 Exceptions::ThrowByType(Exceptions::kIllegalArgument, args); |
| 273 } | 273 } |
| 274 RangeCheck(src, src_start_value, length_value); | 274 RangeCheck(src, src_start_value, length_value); |
| 275 RangeCheck(dst, dst_start_value, length_value); | 275 RangeCheck(dst, dst_start_value, length_value); |
| 276 ByteArray::Copy(dst, dst_start_value, src, src_start_value, length_value); | 276 ByteArray::Copy(dst, dst_start_value, src, src_start_value, length_value); |
| 277 } | 277 } |
| 278 | 278 |
| 279 | 279 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_getIndexed, 2) { | 600 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_getIndexed, 2) { |
| 601 GETTER(ExternalFloat64Array, Double, double); | 601 GETTER(ExternalFloat64Array, Double, double); |
| 602 } | 602 } |
| 603 | 603 |
| 604 | 604 |
| 605 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_setIndexed, 3) { | 605 DEFINE_NATIVE_ENTRY(ExternalFloat64Array_setIndexed, 3) { |
| 606 SETTER(ExternalFloat64Array, Double, value, double); | 606 SETTER(ExternalFloat64Array, Double, value, double); |
| 607 } | 607 } |
| 608 | 608 |
| 609 } // namespace dart | 609 } // namespace dart |
| OLD | NEW |