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

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

Issue 2841913003: [WIP] Initial CallFunctionCallback builtin.
Patch Set: Fix wrong register for arm64. Created 3 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
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm64/code-stubs-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/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2804 matching lines...) Expand 10 before | Expand all | Expand 10 after
2815 AssertNotSmi(object); 2815 AssertNotSmi(object);
2816 CompareRoot(object, Heap::kUndefinedValueRootIndex); 2816 CompareRoot(object, Heap::kUndefinedValueRootIndex);
2817 b(eq, &done_checking); 2817 b(eq, &done_checking);
2818 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 2818 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
2819 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); 2819 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex);
2820 Assert(eq, kExpectedUndefinedOrCell); 2820 Assert(eq, kExpectedUndefinedOrCell);
2821 bind(&done_checking); 2821 bind(&done_checking);
2822 } 2822 }
2823 } 2823 }
2824 2824
2825 void MacroAssembler::AssertApiCallResult(Register object) {
2826 if (emit_debug_code()) {
2827 Label done_checking;
2828 Push(object);
2829
2830 // Check for Smis.
2831 JumpIfSmi(object, &done_checking);
2832
2833 // Check for valid Oddballs.
2834 JumpIfRoot(object, Heap::kTrueValueRootIndex, &done_checking);
2835 JumpIfRoot(object, Heap::kFalseValueRootIndex, &done_checking);
2836 JumpIfRoot(object, Heap::kNullValueRootIndex, &done_checking);
2837 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking);
2838
2839 // Check for other primitives (String, Symbol and HeapNumber).
2840 STATIC_ASSERT(LAST_PRIMITIVE_TYPE == ODDBALL_TYPE);
2841 CompareObjectType(object, object, object, LAST_PRIMITIVE_TYPE);
2842 b(lo, &done_checking);
2843
2844 // Check for JSReceivers.
2845 cmp(object, Operand(FIRST_JS_RECEIVER_TYPE));
2846 Check(hs, kAPICallReturnedInvalidObject);
2847
2848 bind(&done_checking);
2849 Pop(object);
2850 }
2851 }
2825 2852
2826 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) { 2853 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) {
2827 if (emit_debug_code()) { 2854 if (emit_debug_code()) {
2828 CompareRoot(reg, index); 2855 CompareRoot(reg, index);
2829 Check(eq, kHeapNumberMapRegisterClobbered); 2856 Check(eq, kHeapNumberMapRegisterClobbered);
2830 } 2857 }
2831 } 2858 }
2832 2859
2833 2860
2834 void MacroAssembler::JumpIfNotHeapNumber(Register object, 2861 void MacroAssembler::JumpIfNotHeapNumber(Register object,
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
3677 } 3704 }
3678 } 3705 }
3679 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3706 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3680 add(result, result, Operand(dividend, LSR, 31)); 3707 add(result, result, Operand(dividend, LSR, 31));
3681 } 3708 }
3682 3709
3683 } // namespace internal 3710 } // namespace internal
3684 } // namespace v8 3711 } // namespace v8
3685 3712
3686 #endif // V8_TARGET_ARCH_ARM 3713 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698