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

Unified Diff: src/accessors.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 | « no previous file | src/bootstrapper.cc » ('j') | src/compiler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 56cf135981a08828a1f847dfd5c4536bf58697de..5a029285e85fc16dfa95c9f8b7f34793e82b0ec1 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -493,11 +493,11 @@ Object* Accessors::FunctionGetLength(Object* object, void*) {
// If the function isn't compiled yet, the length is not computed
// correctly yet. Compile it now and return the right length.
HandleScope scope;
- Handle<JSFunction> function_handle(function);
- if (!CompileLazy(function_handle, KEEP_EXCEPTION)) {
+ Handle<SharedFunctionInfo> shared(function->shared());
+ if (!CompileLazyShared(shared, KEEP_EXCEPTION)) {
return Failure::Exception();
}
- return Smi::FromInt(function_handle->shared()->length());
+ return Smi::FromInt(shared->length());
} else {
return Smi::FromInt(function->shared()->length());
}
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/compiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698