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

Side by Side Diff: src/mips/macro-assembler-mips.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/mips/macro-assembler-mips.h ('k') | src/mips64/code-stubs-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 // 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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
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 5838 matching lines...) Expand 10 before | Expand all | Expand 10 after
5849 AssertNotSmi(object); 5849 AssertNotSmi(object);
5850 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5850 LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
5851 Branch(&done_checking, eq, object, Operand(scratch)); 5851 Branch(&done_checking, eq, object, Operand(scratch));
5852 lw(t8, FieldMemOperand(object, HeapObject::kMapOffset)); 5852 lw(t8, FieldMemOperand(object, HeapObject::kMapOffset));
5853 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); 5853 LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex);
5854 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); 5854 Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch));
5855 bind(&done_checking); 5855 bind(&done_checking);
5856 } 5856 }
5857 } 5857 }
5858 5858
5859 void MacroAssembler::AssertApiCallResult(Register object) {
5860 if (emit_debug_code()) {
5861 Label done_checking;
5862 Push(object);
5863
5864 // Check for Smis.
5865 JumpIfSmi(object, &done_checking);
5866
5867 // Check for valid Oddballs.
5868 JumpIfRoot(object, Heap::kTrueValueRootIndex, &done_checking);
5869 JumpIfRoot(object, Heap::kFalseValueRootIndex, &done_checking);
5870 JumpIfRoot(object, Heap::kNullValueRootIndex, &done_checking);
5871 JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking);
5872
5873 // Check for other primitives (String, Symbol and HeapNumber).
5874 STATIC_ASSERT(LAST_PRIMITIVE_TYPE == ODDBALL_TYPE);
5875 GetObjectType(object, object, object);
5876 Branch(&done_checking, lo, object, Operand(LAST_PRIMITIVE_TYPE));
5877
5878 // Check for JSReceivers.
5879 Check(hs, kAPICallReturnedInvalidObject, object,
5880 Operand(FIRST_JS_RECEIVER_TYPE));
5881
5882 bind(&done_checking);
5883 Pop(object);
5884 }
5885 }
5859 5886
5860 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) { 5887 void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) {
5861 if (emit_debug_code()) { 5888 if (emit_debug_code()) {
5862 DCHECK(!reg.is(at)); 5889 DCHECK(!reg.is(at));
5863 LoadRoot(at, index); 5890 LoadRoot(at, index);
5864 Check(eq, kHeapNumberMapRegisterClobbered, reg, Operand(at)); 5891 Check(eq, kHeapNumberMapRegisterClobbered, reg, Operand(at));
5865 } 5892 }
5866 } 5893 }
5867 5894
5868 5895
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
6630 if (mag.shift > 0) sra(result, result, mag.shift); 6657 if (mag.shift > 0) sra(result, result, mag.shift);
6631 srl(at, dividend, 31); 6658 srl(at, dividend, 31);
6632 Addu(result, result, Operand(at)); 6659 Addu(result, result, Operand(at));
6633 } 6660 }
6634 6661
6635 6662
6636 } // namespace internal 6663 } // namespace internal
6637 } // namespace v8 6664 } // namespace v8
6638 6665
6639 #endif // V8_TARGET_ARCH_MIPS 6666 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698