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

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

Issue 1708313002: [stubs] Introduce a dedicated FastNewObjectStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove TODO. Created 4 years, 10 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 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 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 1631
1632 UseScratchRegisterScope temps(this); 1632 UseScratchRegisterScope temps(this);
1633 Register temp = temps.AcquireX(); 1633 Register temp = temps.AcquireX();
1634 1634
1635 CompareObjectType(object, temp, temp, JS_BOUND_FUNCTION_TYPE); 1635 CompareObjectType(object, temp, temp, JS_BOUND_FUNCTION_TYPE);
1636 Check(eq, kOperandIsNotABoundFunction); 1636 Check(eq, kOperandIsNotABoundFunction);
1637 } 1637 }
1638 } 1638 }
1639 1639
1640 1640
1641 void MacroAssembler::AssertReceiver(Register object) {
1642 if (emit_debug_code()) {
1643 AssertNotSmi(object, kOperandIsASmiAndNotAReceiver);
1644
1645 UseScratchRegisterScope temps(this);
1646 Register temp = temps.AcquireX();
1647
1648 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
1649 CompareObjectType(object, temp, temp, FIRST_JS_RECEIVER_TYPE);
1650 Check(hs, kOperandIsNotAReceiver);
1651 }
1652 }
1653
1654
1641 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, 1655 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
1642 Register scratch) { 1656 Register scratch) {
1643 if (emit_debug_code()) { 1657 if (emit_debug_code()) {
1644 Label done_checking; 1658 Label done_checking;
1645 AssertNotSmi(object); 1659 AssertNotSmi(object);
1646 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking); 1660 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking);
1647 Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 1661 Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
1648 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); 1662 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex);
1649 Assert(eq, kExpectedUndefinedOrCell); 1663 Assert(eq, kExpectedUndefinedOrCell);
1650 Bind(&done_checking); 1664 Bind(&done_checking);
(...skipping 3312 matching lines...) Expand 10 before | Expand all | Expand 10 after
4963 } 4977 }
4964 4978
4965 4979
4966 #undef __ 4980 #undef __
4967 4981
4968 4982
4969 } // namespace internal 4983 } // namespace internal
4970 } // namespace v8 4984 } // namespace v8
4971 4985
4972 #endif // V8_TARGET_ARCH_ARM64 4986 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698