| 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 "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
| 10 #include "vm/exceptions.h" | 10 #include "vm/exceptions.h" |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 DEFINE_NATIVE_ENTRY(Bigint_getDigits, 1) { | 434 DEFINE_NATIVE_ENTRY(Bigint_getDigits, 1) { |
| 435 const Bigint& bigint = Bigint::CheckedHandle(arguments->NativeArgAt(0)); | 435 const Bigint& bigint = Bigint::CheckedHandle(arguments->NativeArgAt(0)); |
| 436 return bigint.digits(); | 436 return bigint.digits(); |
| 437 } | 437 } |
| 438 | 438 |
| 439 | 439 |
| 440 DEFINE_NATIVE_ENTRY(Bigint_setDigits, 2) { | 440 DEFINE_NATIVE_ENTRY(Bigint_setDigits, 2) { |
| 441 const Bigint& bigint = Bigint::CheckedHandle(arguments->NativeArgAt(0)); | 441 const Bigint& bigint = Bigint::CheckedHandle(arguments->NativeArgAt(0)); |
| 442 const TypedData& digits = TypedData::CheckedHandle(arguments->NativeArgAt(1)); | 442 const TypedData& digits = TypedData::CheckedHandle(arguments->NativeArgAt(1)); |
| 443 ASSERT(!digits.IsNull()); |
| 443 bigint.set_digits(digits); | 444 bigint.set_digits(digits); |
| 444 return Object::null(); | 445 return Object::null(); |
| 445 } | 446 } |
| 446 | 447 |
| 447 | 448 |
| 448 DEFINE_NATIVE_ENTRY(Bigint_allocate, 1) { | 449 DEFINE_NATIVE_ENTRY(Bigint_allocate, 1) { |
| 449 // Argument is null type arguments, since class Bigint is not parameterized. | 450 // Argument is null type arguments, since class Bigint is not parameterized. |
| 450 return Bigint::New(); | 451 return Bigint::New(); |
| 451 } | 452 } |
| 452 | 453 |
| 453 } // namespace dart | 454 } // namespace dart |
| OLD | NEW |