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

Side by Side Diff: src/arm64/macro-assembler-arm64.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/arm64/macro-assembler-arm64.h ('k') | src/assembler.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/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/assembler.h" 8 #include "src/assembler.h"
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 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 Label done_checking; 1681 Label done_checking;
1682 AssertNotSmi(object); 1682 AssertNotSmi(object);
1683 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking); 1683 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking);
1684 Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 1684 Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
1685 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); 1685 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex);
1686 Assert(eq, kExpectedUndefinedOrCell); 1686 Assert(eq, kExpectedUndefinedOrCell);
1687 Bind(&done_checking); 1687 Bind(&done_checking);
1688 } 1688 }
1689 } 1689 }
1690 1690
1691 void MacroAssembler::AssertApiCallResult(Register object) {
1692 if (emit_debug_code()) {
1693 Label done_checking;
1694 Push(object);
1695
1696 // Check for Smis.
1697 JumpIfSmi(object, &done_checking);
1698
1699 // Check for valid Oddballs.
1700 JumpIfRoot(object, Heap::kTrueValueRootIndex, &done_checking);
1701 JumpIfRoot(object, Heap::kFalseValueRootIndex, &done_checking);
1702 JumpIfRoot(object, Heap::kNullValueRootIndex, &done_checking);
1703 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking);
1704
1705 // Check for other primitives (String, Symbol and HeapNumber).
1706 STATIC_ASSERT(LAST_PRIMITIVE_TYPE == ODDBALL_TYPE);
1707 CompareObjectType(object, object, object, LAST_PRIMITIVE_TYPE);
1708 B(lo, &done_checking);
1709
1710 // Check for JSReceivers.
1711 Cmp(object, FIRST_JS_RECEIVER_TYPE);
1712 Check(hs, kAPICallReturnedInvalidObject);
1713
1714 Bind(&done_checking);
1715 Pop(object);
1716 }
1717 }
1691 1718
1692 void MacroAssembler::AssertPositiveOrZero(Register value) { 1719 void MacroAssembler::AssertPositiveOrZero(Register value) {
1693 if (emit_debug_code()) { 1720 if (emit_debug_code()) {
1694 Label done; 1721 Label done;
1695 int sign_bit = value.Is64Bits() ? kXSignBit : kWSignBit; 1722 int sign_bit = value.Is64Bits() ? kXSignBit : kWSignBit;
1696 Tbz(value, sign_bit, &done); 1723 Tbz(value, sign_bit, &done);
1697 Abort(kUnexpectedNegativeValue); 1724 Abort(kUnexpectedNegativeValue);
1698 Bind(&done); 1725 Bind(&done);
1699 } 1726 }
1700 } 1727 }
(...skipping 2909 matching lines...) Expand 10 before | Expand all | Expand 10 after
4610 } 4637 }
4611 4638
4612 4639
4613 #undef __ 4640 #undef __
4614 4641
4615 4642
4616 } // namespace internal 4643 } // namespace internal
4617 } // namespace v8 4644 } // namespace v8
4618 4645
4619 #endif // V8_TARGET_ARCH_ARM64 4646 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698