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

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

Issue 2427673004: [intrinsics] Nuke %HasCachedArrayIndex and %GetCachedArrayIndex. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 __ Peek(x1, (argc + 1) * kXRegSize); 2731 __ Peek(x1, (argc + 1) * kXRegSize);
2732 // Call the target. 2732 // Call the target.
2733 __ Mov(x0, argc); 2733 __ Mov(x0, argc);
2734 __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); 2734 __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
2735 OperandStackDepthDecrement(argc + 1); 2735 OperandStackDepthDecrement(argc + 1);
2736 RestoreContext(); 2736 RestoreContext();
2737 // Discard the function left on TOS. 2737 // Discard the function left on TOS.
2738 context()->DropAndPlug(1, x0); 2738 context()->DropAndPlug(1, x0);
2739 } 2739 }
2740 2740
2741
2742 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) {
2743 ZoneList<Expression*>* args = expr->arguments();
2744 VisitForAccumulatorValue(args->at(0));
2745
2746 Label materialize_true, materialize_false;
2747 Label* if_true = NULL;
2748 Label* if_false = NULL;
2749 Label* fall_through = NULL;
2750 context()->PrepareTest(&materialize_true, &materialize_false,
2751 &if_true, &if_false, &fall_through);
2752
2753 __ Ldr(x10, FieldMemOperand(x0, String::kHashFieldOffset));
2754 __ Tst(x10, String::kContainsCachedArrayIndexMask);
2755 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
2756 Split(eq, if_true, if_false, fall_through);
2757
2758 context()->Plug(if_true, if_false);
2759 }
2760
2761
2762 void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) {
2763 ZoneList<Expression*>* args = expr->arguments();
2764 DCHECK(args->length() == 1);
2765 VisitForAccumulatorValue(args->at(0));
2766
2767 __ AssertString(x0);
2768
2769 __ Ldr(x10, FieldMemOperand(x0, String::kHashFieldOffset));
2770 __ IndexFromHash(x10, x0);
2771
2772 context()->Plug(x0);
2773 }
2774
2775
2776 void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { 2741 void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) {
2777 ZoneList<Expression*>* args = expr->arguments(); 2742 ZoneList<Expression*>* args = expr->arguments();
2778 DCHECK_EQ(1, args->length()); 2743 DCHECK_EQ(1, args->length());
2779 VisitForAccumulatorValue(args->at(0)); 2744 VisitForAccumulatorValue(args->at(0));
2780 __ AssertFunction(x0); 2745 __ AssertFunction(x0);
2781 __ Ldr(x0, FieldMemOperand(x0, HeapObject::kMapOffset)); 2746 __ Ldr(x0, FieldMemOperand(x0, HeapObject::kMapOffset));
2782 __ Ldr(x0, FieldMemOperand(x0, Map::kPrototypeOffset)); 2747 __ Ldr(x0, FieldMemOperand(x0, Map::kPrototypeOffset));
2783 context()->Plug(x0); 2748 context()->Plug(x0);
2784 } 2749 }
2785 2750
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
3732 } 3697 }
3733 3698
3734 return INTERRUPT; 3699 return INTERRUPT;
3735 } 3700 }
3736 3701
3737 3702
3738 } // namespace internal 3703 } // namespace internal
3739 } // namespace v8 3704 } // namespace v8
3740 3705
3741 #endif // V8_TARGET_ARCH_ARM64 3706 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698