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

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 2487483004: Only treat possible eval calls going through 'with' as special. (Closed)
Patch Set: Fix AstGraphBuilder Created 4 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 unified diff | Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast/ast-numbering.h" 7 #include "src/ast/ast-numbering.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 #endif 1662 #endif
1663 1663
1664 Comment cmnt(masm_, (expr->tail_call_mode() == TailCallMode::kAllow) 1664 Comment cmnt(masm_, (expr->tail_call_mode() == TailCallMode::kAllow)
1665 ? "[ TailCall" 1665 ? "[ TailCall"
1666 : "[ Call"); 1666 : "[ Call");
1667 Expression* callee = expr->expression(); 1667 Expression* callee = expr->expression();
1668 Call::CallType call_type = expr->GetCallType(); 1668 Call::CallType call_type = expr->GetCallType();
1669 1669
1670 switch (call_type) { 1670 switch (call_type) {
1671 case Call::POSSIBLY_EVAL_CALL: 1671 case Call::POSSIBLY_EVAL_CALL:
1672 case Call::POSSIBLY_EVAL_THROUGH_WITH_CALL:
Toon Verwaest 2016/11/09 14:13:08 Shouldn't POSSIBLY_EVAL_CALL be moved to OTHER_CAL
rmcilroy 2016/11/09 17:02:29 Nope because we also need to resolve the eval func
Toon Verwaest 2016/11/10 09:40:19 I see. But it is still relevant in the ast-graph-b
1672 EmitPossiblyEvalCall(expr); 1673 EmitPossiblyEvalCall(expr);
1673 break; 1674 break;
1674 case Call::GLOBAL_CALL: 1675 case Call::GLOBAL_CALL:
1675 EmitCallWithLoadIC(expr); 1676 EmitCallWithLoadIC(expr);
1676 break; 1677 break;
1677 case Call::WITH_CALL: 1678 case Call::WITH_CALL:
1678 // Call to a lookup slot looked up through a with scope. 1679 // Call to a lookup slot looked up through a with scope.
1679 PushCalleeAndWithBaseObject(expr); 1680 PushCalleeAndWithBaseObject(expr);
1680 EmitCall(expr); 1681 EmitCall(expr);
1681 break; 1682 break;
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 return info_->has_simple_parameters(); 1992 return info_->has_simple_parameters();
1992 } 1993 }
1993 1994
1994 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } 1995 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); }
1995 1996
1996 #undef __ 1997 #undef __
1997 1998
1998 1999
1999 } // namespace internal 2000 } // namespace internal
2000 } // namespace v8 2001 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698