| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 <math.h> | 5 #include <math.h> |
| 6 | 6 |
| 7 #include "vm/bootstrap_natives.h" | 7 #include "vm/bootstrap_natives.h" |
| 8 | 8 |
| 9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
| 10 #include "vm/exceptions.h" | 10 #include "vm/exceptions.h" |
| 11 #include "vm/native_entry.h" | 11 #include "vm/native_entry.h" |
| 12 #include "vm/object.h" | 12 #include "vm/object.h" |
| 13 | 13 |
| 14 namespace dart { | 14 namespace dart { |
| 15 | 15 |
| 16 DEFINE_NATIVE_ENTRY(Double_doubleFromInteger, 2) { | 16 DEFINE_NATIVE_ENTRY(Double_doubleFromInteger, 2) { |
| 17 ASSERT(TypeArguments::CheckedHandle(arguments->At(0)).IsNull()); | 17 ASSERT(AbstractTypeArguments::CheckedHandle(arguments->At(0)).IsNull()); |
| 18 const Integer& value = Integer::CheckedHandle(arguments->At(1)); | 18 const Integer& value = Integer::CheckedHandle(arguments->At(1)); |
| 19 const Double& result = Double::Handle(Double::New(value.AsDoubleValue())); | 19 const Double& result = Double::Handle(Double::New(value.AsDoubleValue())); |
| 20 arguments->SetReturn(result); | 20 arguments->SetReturn(result); |
| 21 } | 21 } |
| 22 | 22 |
| 23 | 23 |
| 24 DEFINE_NATIVE_ENTRY(Double_add, 2) { | 24 DEFINE_NATIVE_ENTRY(Double_add, 2) { |
| 25 double left = Double::CheckedHandle(arguments->At(0)).value(); | 25 double left = Double::CheckedHandle(arguments->At(0)).value(); |
| 26 GET_NATIVE_ARGUMENT(Double, right_object, arguments->At(1)); | 26 GET_NATIVE_ARGUMENT(Double, right_object, arguments->At(1)); |
| 27 double right = right_object.value(); | 27 double right = right_object.value(); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 arguments->SetReturn(Bool::Handle(Bool::True())); | 211 arguments->SetReturn(Bool::Handle(Bool::True())); |
| 212 } else { | 212 } else { |
| 213 arguments->SetReturn(Bool::Handle(Bool::False())); | 213 arguments->SetReturn(Bool::Handle(Bool::False())); |
| 214 } | 214 } |
| 215 } | 215 } |
| 216 | 216 |
| 217 // Add here only functions using/referring to old-style casts. | 217 // Add here only functions using/referring to old-style casts. |
| 218 | 218 |
| 219 } // namespace dart | 219 } // namespace dart |
| 220 | 220 |
| OLD | NEW |