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

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

Issue 1542963002: [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@FunctionConstructor
Patch Set: [arm64] Poke does not preserve flags with --debug-code. 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
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/objects.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 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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/base/division-by-constant.h" 9 #include "src/base/division-by-constant.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 5548 matching lines...) Expand 10 before | Expand all | Expand 10 after
5559 if (emit_debug_code()) { 5559 if (emit_debug_code()) {
5560 STATIC_ASSERT(kSmiTag == 0); 5560 STATIC_ASSERT(kSmiTag == 0);
5561 SmiTst(object, t8); 5561 SmiTst(object, t8);
5562 Check(ne, kOperandIsASmiAndNotAFunction, t8, Operand(zero_reg)); 5562 Check(ne, kOperandIsASmiAndNotAFunction, t8, Operand(zero_reg));
5563 GetObjectType(object, t8, t8); 5563 GetObjectType(object, t8, t8);
5564 Check(eq, kOperandIsNotAFunction, t8, Operand(JS_FUNCTION_TYPE)); 5564 Check(eq, kOperandIsNotAFunction, t8, Operand(JS_FUNCTION_TYPE));
5565 } 5565 }
5566 } 5566 }
5567 5567
5568 5568
5569 void MacroAssembler::AssertBoundFunction(Register object) {
5570 if (emit_debug_code()) {
5571 STATIC_ASSERT(kSmiTag == 0);
5572 SmiTst(object, t8);
5573 Check(ne, kOperandIsASmiAndNotABoundFunction, t8, Operand(zero_reg));
5574 GetObjectType(object, t8, t8);
5575 Check(eq, kOperandIsNotABoundFunction, t8, Operand(JS_BOUND_FUNCTION_TYPE));
5576 }
5577 }
5578
5579
5569 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, 5580 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
5570 Register scratch) { 5581 Register scratch) {
5571 if (emit_debug_code()) { 5582 if (emit_debug_code()) {
5572 Label done_checking; 5583 Label done_checking;
5573 AssertNotSmi(object); 5584 AssertNotSmi(object);
5574 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5585 LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
5575 Branch(&done_checking, eq, object, Operand(scratch)); 5586 Branch(&done_checking, eq, object, Operand(scratch));
5576 ld(t8, FieldMemOperand(object, HeapObject::kMapOffset)); 5587 ld(t8, FieldMemOperand(object, HeapObject::kMapOffset));
5577 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); 5588 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex);
5578 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); 5589 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch));
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
6208 if (mag.shift > 0) sra(result, result, mag.shift); 6219 if (mag.shift > 0) sra(result, result, mag.shift);
6209 srl(at, dividend, 31); 6220 srl(at, dividend, 31);
6210 Addu(result, result, Operand(at)); 6221 Addu(result, result, Operand(at));
6211 } 6222 }
6212 6223
6213 6224
6214 } // namespace internal 6225 } // namespace internal
6215 } // namespace v8 6226 } // namespace v8
6216 6227
6217 #endif // V8_TARGET_ARCH_MIPS64 6228 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698