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

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

Issue 1711863002: [es6] Fixed POSSIBLY_EVAL_CALL tail calls handling in Full codegen. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | test/mjsunit/es6/tail-call-megatest.js » ('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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 EmitResolvePossiblyDirectEval(arg_count); 2731 EmitResolvePossiblyDirectEval(arg_count);
2732 2732
2733 // Touch up the stack with the resolved function. 2733 // Touch up the stack with the resolved function.
2734 __ mov(Operand(esp, (arg_count + 1) * kPointerSize), eax); 2734 __ mov(Operand(esp, (arg_count + 1) * kPointerSize), eax);
2735 2735
2736 PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS); 2736 PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
2737 2737
2738 SetCallPosition(expr); 2738 SetCallPosition(expr);
2739 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); 2739 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
2740 __ Set(eax, arg_count); 2740 __ Set(eax, arg_count);
2741 __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); 2741 __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kAny,
2742 expr->tail_call_mode()),
2743 RelocInfo::CODE_TARGET);
2742 RecordJSReturnSite(expr); 2744 RecordJSReturnSite(expr);
2743 // Restore context register. 2745 // Restore context register.
2744 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 2746 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
2745 context()->DropAndPlug(1, eax); 2747 context()->DropAndPlug(1, eax);
2746 } 2748 }
2747 2749
2748 2750
2749 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2751 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
2750 Comment cmnt(masm_, "[ CallNew"); 2752 Comment cmnt(masm_, "[ CallNew");
2751 // According to ECMA-262, section 11.2.2, page 44, the function 2753 // According to ECMA-262, section 11.2.2, page 44, the function
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after
4417 Assembler::target_address_at(call_target_address, 4419 Assembler::target_address_at(call_target_address,
4418 unoptimized_code)); 4420 unoptimized_code));
4419 return OSR_AFTER_STACK_CHECK; 4421 return OSR_AFTER_STACK_CHECK;
4420 } 4422 }
4421 4423
4422 4424
4423 } // namespace internal 4425 } // namespace internal
4424 } // namespace v8 4426 } // namespace v8
4425 4427
4426 #endif // V8_TARGET_ARCH_X87 4428 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | test/mjsunit/es6/tail-call-megatest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698