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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 1311013008: [builtins] Unify the various versions of [[Call]] with a Call builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: AssertFunction was wrong Created 5 years, 3 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/arm/macro-assembler-arm.h ('k') | src/arm64/builtins-arm64.cc » ('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 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 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 } 2634 }
2635 } else { 2635 } else {
2636 // Slot is in the current function context. Move it into the 2636 // Slot is in the current function context. Move it into the
2637 // destination register in case we store into it (the write barrier 2637 // destination register in case we store into it (the write barrier
2638 // cannot be allowed to destroy the context in esi). 2638 // cannot be allowed to destroy the context in esi).
2639 mov(dst, cp); 2639 mov(dst, cp);
2640 } 2640 }
2641 } 2641 }
2642 2642
2643 2643
2644 void MacroAssembler::LoadGlobalProxy(Register dst) {
2645 ldr(dst, GlobalObjectOperand());
2646 ldr(dst, FieldMemOperand(dst, GlobalObject::kGlobalProxyOffset));
2647 }
2648
2649
2644 void MacroAssembler::LoadTransitionedArrayMapConditional( 2650 void MacroAssembler::LoadTransitionedArrayMapConditional(
2645 ElementsKind expected_kind, 2651 ElementsKind expected_kind,
2646 ElementsKind transitioned_kind, 2652 ElementsKind transitioned_kind,
2647 Register map_in_out, 2653 Register map_in_out,
2648 Register scratch, 2654 Register scratch,
2649 Label* no_map_match) { 2655 Label* no_map_match) {
2650 // Load the global or builtins object from the current context. 2656 // Load the global or builtins object from the current context.
2651 ldr(scratch, 2657 ldr(scratch,
2652 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 2658 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
2653 ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); 2659 ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset));
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 Check(ne, kOperandIsASmiAndNotAName); 2801 Check(ne, kOperandIsASmiAndNotAName);
2796 push(object); 2802 push(object);
2797 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); 2803 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset));
2798 CompareInstanceType(object, object, LAST_NAME_TYPE); 2804 CompareInstanceType(object, object, LAST_NAME_TYPE);
2799 pop(object); 2805 pop(object);
2800 Check(le, kOperandIsNotAName); 2806 Check(le, kOperandIsNotAName);
2801 } 2807 }
2802 } 2808 }
2803 2809
2804 2810
2811 void MacroAssembler::AssertFunction(Register object) {
2812 if (emit_debug_code()) {
2813 STATIC_ASSERT(kSmiTag == 0);
2814 tst(object, Operand(kSmiTagMask));
2815 Check(ne, kOperandIsASmiAndNotAFunction);
2816 push(object);
2817 CompareObjectType(object, object, object, JS_FUNCTION_TYPE);
2818 pop(object);
2819 Check(eq, kOperandIsNotAFunction);
2820 }
2821 }
2822
2823
2805 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, 2824 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
2806 Register scratch) { 2825 Register scratch) {
2807 if (emit_debug_code()) { 2826 if (emit_debug_code()) {
2808 Label done_checking; 2827 Label done_checking;
2809 AssertNotSmi(object); 2828 AssertNotSmi(object);
2810 CompareRoot(object, Heap::kUndefinedValueRootIndex); 2829 CompareRoot(object, Heap::kUndefinedValueRootIndex);
2811 b(eq, &done_checking); 2830 b(eq, &done_checking);
2812 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 2831 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
2813 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); 2832 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex);
2814 Assert(eq, kExpectedUndefinedOrCell); 2833 Assert(eq, kExpectedUndefinedOrCell);
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
3773 } 3792 }
3774 } 3793 }
3775 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3794 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3776 add(result, result, Operand(dividend, LSR, 31)); 3795 add(result, result, Operand(dividend, LSR, 31));
3777 } 3796 }
3778 3797
3779 } // namespace internal 3798 } // namespace internal
3780 } // namespace v8 3799 } // namespace v8
3781 3800
3782 #endif // V8_TARGET_ARCH_ARM 3801 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698