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

Unified Diff: src/builtins.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/bootstrapper.cc ('k') | src/compiler.h » ('j') | src/compiler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 9db223039fa3aa90cd5f4c8535733811af4d2186..41682bd57e1d8f46872571b19d15fe173767d805 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -175,12 +175,12 @@ Handle<Code> Builtins::GetCode(JavaScript id, bool* resolved) {
if (Top::context() != NULL) {
Object* object = Top::builtins()->javascript_builtin(id);
if (object->IsJSFunction()) {
- Handle<JSFunction> function(JSFunction::cast(object));
+ Handle<SharedFunctionInfo> shared(JSFunction::cast(object)->shared());
// Make sure the number of parameters match the formal parameter count.
- ASSERT(function->shared()->formal_parameter_count() ==
+ ASSERT(shared->formal_parameter_count() ==
Builtins::GetArgumentsCount(id));
- if (function->is_compiled() || CompileLazy(function, CLEAR_EXCEPTION)) {
- code = function->code();
+ if (EnsureCompiled(shared, CLEAR_EXCEPTION)) {
+ code = shared->code();
*resolved = true;
}
}
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compiler.h » ('j') | src/compiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698