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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1414883011: Remove receiver conversion from function prologue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 1 month 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/compiler/ast-graph-builder.h ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index d8b7546529ad172c38f99a77704d4c498c3333a3..fd395633e8a61767b414866414725103d29498c7 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -526,14 +526,6 @@ bool AstGraphBuilder::CreateGraph(bool stack_check) {
env.RawParameterBind(0, jsgraph()->TheHoleConstant());
}
- // Build receiver check for sloppy mode if necessary.
- // TODO(mstarzinger/verwaest): Should this be moved back into the CallIC?
- if (scope->has_this_declaration()) {
- Node* original_receiver = env.RawParameterLookup(0);
- Node* patched_receiver = BuildPatchReceiverToGlobalProxy(original_receiver);
- env.RawParameterBind(0, patched_receiver);
- }
-
// Build local context only if there are context allocated variables.
if (info()->num_heap_slots() > 0) {
// Push a new inner context scope for the current activation.
@@ -3112,28 +3104,6 @@ Node* AstGraphBuilder::ProcessArguments(const Operator* op, int arity) {
}
-Node* AstGraphBuilder::BuildPatchReceiverToGlobalProxy(Node* receiver) {
- // Sloppy mode functions and builtins need to replace the receiver with the
- // global proxy when called as functions (without an explicit receiver
- // object). Otherwise there is nothing left to do here.
- if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
- IfBuilder receiver_check(this);
- Node* undefined = jsgraph()->UndefinedConstant();
- Node* check = NewNode(javascript()->StrictEqual(), receiver, undefined);
- receiver_check.If(check);
- receiver_check.Then();
- Node* proxy = BuildLoadGlobalProxy();
- environment()->Push(proxy);
- receiver_check.Else();
- environment()->Push(receiver);
- receiver_check.End();
- return environment()->Pop();
- } else {
- return receiver;
- }
-}
-
-
Node* AstGraphBuilder::BuildLocalActivationContext(Node* context) {
Scope* scope = info()->scope();
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698