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

Side by Side Diff: src/mips/macro-assembler-mips.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, 11 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/mips/macro-assembler-mips.h ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Copyright 2012 the V8 project authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 5105 matching lines...) Expand 10 before | Expand all | Expand 10 after
5116 if (emit_debug_code()) { 5116 if (emit_debug_code()) {
5117 STATIC_ASSERT(kSmiTag == 0); 5117 STATIC_ASSERT(kSmiTag == 0);
5118 SmiTst(object, t8); 5118 SmiTst(object, t8);
5119 Check(ne, kOperandIsASmiAndNotAFunction, t8, Operand(zero_reg)); 5119 Check(ne, kOperandIsASmiAndNotAFunction, t8, Operand(zero_reg));
5120 GetObjectType(object, t8, t8); 5120 GetObjectType(object, t8, t8);
5121 Check(eq, kOperandIsNotAFunction, t8, Operand(JS_FUNCTION_TYPE)); 5121 Check(eq, kOperandIsNotAFunction, t8, Operand(JS_FUNCTION_TYPE));
5122 } 5122 }
5123 } 5123 }
5124 5124
5125 5125
5126 void MacroAssembler::AssertBoundFunction(Register object) {
5127 if (emit_debug_code()) {
5128 STATIC_ASSERT(kSmiTag == 0);
5129 SmiTst(object, t8);
5130 Check(ne, kOperandIsASmiAndNotABoundFunction, t8, Operand(zero_reg));
5131 GetObjectType(object, t8, t8);
5132 Check(eq, kOperandIsNotABoundFunction, t8, Operand(JS_BOUND_FUNCTION_TYPE));
5133 }
5134 }
5135
5136
5126 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, 5137 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
5127 Register scratch) { 5138 Register scratch) {
5128 if (emit_debug_code()) { 5139 if (emit_debug_code()) {
5129 Label done_checking; 5140 Label done_checking;
5130 AssertNotSmi(object); 5141 AssertNotSmi(object);
5131 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5142 LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
5132 Branch(&done_checking, eq, object, Operand(scratch)); 5143 Branch(&done_checking, eq, object, Operand(scratch));
5133 lw(t8, FieldMemOperand(object, HeapObject::kMapOffset)); 5144 lw(t8, FieldMemOperand(object, HeapObject::kMapOffset));
5134 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); 5145 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex);
5135 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); 5146 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch));
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
5753 if (mag.shift > 0) sra(result, result, mag.shift); 5764 if (mag.shift > 0) sra(result, result, mag.shift);
5754 srl(at, dividend, 31); 5765 srl(at, dividend, 31);
5755 Addu(result, result, Operand(at)); 5766 Addu(result, result, Operand(at));
5756 } 5767 }
5757 5768
5758 5769
5759 } // namespace internal 5770 } // namespace internal
5760 } // namespace v8 5771 } // namespace v8
5761 5772
5762 #endif // V8_TARGET_ARCH_MIPS 5773 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698