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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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 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_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 int32_t sp_delta = arg_count * kPointerSize; 452 int32_t sp_delta = arg_count * kPointerSize;
453 SetReturnPosition(literal()); 453 SetReturnPosition(literal());
454 masm_->mov(sp, fp); 454 masm_->mov(sp, fp);
455 masm_->MultiPop(static_cast<RegList>(fp.bit() | ra.bit())); 455 masm_->MultiPop(static_cast<RegList>(fp.bit() | ra.bit()));
456 masm_->Addu(sp, sp, Operand(sp_delta)); 456 masm_->Addu(sp, sp, Operand(sp_delta));
457 masm_->Jump(ra); 457 masm_->Jump(ra);
458 } 458 }
459 } 459 }
460 } 460 }
461 461
462 void FullCodeGenerator::RestoreContext() {
463 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
464 }
462 465
463 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { 466 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const {
464 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 467 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
465 codegen()->GetVar(result_register(), var); 468 codegen()->GetVar(result_register(), var);
466 codegen()->PushOperand(result_register()); 469 codegen()->PushOperand(result_register());
467 } 470 }
468 471
469 472
470 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { 473 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const {
471 } 474 }
(...skipping 3273 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 Label* if_false = NULL; 3748 Label* if_false = NULL;
3746 Label* fall_through = NULL; 3749 Label* fall_through = NULL;
3747 context()->PrepareTest(&materialize_true, &materialize_false, 3750 context()->PrepareTest(&materialize_true, &materialize_false,
3748 &if_true, &if_false, &fall_through); 3751 &if_true, &if_false, &fall_through);
3749 3752
3750 Token::Value op = expr->op(); 3753 Token::Value op = expr->op();
3751 VisitForStackValue(expr->left()); 3754 VisitForStackValue(expr->left());
3752 switch (op) { 3755 switch (op) {
3753 case Token::IN: 3756 case Token::IN:
3754 VisitForStackValue(expr->right()); 3757 VisitForStackValue(expr->right());
3755 CallRuntimeWithOperands(Runtime::kHasProperty); 3758 EmitHasProperty();
3756 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 3759 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
3757 __ LoadRoot(t0, Heap::kTrueValueRootIndex); 3760 __ LoadRoot(t0, Heap::kTrueValueRootIndex);
3758 Split(eq, v0, Operand(t0), if_true, if_false, fall_through); 3761 Split(eq, v0, Operand(t0), if_true, if_false, fall_through);
3759 break; 3762 break;
3760 3763
3761 case Token::INSTANCEOF: { 3764 case Token::INSTANCEOF: {
3762 VisitForAccumulatorValue(expr->right()); 3765 VisitForAccumulatorValue(expr->right());
3763 __ mov(a0, result_register()); 3766 __ mov(a0, result_register());
3764 PopOperand(a1); 3767 PopOperand(a1);
3765 InstanceOfStub stub(isolate()); 3768 InstanceOfStub stub(isolate());
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
4010 reinterpret_cast<uint32_t>( 4013 reinterpret_cast<uint32_t>(
4011 isolate->builtins()->OnStackReplacement()->entry())); 4014 isolate->builtins()->OnStackReplacement()->entry()));
4012 return ON_STACK_REPLACEMENT; 4015 return ON_STACK_REPLACEMENT;
4013 } 4016 }
4014 4017
4015 4018
4016 } // namespace internal 4019 } // namespace internal
4017 } // namespace v8 4020 } // namespace v8
4018 4021
4019 #endif // V8_TARGET_ARCH_MIPS 4022 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698