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

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

Issue 1542963002: [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@FunctionConstructor
Patch Set: arm port. Created 4 years, 12 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 #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 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2808 tst(object, Operand(kSmiTagMask)); 2808 tst(object, Operand(kSmiTagMask));
2809 Check(ne, kOperandIsASmiAndNotAFunction); 2809 Check(ne, kOperandIsASmiAndNotAFunction);
2810 push(object); 2810 push(object);
2811 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); 2811 CompareObjectType(object, object, object, JS_FUNCTION_TYPE);
2812 pop(object); 2812 pop(object);
2813 Check(eq, kOperandIsNotAFunction); 2813 Check(eq, kOperandIsNotAFunction);
2814 } 2814 }
2815 } 2815 }
2816 2816
2817 2817
2818 void MacroAssembler::AssertBoundFunction(Register object) {
2819 if (emit_debug_code()) {
2820 STATIC_ASSERT(kSmiTag == 0);
2821 tst(object, Operand(kSmiTagMask));
2822 Check(ne, kOperandIsASmiAndNotABoundFunction);
2823 push(object);
2824 CompareObjectType(object, object, object, JS_BOUND_FUNCTION_TYPE);
2825 pop(object);
2826 Check(eq, kOperandIsNotABoundFunction);
2827 }
2828 }
2829
2830
2818 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, 2831 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
2819 Register scratch) { 2832 Register scratch) {
2820 if (emit_debug_code()) { 2833 if (emit_debug_code()) {
2821 Label done_checking; 2834 Label done_checking;
2822 AssertNotSmi(object); 2835 AssertNotSmi(object);
2823 CompareRoot(object, Heap::kUndefinedValueRootIndex); 2836 CompareRoot(object, Heap::kUndefinedValueRootIndex);
2824 b(eq, &done_checking); 2837 b(eq, &done_checking);
2825 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 2838 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
2826 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); 2839 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex);
2827 Assert(eq, kExpectedUndefinedOrCell); 2840 Assert(eq, kExpectedUndefinedOrCell);
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
3682 } 3695 }
3683 } 3696 }
3684 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3697 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3685 add(result, result, Operand(dividend, LSR, 31)); 3698 add(result, result, Operand(dividend, LSR, 31));
3686 } 3699 }
3687 3700
3688 } // namespace internal 3701 } // namespace internal
3689 } // namespace v8 3702 } // namespace v8
3690 3703
3691 #endif // V8_TARGET_ARCH_ARM 3704 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/bailout-reason.h » ('j') | src/objects-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698