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

Unified Diff: src/apiutils.h

Issue 4117010: Refactoring of v8:Arguments (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 2 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 | « include/v8.h ('k') | src/arguments.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/apiutils.h
===================================================================
--- src/apiutils.h (revision 5743)
+++ src/apiutils.h (working copy)
@@ -29,7 +29,6 @@
#define V8_APIUTILS_H_
namespace v8 {
-
class ImplementationUtilities {
public:
static v8::Handle<v8::Primitive> Undefined();
@@ -45,14 +44,23 @@
return that->names_;
}
- static v8::Arguments NewArguments(Local<Value> data,
- Local<Object> holder,
- Local<Function> callee,
- bool is_construct_call,
- void** argv, int argc) {
- return v8::Arguments(data, holder, callee, is_construct_call, argv, argc);
+ // Packs additional parameters for the NewArguments function. |implicit_args|
+ // is a pointer to the last element of 3-elements array controlled by GC.
+ static void PrepareArgumentsData(internal::Object** implicit_args,
+ internal::Object* data,
+ internal::JSFunction* callee,
+ internal::Object* holder) {
+ implicit_args[v8::Arguments::kDataIndex] = data;
+ implicit_args[v8::Arguments::kCalleeIndex] = callee;
+ implicit_args[v8::Arguments::kHolderIndex] = holder;
}
+ static v8::Arguments NewArguments(internal::Object** implicit_args,
+ internal::Object** argv, int argc,
+ bool is_construct_call) {
+ return v8::Arguments(implicit_args, argv, argc, is_construct_call);
+ }
+
// Introduce an alias for the handle scope data to allow non-friends
// to access the HandleScope data.
typedef v8::HandleScope::Data HandleScopeData;
« no previous file with comments | « include/v8.h ('k') | src/arguments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698