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

Unified Diff: runtime/lib/math.cc

Issue 11293290: Fix native argument handling (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/lib/mirrors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/math.cc
===================================================================
--- runtime/lib/math.cc (revision 14922)
+++ runtime/lib/math.cc (working copy)
@@ -17,53 +17,53 @@
namespace dart {
DEFINE_NATIVE_ENTRY(MathNatives_sqrt, 1) {
- GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+ GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
return Double::New(sqrt(operand.value()));
}
DEFINE_NATIVE_ENTRY(MathNatives_sin, 1) {
- GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+ GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
return Double::New(sin(operand.value()));
}
DEFINE_NATIVE_ENTRY(MathNatives_cos, 1) {
- GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+ GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
return Double::New(cos(operand.value()));
}
DEFINE_NATIVE_ENTRY(MathNatives_tan, 1) {
- GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+ GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
return Double::New(tan(operand.value()));
}
DEFINE_NATIVE_ENTRY(MathNatives_asin, 1) {
- GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+ GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
return Double::New(asin(operand.value()));
}
DEFINE_NATIVE_ENTRY(MathNatives_acos, 1) {
- GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+ GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
return Double::New(acos(operand.value()));
}
DEFINE_NATIVE_ENTRY(MathNatives_atan, 1) {
- GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+ GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
return Double::New(atan(operand.value()));
}
DEFINE_NATIVE_ENTRY(MathNatives_atan2, 2) {
- GET_NATIVE_ARGUMENT(Double, operand1, arguments->At(0));
- GET_NATIVE_ARGUMENT(Double, operand2, arguments->At(1));
+ GET_NATIVE_ARGUMENT(Double, operand1, arguments->NativeArgAt(0));
+ GET_NATIVE_ARGUMENT(Double, operand2, arguments->NativeArgAt(1));
return Double::New(atan2(operand1.value(), operand2.value()));
}
DEFINE_NATIVE_ENTRY(MathNatives_exp, 1) {
- GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+ GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
return Double::New(exp(operand.value()));
}
DEFINE_NATIVE_ENTRY(MathNatives_log, 1) {
- GET_NATIVE_ARGUMENT(Double, operand, arguments->At(0));
+ GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
return Double::New(log(operand.value()));
}
@@ -103,7 +103,7 @@
DEFINE_NATIVE_ENTRY(MathNatives_parseInt, 1) {
- GET_NATIVE_ARGUMENT(String, value, arguments->At(0));
+ GET_NATIVE_ARGUMENT(String, value, arguments->NativeArgAt(0));
const String& dummy_key = String::Handle(Symbols::Empty());
Scanner scanner(value, dummy_key);
const Scanner::GrowableTokenStream& tokens = scanner.GetStream();
@@ -128,7 +128,7 @@
DEFINE_NATIVE_ENTRY(MathNatives_parseDouble, 1) {
- GET_NATIVE_ARGUMENT(String, value, arguments->At(0));
+ GET_NATIVE_ARGUMENT(String, value, arguments->NativeArgAt(0));
const String& dummy_key = String::Handle(Symbols::Empty());
Scanner scanner(value, dummy_key);
const Scanner::GrowableTokenStream& tokens = scanner.GetStream();
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/lib/mirrors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698