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

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

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Support for CS and TF compilers added Created 4 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 unified diff | Download patch
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.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopeinfo.h" 10 #include "src/ast/scopeinfo.h"
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 } 1413 }
1414 1414
1415 1415
1416 void FullCodeGenerator::VisitCall(Call* expr) { 1416 void FullCodeGenerator::VisitCall(Call* expr) {
1417 #ifdef DEBUG 1417 #ifdef DEBUG
1418 // We want to verify that RecordJSReturnSite gets called on all paths 1418 // We want to verify that RecordJSReturnSite gets called on all paths
1419 // through this function. Avoid early returns. 1419 // through this function. Avoid early returns.
1420 expr->return_is_recorded_ = false; 1420 expr->return_is_recorded_ = false;
1421 #endif 1421 #endif
1422 1422
1423 Comment cmnt(masm_, "[ Call"); 1423 Comment cmnt(masm_, (expr->tail_call_mode() == TailCallMode::kAllow)
1424 ? "[ TailCall"
1425 : "[ Call");
1424 Expression* callee = expr->expression(); 1426 Expression* callee = expr->expression();
1425 Call::CallType call_type = expr->GetCallType(isolate()); 1427 Call::CallType call_type = expr->GetCallType(isolate());
1426 1428
1427 switch (call_type) { 1429 switch (call_type) {
1428 case Call::POSSIBLY_EVAL_CALL: 1430 case Call::POSSIBLY_EVAL_CALL:
1429 EmitPossiblyEvalCall(expr); 1431 EmitPossiblyEvalCall(expr);
1430 break; 1432 break;
1431 case Call::GLOBAL_CALL: 1433 case Call::GLOBAL_CALL:
1432 EmitCallWithLoadIC(expr); 1434 EmitCallWithLoadIC(expr);
1433 break; 1435 break;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || 1732 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() ||
1731 var->initializer_position() >= proxy->position(); 1733 var->initializer_position() >= proxy->position();
1732 } 1734 }
1733 1735
1734 1736
1735 #undef __ 1737 #undef __
1736 1738
1737 1739
1738 } // namespace internal 1740 } // namespace internal
1739 } // namespace v8 1741 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698