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

Unified Diff: src/parser.cc

Issue 669240: - Remove function boilerplate objects and use SharedFunctionInfos in... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Committed Created 10 years, 9 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 | « src/objects-inl.h ('k') | src/prettyprinter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
===================================================================
--- src/parser.cc (revision 4210)
+++ src/parser.cc (working copy)
@@ -1964,20 +1964,19 @@
const int literals = fun->NumberOfLiterals();
Handle<Code> code = Handle<Code>(fun->shared()->code());
Handle<Code> construct_stub = Handle<Code>(fun->shared()->construct_stub());
- Handle<JSFunction> boilerplate =
- Factory::NewFunctionBoilerplate(name, literals, code);
- boilerplate->shared()->set_construct_stub(*construct_stub);
+ Handle<SharedFunctionInfo> shared =
+ Factory::NewSharedFunctionInfo(name, literals, code);
+ shared->set_construct_stub(*construct_stub);
// Copy the function data to the boilerplate.
- boilerplate->shared()->set_function_data(fun->shared()->function_data());
+ shared->set_function_data(fun->shared()->function_data());
int parameters = fun->shared()->formal_parameter_count();
- boilerplate->shared()->set_formal_parameter_count(parameters);
+ shared->set_formal_parameter_count(parameters);
// TODO(1240846): It's weird that native function declarations are
// introduced dynamically when we meet their declarations, whereas
// other functions are setup when entering the surrounding scope.
- FunctionBoilerplateLiteral* lit =
- NEW(FunctionBoilerplateLiteral(boilerplate));
+ SharedFunctionInfoLiteral* lit = NEW(SharedFunctionInfoLiteral(shared));
VariableProxy* var = Declare(name, Variable::VAR, NULL, true, CHECK_OK);
return NEW(ExpressionStatement(
new Assignment(Token::INIT_VAR, var, lit, RelocInfo::kNoPosition)));
« no previous file with comments | « src/objects-inl.h ('k') | src/prettyprinter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698