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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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: Addressing comments, tweak linear search limit based on local measurements 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_ARM 5 #if V8_TARGET_ARCH_ARM
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 PredictableCodeSizeScope predictable(masm_, -1); 461 PredictableCodeSizeScope predictable(masm_, -1);
462 __ LeaveFrame(StackFrame::JAVA_SCRIPT); 462 __ LeaveFrame(StackFrame::JAVA_SCRIPT);
463 { ConstantPoolUnavailableScope constant_pool_unavailable(masm_); 463 { ConstantPoolUnavailableScope constant_pool_unavailable(masm_);
464 __ add(sp, sp, Operand(sp_delta)); 464 __ add(sp, sp, Operand(sp_delta));
465 __ Jump(lr); 465 __ Jump(lr);
466 } 466 }
467 } 467 }
468 } 468 }
469 } 469 }
470 470
471 void FullCodeGenerator::RestoreContext() {
472 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
473 }
471 474
472 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { 475 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const {
473 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 476 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
474 codegen()->GetVar(result_register(), var); 477 codegen()->GetVar(result_register(), var);
475 codegen()->PushOperand(result_register()); 478 codegen()->PushOperand(result_register());
476 } 479 }
477 480
478 481
479 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { 482 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const {
480 } 483 }
(...skipping 3243 matching lines...) Expand 10 before | Expand all | Expand 10 after
3724 Label* if_false = NULL; 3727 Label* if_false = NULL;
3725 Label* fall_through = NULL; 3728 Label* fall_through = NULL;
3726 context()->PrepareTest(&materialize_true, &materialize_false, 3729 context()->PrepareTest(&materialize_true, &materialize_false,
3727 &if_true, &if_false, &fall_through); 3730 &if_true, &if_false, &fall_through);
3728 3731
3729 Token::Value op = expr->op(); 3732 Token::Value op = expr->op();
3730 VisitForStackValue(expr->left()); 3733 VisitForStackValue(expr->left());
3731 switch (op) { 3734 switch (op) {
3732 case Token::IN: 3735 case Token::IN:
3733 VisitForStackValue(expr->right()); 3736 VisitForStackValue(expr->right());
3734 CallRuntimeWithOperands(Runtime::kHasProperty); 3737 EmitHasProperty();
3735 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 3738 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
3736 __ CompareRoot(r0, Heap::kTrueValueRootIndex); 3739 __ CompareRoot(r0, Heap::kTrueValueRootIndex);
3737 Split(eq, if_true, if_false, fall_through); 3740 Split(eq, if_true, if_false, fall_through);
3738 break; 3741 break;
3739 3742
3740 case Token::INSTANCEOF: { 3743 case Token::INSTANCEOF: {
3741 VisitForAccumulatorValue(expr->right()); 3744 VisitForAccumulatorValue(expr->right());
3742 PopOperand(r1); 3745 PopOperand(r1);
3743 InstanceOfStub stub(isolate()); 3746 InstanceOfStub stub(isolate());
3744 __ CallStub(&stub); 3747 __ CallStub(&stub);
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
4055 DCHECK(interrupt_address == 4058 DCHECK(interrupt_address ==
4056 isolate->builtins()->OnStackReplacement()->entry()); 4059 isolate->builtins()->OnStackReplacement()->entry());
4057 return ON_STACK_REPLACEMENT; 4060 return ON_STACK_REPLACEMENT;
4058 } 4061 }
4059 4062
4060 4063
4061 } // namespace internal 4064 } // namespace internal
4062 } // namespace v8 4065 } // namespace v8
4063 4066
4064 #endif // V8_TARGET_ARCH_ARM 4067 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698