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

Unified Diff: runtime/vm/native_arguments.h

Issue 25136002: Rename NativeReceiver to NativeArg0 as this method is used not necessarily (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months 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/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_arguments.h
===================================================================
--- runtime/vm/native_arguments.h (revision 28028)
+++ runtime/vm/native_arguments.h (working copy)
@@ -97,9 +97,14 @@
return ArgCount() - NumHiddenArgs(function_bits);
}
- RawObject* NativeReceiver() const {
- ASSERT(ToInstanceFunction());
- return NativeArg0();
+ RawObject* NativeArg0() const {
+ int function_bits = FunctionBits::decode(argc_tag_);
+ if (function_bits == (kClosureFunctionBit | kInstanceFunctionBit)) {
+ // Retrieve the receiver from the context.
+ const Context& context = Context::Handle(isolate_->top_context());
+ return context.At(0);
+ }
+ return ArgAt(NumHiddenArgs(function_bits));
}
RawObject* NativeArgAt(int index) const {
@@ -201,16 +206,6 @@
return 0;
}
- RawObject* NativeArg0() const {
- int function_bits = FunctionBits::decode(argc_tag_);
- if (function_bits == (kClosureFunctionBit | kInstanceFunctionBit)) {
- // Retrieve the receiver from the context.
- const Context& context = Context::Handle(isolate_->top_context());
- return context.At(0);
- }
- return ArgAt(NumHiddenArgs(function_bits));
- }
-
Isolate* isolate_; // Current isolate pointer.
int argc_tag_; // Encodes argument count and invoked native call type.
RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call.
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698