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

Unified Diff: src/bootstrapper.cc

Issue 551189: Propagate receiver from initial call site to code generator. (Closed)
Patch Set: Created 10 years, 11 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/accessors.cc ('k') | src/builtins.cc » ('j') | src/compiler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 9eacf57a7138435f3150de93b8f3a2f5e56c14b5..c7bfcce37d8195e378225956bf8a6b2202691019 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -249,26 +249,24 @@ bool PendingFixups::Process(Handle<JSBuiltinsObject> builtins) {
V8_Fatal(__FILE__, __LINE__, "Cannot resolve call to builtin %s", name);
}
#endif
- Handle<JSFunction> f = Handle<JSFunction>(JSFunction::cast(o));
+ Handle<SharedFunctionInfo> shared(JSFunction::cast(o)->shared());
// Make sure the number of parameters match the formal parameter count.
int argc = Bootstrapper::FixupFlagsArgumentsCount::decode(flags);
USE(argc);
- ASSERT(f->shared()->formal_parameter_count() == argc);
- if (!f->is_compiled()) {
- // Do lazy compilation and check for stack overflows.
- if (!CompileLazy(f, CLEAR_EXCEPTION)) {
- Clear();
- return false;
- }
+ ASSERT(shared->formal_parameter_count() == argc);
+ // Do lazy compilation if necessary and check for stack overflows.
+ if (!EnsureCompiled(shared, CLEAR_EXCEPTION)) {
+ Clear();
+ return false;
}
Code* code = Code::cast(code_[i]);
Address pc = code->instruction_start() + pc_[i];
RelocInfo target(pc, RelocInfo::CODE_TARGET, 0);
bool use_code_object = Bootstrapper::FixupFlagsUseCodeObject::decode(flags);
if (use_code_object) {
- target.set_target_object(f->code());
+ target.set_target_object(shared->code());
} else {
- target.set_target_address(f->code()->instruction_start());
+ target.set_target_address(shared->code()->instruction_start());
}
LOG(StringEvent("resolved", name));
}
« no previous file with comments | « src/accessors.cc ('k') | src/builtins.cc » ('j') | src/compiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698