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

Unified Diff: runtime/lib/object.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/mirrors.cc ('k') | runtime/lib/regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/object.cc
===================================================================
--- runtime/lib/object.cc (revision 14922)
+++ runtime/lib/object.cc (working copy)
@@ -11,16 +11,17 @@
namespace dart {
DEFINE_NATIVE_ENTRY(Object_toString, 1) {
- const Instance& instance = Instance::CheckedHandle(arguments->At(0));
+ const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
const char* c_str = instance.ToCString();
return String::New(c_str);
}
DEFINE_NATIVE_ENTRY(Object_noSuchMethod, 3) {
- const Instance& instance = Instance::CheckedHandle(arguments->At(0));
- GET_NATIVE_ARGUMENT(String, function_name, arguments->At(1));
- GET_NATIVE_ARGUMENT(Array, func_args, arguments->At(2));
+ const Instance& instance =
+ Instance::CheckedHandle(arguments->NativeArgAt(0));
+ GET_NATIVE_ARGUMENT(String, function_name, arguments->NativeArgAt(1));
+ GET_NATIVE_ARGUMENT(Array, func_args, arguments->NativeArgAt(2));
if (instance.IsNull()) {
GrowableArray<const Object*> args;
args.Add(&function_name);
@@ -59,14 +60,15 @@
DEFINE_NATIVE_ENTRY(Object_runtimeType, 1) {
- const Instance& instance = Instance::CheckedHandle(arguments->At(0));
+ const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
const Type& type = Type::Handle(instance.GetType());
return type.Canonicalize();
}
DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) {
- const AbstractType& type = AbstractType::CheckedHandle(arguments->At(0));
+ const AbstractType& type =
+ AbstractType::CheckedHandle(arguments->NativeArgAt(0));
return type.Name();
}
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/lib/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698