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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 // arguments, consider how to improve it without creating a security 453 // arguments, consider how to improve it without creating a security
454 // hole. 454 // hole.
455 __ ldr_pcrel(ip0, (3 * kInstructionSize) >> kLoadLiteralScaleLog2); 455 __ ldr_pcrel(ip0, (3 * kInstructionSize) >> kLoadLiteralScaleLog2);
456 __ Add(current_sp, current_sp, ip0); 456 __ Add(current_sp, current_sp, ip0);
457 __ Ret(); 457 __ Ret();
458 int32_t arg_count = info_->scope()->num_parameters() + 1; 458 int32_t arg_count = info_->scope()->num_parameters() + 1;
459 __ dc64(kXRegSize * arg_count); 459 __ dc64(kXRegSize * arg_count);
460 } 460 }
461 } 461 }
462 462
463 void FullCodeGenerator::RestoreContext() {
464 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
465 }
463 466
464 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { 467 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const {
465 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 468 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
466 codegen()->GetVar(result_register(), var); 469 codegen()->GetVar(result_register(), var);
467 codegen()->PushOperand(result_register()); 470 codegen()->PushOperand(result_register());
468 } 471 }
469 472
470 473
471 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { 474 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const {
472 // Root values have no side effects. 475 // Root values have no side effects.
(...skipping 3174 matching lines...) Expand 10 before | Expand all | Expand 10 after
3647 Label* if_false = NULL; 3650 Label* if_false = NULL;
3648 Label* fall_through = NULL; 3651 Label* fall_through = NULL;
3649 context()->PrepareTest(&materialize_true, &materialize_false, 3652 context()->PrepareTest(&materialize_true, &materialize_false,
3650 &if_true, &if_false, &fall_through); 3653 &if_true, &if_false, &fall_through);
3651 3654
3652 Token::Value op = expr->op(); 3655 Token::Value op = expr->op();
3653 VisitForStackValue(expr->left()); 3656 VisitForStackValue(expr->left());
3654 switch (op) { 3657 switch (op) {
3655 case Token::IN: 3658 case Token::IN:
3656 VisitForStackValue(expr->right()); 3659 VisitForStackValue(expr->right());
3657 CallRuntimeWithOperands(Runtime::kHasProperty); 3660 EmitHasProperty();
3658 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 3661 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
3659 __ CompareRoot(x0, Heap::kTrueValueRootIndex); 3662 __ CompareRoot(x0, Heap::kTrueValueRootIndex);
3660 Split(eq, if_true, if_false, fall_through); 3663 Split(eq, if_true, if_false, fall_through);
3661 break; 3664 break;
3662 3665
3663 case Token::INSTANCEOF: { 3666 case Token::INSTANCEOF: {
3664 VisitForAccumulatorValue(expr->right()); 3667 VisitForAccumulatorValue(expr->right());
3665 PopOperand(x1); 3668 PopOperand(x1);
3666 InstanceOfStub stub(isolate()); 3669 InstanceOfStub stub(isolate());
3667 __ CallStub(&stub); 3670 __ CallStub(&stub);
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
4055 } 4058 }
4056 4059
4057 return INTERRUPT; 4060 return INTERRUPT;
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_ARM64 4067 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698