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

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

Issue 1894953004: Add HasProperty code stub that tries simple lookups or jumps to runtime otherwise. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 int32_t arg_count = info_->scope()->num_parameters() + 1; 447 int32_t arg_count = info_->scope()->num_parameters() + 1;
448 int32_t sp_delta = arg_count * kPointerSize; 448 int32_t sp_delta = arg_count * kPointerSize;
449 SetReturnPosition(literal()); 449 SetReturnPosition(literal());
450 __ LeaveFrame(StackFrame::JAVA_SCRIPT, sp_delta); 450 __ LeaveFrame(StackFrame::JAVA_SCRIPT, sp_delta);
451 451
452 __ Ret(); 452 __ Ret();
453 } 453 }
454 } 454 }
455 } 455 }
456 456
457 void FullCodeGenerator::RestoreContext() {
Toon Verwaest 2016/04/20 10:00:04 What about using this helper for the other lines t
Igor Sheludko 2016/04/20 13:14:56 Done.
458 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
459 }
460
457 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { 461 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const {
458 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 462 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
459 codegen()->GetVar(result_register(), var); 463 codegen()->GetVar(result_register(), var);
460 codegen()->PushOperand(result_register()); 464 codegen()->PushOperand(result_register());
461 } 465 }
462 466
463 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const {} 467 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const {}
464 468
465 void FullCodeGenerator::AccumulatorValueContext::Plug( 469 void FullCodeGenerator::AccumulatorValueContext::Plug(
466 Heap::RootListIndex index) const { 470 Heap::RootListIndex index) const {
(...skipping 3149 matching lines...) Expand 10 before | Expand all | Expand 10 after
3616 Label* if_false = NULL; 3620 Label* if_false = NULL;
3617 Label* fall_through = NULL; 3621 Label* fall_through = NULL;
3618 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, 3622 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3619 &if_false, &fall_through); 3623 &if_false, &fall_through);
3620 3624
3621 Token::Value op = expr->op(); 3625 Token::Value op = expr->op();
3622 VisitForStackValue(expr->left()); 3626 VisitForStackValue(expr->left());
3623 switch (op) { 3627 switch (op) {
3624 case Token::IN: 3628 case Token::IN:
3625 VisitForStackValue(expr->right()); 3629 VisitForStackValue(expr->right());
3626 CallRuntimeWithOperands(Runtime::kHasProperty); 3630 EmitInExpression();
3627 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 3631 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
3628 __ CompareRoot(r2, Heap::kTrueValueRootIndex); 3632 __ CompareRoot(r2, Heap::kTrueValueRootIndex);
3629 Split(eq, if_true, if_false, fall_through); 3633 Split(eq, if_true, if_false, fall_through);
3630 break; 3634 break;
3631 3635
3632 case Token::INSTANCEOF: { 3636 case Token::INSTANCEOF: {
3633 VisitForAccumulatorValue(expr->right()); 3637 VisitForAccumulatorValue(expr->right());
3634 PopOperand(r3); 3638 PopOperand(r3);
3635 InstanceOfStub stub(isolate()); 3639 InstanceOfStub stub(isolate());
3636 __ CallStub(&stub); 3640 __ CallStub(&stub);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
3870 DCHECK(kOSRBranchInstruction == br_instr); 3874 DCHECK(kOSRBranchInstruction == br_instr);
3871 3875
3872 DCHECK(interrupt_address == 3876 DCHECK(interrupt_address ==
3873 isolate->builtins()->OnStackReplacement()->entry()); 3877 isolate->builtins()->OnStackReplacement()->entry());
3874 return ON_STACK_REPLACEMENT; 3878 return ON_STACK_REPLACEMENT;
3875 } 3879 }
3876 3880
3877 } // namespace internal 3881 } // namespace internal
3878 } // namespace v8 3882 } // namespace v8
3879 #endif // V8_TARGET_ARCH_S390 3883 #endif // V8_TARGET_ARCH_S390
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698