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

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

Issue 1854713002: Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix mips64 Created 4 years, 8 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_S390 5 #if V8_TARGET_ARCH_S390
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 2581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2592 // by the vector above. 2592 // by the vector above.
2593 CallIC(ic); 2593 CallIC(ic);
2594 OperandStackDepthDecrement(arg_count + 1); 2594 OperandStackDepthDecrement(arg_count + 1);
2595 2595
2596 RecordJSReturnSite(expr); 2596 RecordJSReturnSite(expr);
2597 // Restore context register. 2597 // Restore context register.
2598 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2598 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2599 context()->DropAndPlug(1, r2); 2599 context()->DropAndPlug(1, r2);
2600 } 2600 }
2601 2601
2602 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { 2602 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) {
2603 int arg_count = expr->arguments()->length();
2603 // r6: copy of the first argument or undefined if it doesn't exist. 2604 // r6: copy of the first argument or undefined if it doesn't exist.
2604 if (arg_count > 0) { 2605 if (arg_count > 0) {
2605 __ LoadP(r6, MemOperand(sp, arg_count * kPointerSize), r0); 2606 __ LoadP(r6, MemOperand(sp, arg_count * kPointerSize), r0);
2606 } else { 2607 } else {
2607 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex); 2608 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex);
2608 } 2609 }
2609 2610
2610 // r5: the receiver of the enclosing function. 2611 // r5: the receiver of the enclosing function.
2611 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 2612 __ LoadP(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
2612 2613
2613 // r4: language mode. 2614 // r4: language mode.
2614 __ LoadSmiLiteral(r4, Smi::FromInt(language_mode())); 2615 __ LoadSmiLiteral(r4, Smi::FromInt(language_mode()));
2615 2616
2616 // r3: the start position of the scope the calls resides in. 2617 // r3: the start position of the scope the calls resides in.
2617 __ LoadSmiLiteral(r3, Smi::FromInt(scope()->start_position())); 2618 __ LoadSmiLiteral(r3, Smi::FromInt(expr->position()));
2618 2619
2619 // Do the runtime call. 2620 // Do the runtime call.
2620 __ Push(r6, r5, r4, r3); 2621 __ Push(r6, r5, r4, r3);
2621 __ CallRuntime(Runtime::kResolvePossiblyDirectEval); 2622 __ CallRuntime(Runtime::kResolvePossiblyDirectEval);
2622 } 2623 }
2623 2624
2624 // See http://www.ecma-international.org/ecma-262/6.0/#sec-function-calls. 2625 // See http://www.ecma-international.org/ecma-262/6.0/#sec-function-calls.
2625 void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) { 2626 void FullCodeGenerator::PushCalleeAndWithBaseObject(Call* expr) {
2626 VariableProxy* callee = expr->expression()->AsVariableProxy(); 2627 VariableProxy* callee = expr->expression()->AsVariableProxy();
2627 if (callee->var()->IsLookupSlot()) { 2628 if (callee->var()->IsLookupSlot()) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
2673 2674
2674 // Push the arguments. 2675 // Push the arguments.
2675 for (int i = 0; i < arg_count; i++) { 2676 for (int i = 0; i < arg_count; i++) {
2676 VisitForStackValue(args->at(i)); 2677 VisitForStackValue(args->at(i));
2677 } 2678 }
2678 2679
2679 // Push a copy of the function (found below the arguments) and 2680 // Push a copy of the function (found below the arguments) and
2680 // resolve eval. 2681 // resolve eval.
2681 __ LoadP(r3, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); 2682 __ LoadP(r3, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
2682 __ push(r3); 2683 __ push(r3);
2683 EmitResolvePossiblyDirectEval(arg_count); 2684 EmitResolvePossiblyDirectEval(expr);
2684 2685
2685 // Touch up the stack with the resolved function. 2686 // Touch up the stack with the resolved function.
2686 __ StoreP(r2, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); 2687 __ StoreP(r2, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
2687 2688
2688 PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS); 2689 PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS);
2689 2690
2690 // Record source position for debugger. 2691 // Record source position for debugger.
2691 SetCallPosition(expr); 2692 SetCallPosition(expr);
2692 __ LoadP(r3, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); 2693 __ LoadP(r3, MemOperand(sp, (arg_count + 1) * kPointerSize), r0);
2693 __ mov(r2, Operand(arg_count)); 2694 __ mov(r2, Operand(arg_count));
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
3971 DCHECK(kOSRBranchInstruction == br_instr); 3972 DCHECK(kOSRBranchInstruction == br_instr);
3972 3973
3973 DCHECK(interrupt_address == 3974 DCHECK(interrupt_address ==
3974 isolate->builtins()->OnStackReplacement()->entry()); 3975 isolate->builtins()->OnStackReplacement()->entry());
3975 return ON_STACK_REPLACEMENT; 3976 return ON_STACK_REPLACEMENT;
3976 } 3977 }
3977 3978
3978 } // namespace internal 3979 } // namespace internal
3979 } // namespace v8 3980 } // namespace v8
3980 #endif // V8_TARGET_ARCH_S390 3981 #endif // V8_TARGET_ARCH_S390
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698