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

Side by Side Diff: src/arm64/macro-assembler-arm64.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/arm64/macro-assembler-arm64.h ('k') | src/bailout-reason.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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 UseScratchRegisterScope temps(this); 1606 UseScratchRegisterScope temps(this);
1607 Register temp = temps.AcquireX(); 1607 Register temp = temps.AcquireX();
1608 1608
1609 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset)); 1609 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset));
1610 CompareInstanceType(temp, temp, LAST_NAME_TYPE); 1610 CompareInstanceType(temp, temp, LAST_NAME_TYPE);
1611 Check(ls, kOperandIsNotAName); 1611 Check(ls, kOperandIsNotAName);
1612 } 1612 }
1613 } 1613 }
1614 1614
1615 1615
1616 void MacroAssembler::AssertFunction(Register object) {
1617 if (emit_debug_code()) {
1618 AssertNotSmi(object, kOperandIsASmiAndNotAFunction);
1619
1620 UseScratchRegisterScope temps(this);
1621 Register temp = temps.AcquireX();
1622
1623 CompareObjectType(object, temp, temp, JS_FUNCTION_TYPE);
1624 Check(eq, kOperandIsNotAFunction);
1625 }
1626 }
1627
1628
1616 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, 1629 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
1617 Register scratch) { 1630 Register scratch) {
1618 if (emit_debug_code()) { 1631 if (emit_debug_code()) {
1619 Label done_checking; 1632 Label done_checking;
1620 AssertNotSmi(object); 1633 AssertNotSmi(object);
1621 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking); 1634 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking);
1622 Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 1635 Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
1623 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); 1636 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex);
1624 Assert(eq, kExpectedUndefinedOrCell); 1637 Assert(eq, kExpectedUndefinedOrCell);
1625 Bind(&done_checking); 1638 Bind(&done_checking);
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
3038 } 3051 }
3039 } else { 3052 } else {
3040 // Slot is in the current function context. Move it into the 3053 // Slot is in the current function context. Move it into the
3041 // destination register in case we store into it (the write barrier 3054 // destination register in case we store into it (the write barrier
3042 // cannot be allowed to destroy the context in cp). 3055 // cannot be allowed to destroy the context in cp).
3043 Mov(dst, cp); 3056 Mov(dst, cp);
3044 } 3057 }
3045 } 3058 }
3046 3059
3047 3060
3061 void MacroAssembler::LoadGlobalProxy(Register dst) {
3062 Ldr(dst, GlobalObjectMemOperand());
3063 Ldr(dst, FieldMemOperand(dst, GlobalObject::kGlobalProxyOffset));
3064 }
3065
3066
3048 void MacroAssembler::DebugBreak() { 3067 void MacroAssembler::DebugBreak() {
3049 Mov(x0, 0); 3068 Mov(x0, 0);
3050 Mov(x1, ExternalReference(Runtime::kHandleDebuggerStatement, isolate())); 3069 Mov(x1, ExternalReference(Runtime::kHandleDebuggerStatement, isolate()));
3051 CEntryStub ces(isolate(), 1); 3070 CEntryStub ces(isolate(), 1);
3052 DCHECK(AllowThisStubCall(&ces)); 3071 DCHECK(AllowThisStubCall(&ces));
3053 Call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); 3072 Call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT);
3054 } 3073 }
3055 3074
3056 3075
3057 void MacroAssembler::PushStackHandler() { 3076 void MacroAssembler::PushStackHandler() {
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after
5102 } 5121 }
5103 5122
5104 5123
5105 #undef __ 5124 #undef __
5106 5125
5107 5126
5108 } // namespace internal 5127 } // namespace internal
5109 } // namespace v8 5128 } // namespace v8
5110 5129
5111 #endif // V8_TARGET_ARCH_ARM64 5130 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698