Commit 7705ab1f authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[csa][cleanup] Remove Sloppy from TNodes in more methods

Remove from:
 * Smi
 * RawPtrT
 * Oddball
 * Float32T
 * Float64T
 * IntPtrT
 * WordT
 * Word32T

Bug: v8:6949, v8:11384
Change-Id: Ia79fdedd23cd09c49ada05d031a04a1a48c2d9c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712784Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72946}
parent ca89bf25
This diff is collapsed.
...@@ -537,19 +537,17 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -537,19 +537,17 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
// Round the 32bits payload of the provided word up to the next power of two. // Round the 32bits payload of the provided word up to the next power of two.
TNode<IntPtrT> IntPtrRoundUpToPowerOfTwo32(TNode<IntPtrT> value); TNode<IntPtrT> IntPtrRoundUpToPowerOfTwo32(TNode<IntPtrT> value);
// Select the maximum of the two provided IntPtr values. // Select the maximum of the two provided IntPtr values.
TNode<IntPtrT> IntPtrMax(SloppyTNode<IntPtrT> left, TNode<IntPtrT> IntPtrMax(TNode<IntPtrT> left, TNode<IntPtrT> right);
SloppyTNode<IntPtrT> right);
// Select the minimum of the two provided IntPtr values. // Select the minimum of the two provided IntPtr values.
TNode<IntPtrT> IntPtrMin(SloppyTNode<IntPtrT> left, TNode<IntPtrT> IntPtrMin(TNode<IntPtrT> left, TNode<IntPtrT> right);
SloppyTNode<IntPtrT> right);
TNode<UintPtrT> UintPtrMin(TNode<UintPtrT> left, TNode<UintPtrT> right); TNode<UintPtrT> UintPtrMin(TNode<UintPtrT> left, TNode<UintPtrT> right);
// Float64 operations. // Float64 operations.
TNode<Float64T> Float64Ceil(SloppyTNode<Float64T> x); TNode<Float64T> Float64Ceil(TNode<Float64T> x);
TNode<Float64T> Float64Floor(SloppyTNode<Float64T> x); TNode<Float64T> Float64Floor(TNode<Float64T> x);
TNode<Float64T> Float64Round(SloppyTNode<Float64T> x); TNode<Float64T> Float64Round(TNode<Float64T> x);
TNode<Float64T> Float64RoundToEven(SloppyTNode<Float64T> x); TNode<Float64T> Float64RoundToEven(TNode<Float64T> x);
TNode<Float64T> Float64Trunc(SloppyTNode<Float64T> x); TNode<Float64T> Float64Trunc(TNode<Float64T> x);
// Select the minimum of the two provided Number values. // Select the minimum of the two provided Number values.
TNode<Number> NumberMax(TNode<Number> left, TNode<Number> right); TNode<Number> NumberMax(TNode<Number> left, TNode<Number> right);
// Select the minimum of the two provided Number values. // Select the minimum of the two provided Number values.
...@@ -559,17 +557,17 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -559,17 +557,17 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<BoolT> IsValidPositiveSmi(TNode<IntPtrT> value); TNode<BoolT> IsValidPositiveSmi(TNode<IntPtrT> value);
// Tag an IntPtr as a Smi value. // Tag an IntPtr as a Smi value.
TNode<Smi> SmiTag(SloppyTNode<IntPtrT> value); TNode<Smi> SmiTag(TNode<IntPtrT> value);
// Untag a Smi value as an IntPtr. // Untag a Smi value as an IntPtr.
TNode<IntPtrT> SmiUntag(SloppyTNode<Smi> value); TNode<IntPtrT> SmiUntag(TNode<Smi> value);
// Smi conversions. // Smi conversions.
TNode<Float64T> SmiToFloat64(SloppyTNode<Smi> value); TNode<Float64T> SmiToFloat64(TNode<Smi> value);
TNode<Smi> SmiFromIntPtr(SloppyTNode<IntPtrT> value) { return SmiTag(value); } TNode<Smi> SmiFromIntPtr(TNode<IntPtrT> value) { return SmiTag(value); }
TNode<Smi> SmiFromInt32(SloppyTNode<Int32T> value); TNode<Smi> SmiFromInt32(SloppyTNode<Int32T> value);
TNode<Smi> SmiFromUint32(TNode<Uint32T> value); TNode<Smi> SmiFromUint32(TNode<Uint32T> value);
TNode<IntPtrT> SmiToIntPtr(SloppyTNode<Smi> value) { return SmiUntag(value); } TNode<IntPtrT> SmiToIntPtr(TNode<Smi> value) { return SmiUntag(value); }
TNode<Int32T> SmiToInt32(SloppyTNode<Smi> value); TNode<Int32T> SmiToInt32(TNode<Smi> value);
// Smi operations. // Smi operations.
#define SMI_ARITHMETIC_BINOP(SmiOpName, IntPtrOpName, Int32OpName) \ #define SMI_ARITHMETIC_BINOP(SmiOpName, IntPtrOpName, Int32OpName) \
...@@ -883,7 +881,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -883,7 +881,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
} }
TNode<Int32T> TruncateWordToInt32(TNode<WordT> value); TNode<Int32T> TruncateWordToInt32(TNode<WordT> value);
TNode<Int32T> TruncateIntPtrToInt32(SloppyTNode<IntPtrT> value); TNode<Int32T> TruncateIntPtrToInt32(TNode<IntPtrT> value);
// Check a value for smi-ness // Check a value for smi-ness
TNode<BoolT> TaggedIsSmi(TNode<MaybeObject> a); TNode<BoolT> TaggedIsSmi(TNode<MaybeObject> a);
...@@ -893,7 +891,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -893,7 +891,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<BoolT> TaggedIsPositiveSmi(TNode<Object> a); TNode<BoolT> TaggedIsPositiveSmi(TNode<Object> a);
// Check that a word has a word-aligned address. // Check that a word has a word-aligned address.
TNode<BoolT> WordIsAligned(TNode<WordT> word, size_t alignment); TNode<BoolT> WordIsAligned(TNode<WordT> word, size_t alignment);
TNode<BoolT> WordIsPowerOfTwo(SloppyTNode<IntPtrT> value); TNode<BoolT> WordIsPowerOfTwo(TNode<IntPtrT> value);
// Check if lower_limit <= value <= higher_limit. // Check if lower_limit <= value <= higher_limit.
template <typename U> template <typename U>
...@@ -1392,7 +1390,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -1392,7 +1390,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
} }
TNode<Object> LoadPropertyArrayElement(TNode<PropertyArray> object, TNode<Object> LoadPropertyArrayElement(TNode<PropertyArray> object,
SloppyTNode<IntPtrT> index); TNode<IntPtrT> index);
TNode<IntPtrT> LoadPropertyArrayLength(TNode<PropertyArray> object); TNode<IntPtrT> LoadPropertyArrayLength(TNode<PropertyArray> object);
// Load an element from an array and untag it and return it as Word32. // Load an element from an array and untag it and return it as Word32.
...@@ -1456,9 +1454,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -1456,9 +1454,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<Int32T> elements_kind); TNode<Int32T> elements_kind);
// Parts of the above, factored out for readability: // Parts of the above, factored out for readability:
TNode<BigInt> LoadFixedBigInt64ArrayElementAsTagged( TNode<BigInt> LoadFixedBigInt64ArrayElementAsTagged(
SloppyTNode<RawPtrT> data_pointer, SloppyTNode<IntPtrT> offset); TNode<RawPtrT> data_pointer, TNode<IntPtrT> offset);
TNode<BigInt> LoadFixedBigUint64ArrayElementAsTagged( TNode<BigInt> LoadFixedBigUint64ArrayElementAsTagged(
SloppyTNode<RawPtrT> data_pointer, SloppyTNode<IntPtrT> offset); TNode<RawPtrT> data_pointer, TNode<IntPtrT> offset);
// 64-bit platforms only: // 64-bit platforms only:
TNode<BigInt> BigIntFromInt64(TNode<IntPtrT> value); TNode<BigInt> BigIntFromInt64(TNode<IntPtrT> value);
TNode<BigInt> BigIntFromUint64(TNode<UintPtrT> value); TNode<BigInt> BigIntFromUint64(TNode<UintPtrT> value);
...@@ -1514,8 +1512,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -1514,8 +1512,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<Word32T> value); TNode<Word32T> value);
// Store the floating point value of a HeapNumber. // Store the floating point value of a HeapNumber.
void StoreHeapNumberValue(TNode<HeapNumber> object, void StoreHeapNumberValue(TNode<HeapNumber> object, TNode<Float64T> value);
SloppyTNode<Float64T> value);
// Store a field to an object on the heap. // Store a field to an object on the heap.
void StoreObjectField(TNode<HeapObject> object, int offset, void StoreObjectField(TNode<HeapObject> object, int offset,
TNode<Object> value); TNode<Object> value);
...@@ -1523,8 +1521,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -1523,8 +1521,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<Object> value); TNode<Object> value);
template <class T> template <class T>
void StoreObjectFieldNoWriteBarrier(TNode<HeapObject> object, void StoreObjectFieldNoWriteBarrier(TNode<HeapObject> object,
SloppyTNode<IntPtrT> offset, TNode<IntPtrT> offset, TNode<T> value) {
TNode<T> value) {
int const_offset; int const_offset;
if (TryToInt32Constant(offset, &const_offset)) { if (TryToInt32Constant(offset, &const_offset)) {
return StoreObjectFieldNoWriteBarrier<T>(object, const_offset, value); return StoreObjectFieldNoWriteBarrier<T>(object, const_offset, value);
...@@ -1771,12 +1768,11 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -1771,12 +1768,11 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
base::Optional<TNode<FixedArray>> elements = base::nullopt, base::Optional<TNode<FixedArray>> elements = base::nullopt,
SlackTrackingMode slack_tracking_mode = kNoSlackTracking); SlackTrackingMode slack_tracking_mode = kNoSlackTracking);
void InitializeJSObjectBodyWithSlackTracking( void InitializeJSObjectBodyWithSlackTracking(TNode<HeapObject> object,
TNode<HeapObject> object, TNode<Map> map, TNode<Map> map,
SloppyTNode<IntPtrT> instance_size); TNode<IntPtrT> instance_size);
void InitializeJSObjectBodyNoSlackTracking( void InitializeJSObjectBodyNoSlackTracking(
TNode<HeapObject> object, TNode<Map> map, TNode<HeapObject> object, TNode<Map> map, TNode<IntPtrT> instance_size,
SloppyTNode<IntPtrT> instance_size,
int start_offset = JSObject::kHeaderSize); int start_offset = JSObject::kHeaderSize);
TNode<BoolT> IsValidFastJSArrayCapacity(TNode<IntPtrT> capacity); TNode<BoolT> IsValidFastJSArrayCapacity(TNode<IntPtrT> capacity);
...@@ -1898,7 +1894,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -1898,7 +1894,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
// TODO(v8:9722): Return type should be JSIteratorResult // TODO(v8:9722): Return type should be JSIteratorResult
TNode<JSObject> AllocateJSIteratorResult(TNode<Context> context, TNode<JSObject> AllocateJSIteratorResult(TNode<Context> context,
TNode<Object> value, TNode<Object> value,
SloppyTNode<Oddball> done); TNode<Oddball> done);
// TODO(v8:9722): Return type should be JSIteratorResult // TODO(v8:9722): Return type should be JSIteratorResult
TNode<JSObject> AllocateJSIteratorResultForEntry(TNode<Context> context, TNode<JSObject> AllocateJSIteratorResultForEntry(TNode<Context> context,
...@@ -2240,7 +2236,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -2240,7 +2236,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
void TryFloat64ToSmi(TNode<Float64T> number, TVariable<Smi>* output, void TryFloat64ToSmi(TNode<Float64T> number, TVariable<Smi>* output,
Label* if_smi); Label* if_smi);
TNode<Number> ChangeFloat32ToTagged(TNode<Float32T> value); TNode<Number> ChangeFloat32ToTagged(TNode<Float32T> value);
TNode<Number> ChangeFloat64ToTagged(SloppyTNode<Float64T> value); TNode<Number> ChangeFloat64ToTagged(TNode<Float64T> value);
TNode<Number> ChangeInt32ToTagged(SloppyTNode<Int32T> value); TNode<Number> ChangeInt32ToTagged(SloppyTNode<Int32T> value);
TNode<Number> ChangeUint32ToTagged(SloppyTNode<Uint32T> value); TNode<Number> ChangeUint32ToTagged(SloppyTNode<Uint32T> value);
TNode<Number> ChangeUintPtrToTagged(TNode<UintPtrT> value); TNode<Number> ChangeUintPtrToTagged(TNode<UintPtrT> value);
...@@ -2720,7 +2716,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -2720,7 +2716,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
// Returns true if any of the mask's bit are set in the given Smi. // Returns true if any of the mask's bit are set in the given Smi.
// Smi-encoding of the mask is performed implicitly! // Smi-encoding of the mask is performed implicitly!
TNode<BoolT> IsSetSmi(SloppyTNode<Smi> smi, int untagged_mask) { TNode<BoolT> IsSetSmi(TNode<Smi> smi, int untagged_mask) {
intptr_t mask_word = bit_cast<intptr_t>(Smi::FromInt(untagged_mask)); intptr_t mask_word = bit_cast<intptr_t>(Smi::FromInt(untagged_mask));
return WordNotEqual(WordAnd(BitcastTaggedToWordForTagAndSmiBits(smi), return WordNotEqual(WordAnd(BitcastTaggedToWordForTagAndSmiBits(smi),
IntPtrConstant(mask_word)), IntPtrConstant(mask_word)),
...@@ -3086,7 +3082,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -3086,7 +3082,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
// chain needs to be checked. And if_bailout if the lookup is unsupported. // chain needs to be checked. And if_bailout if the lookup is unsupported.
void TryLookupElement(TNode<HeapObject> object, TNode<Map> map, void TryLookupElement(TNode<HeapObject> object, TNode<Map> map,
TNode<Int32T> instance_type, TNode<Int32T> instance_type,
SloppyTNode<IntPtrT> intptr_index, Label* if_found, TNode<IntPtrT> intptr_index, Label* if_found,
Label* if_absent, Label* if_not_found, Label* if_absent, Label* if_not_found,
Label* if_bailout); Label* if_bailout);
...@@ -3478,8 +3474,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -3478,8 +3474,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
int base_size = 0); int base_size = 0);
// Check that a field offset is within the bounds of the an object. // Check that a field offset is within the bounds of the an object.
TNode<BoolT> IsOffsetInBounds(SloppyTNode<IntPtrT> offset, TNode<BoolT> IsOffsetInBounds(TNode<IntPtrT> offset, TNode<IntPtrT> length,
SloppyTNode<IntPtrT> length, int header_size, int header_size,
ElementsKind kind = HOLEY_ELEMENTS); ElementsKind kind = HOLEY_ELEMENTS);
// Load a builtin's code from the builtin array in the isolate. // Load a builtin's code from the builtin array in the isolate.
......
...@@ -561,23 +561,23 @@ TNode<WordT> CodeAssembler::WordPoisonOnSpeculation(TNode<WordT> value) { ...@@ -561,23 +561,23 @@ TNode<WordT> CodeAssembler::WordPoisonOnSpeculation(TNode<WordT> value) {
CODE_ASSEMBLER_BINARY_OP_LIST(DEFINE_CODE_ASSEMBLER_BINARY_OP) CODE_ASSEMBLER_BINARY_OP_LIST(DEFINE_CODE_ASSEMBLER_BINARY_OP)
#undef DEFINE_CODE_ASSEMBLER_BINARY_OP #undef DEFINE_CODE_ASSEMBLER_BINARY_OP
TNode<WordT> CodeAssembler::WordShl(SloppyTNode<WordT> value, int shift) { TNode<WordT> CodeAssembler::WordShl(TNode<WordT> value, int shift) {
return (shift != 0) ? WordShl(value, IntPtrConstant(shift)) : value; return (shift != 0) ? WordShl(value, IntPtrConstant(shift)) : value;
} }
TNode<WordT> CodeAssembler::WordShr(SloppyTNode<WordT> value, int shift) { TNode<WordT> CodeAssembler::WordShr(TNode<WordT> value, int shift) {
return (shift != 0) ? WordShr(value, IntPtrConstant(shift)) : value; return (shift != 0) ? WordShr(value, IntPtrConstant(shift)) : value;
} }
TNode<WordT> CodeAssembler::WordSar(SloppyTNode<WordT> value, int shift) { TNode<WordT> CodeAssembler::WordSar(TNode<WordT> value, int shift) {
return (shift != 0) ? WordSar(value, IntPtrConstant(shift)) : value; return (shift != 0) ? WordSar(value, IntPtrConstant(shift)) : value;
} }
TNode<Word32T> CodeAssembler::Word32Shr(SloppyTNode<Word32T> value, int shift) { TNode<Word32T> CodeAssembler::Word32Shr(TNode<Word32T> value, int shift) {
return (shift != 0) ? Word32Shr(value, Int32Constant(shift)) : value; return (shift != 0) ? Word32Shr(value, Int32Constant(shift)) : value;
} }
TNode<Word32T> CodeAssembler::Word32Sar(SloppyTNode<Word32T> value, int shift) { TNode<Word32T> CodeAssembler::Word32Sar(TNode<Word32T> value, int shift) {
return (shift != 0) ? Word32Sar(value, Int32Constant(shift)) : value; return (shift != 0) ? Word32Sar(value, Int32Constant(shift)) : value;
} }
...@@ -646,8 +646,7 @@ TNode<Float64T> CodeAssembler::RoundIntPtrToFloat64(Node* value) { ...@@ -646,8 +646,7 @@ TNode<Float64T> CodeAssembler::RoundIntPtrToFloat64(Node* value) {
return UncheckedCast<Float64T>(raw_assembler()->ChangeInt32ToFloat64(value)); return UncheckedCast<Float64T>(raw_assembler()->ChangeInt32ToFloat64(value));
} }
TNode<Int32T> CodeAssembler::TruncateFloat32ToInt32( TNode<Int32T> CodeAssembler::TruncateFloat32ToInt32(TNode<Float32T> value) {
SloppyTNode<Float32T> value) {
return UncheckedCast<Int32T>(raw_assembler()->TruncateFloat32ToInt32( return UncheckedCast<Int32T>(raw_assembler()->TruncateFloat32ToInt32(
value, TruncateKind::kSetOverflowToMin)); value, TruncateKind::kSetOverflowToMin));
} }
......
...@@ -742,7 +742,7 @@ class V8_EXPORT_PRIVATE CodeAssembler { ...@@ -742,7 +742,7 @@ class V8_EXPORT_PRIVATE CodeAssembler {
Load(MachineTypeOf<Type>::value, base, needs_poisoning)); Load(MachineTypeOf<Type>::value, base, needs_poisoning));
} }
template <class Type> template <class Type>
TNode<Type> Load(Node* base, SloppyTNode<WordT> offset, TNode<Type> Load(Node* base, TNode<WordT> offset,
LoadSensitivity needs_poisoning = LoadSensitivity::kSafe) { LoadSensitivity needs_poisoning = LoadSensitivity::kSafe) {
return UncheckedCast<Type>( return UncheckedCast<Type>(
Load(MachineTypeOf<Type>::value, base, offset, needs_poisoning)); Load(MachineTypeOf<Type>::value, base, offset, needs_poisoning));
...@@ -996,17 +996,17 @@ class V8_EXPORT_PRIVATE CodeAssembler { ...@@ -996,17 +996,17 @@ class V8_EXPORT_PRIVATE CodeAssembler {
IntPtrSub(static_cast<Node*>(left), static_cast<Node*>(right))); IntPtrSub(static_cast<Node*>(left), static_cast<Node*>(right)));
} }
TNode<WordT> WordShl(SloppyTNode<WordT> value, int shift); TNode<WordT> WordShl(TNode<WordT> value, int shift);
TNode<WordT> WordShr(SloppyTNode<WordT> value, int shift); TNode<WordT> WordShr(TNode<WordT> value, int shift);
TNode<WordT> WordSar(SloppyTNode<WordT> value, int shift); TNode<WordT> WordSar(TNode<WordT> value, int shift);
TNode<IntPtrT> WordShr(TNode<IntPtrT> value, int shift) { TNode<IntPtrT> WordShr(TNode<IntPtrT> value, int shift) {
return UncheckedCast<IntPtrT>(WordShr(static_cast<Node*>(value), shift)); return UncheckedCast<IntPtrT>(WordShr(TNode<WordT>(value), shift));
} }
TNode<IntPtrT> WordSar(TNode<IntPtrT> value, int shift) { TNode<IntPtrT> WordSar(TNode<IntPtrT> value, int shift) {
return UncheckedCast<IntPtrT>(WordSar(static_cast<Node*>(value), shift)); return UncheckedCast<IntPtrT>(WordSar(TNode<WordT>(value), shift));
} }
TNode<Word32T> Word32Shr(SloppyTNode<Word32T> value, int shift); TNode<Word32T> Word32Shr(TNode<Word32T> value, int shift);
TNode<Word32T> Word32Sar(SloppyTNode<Word32T> value, int shift); TNode<Word32T> Word32Sar(TNode<Word32T> value, int shift);
// Unary // Unary
#define DECLARE_CODE_ASSEMBLER_UNARY_OP(name, ResType, ArgType) \ #define DECLARE_CODE_ASSEMBLER_UNARY_OP(name, ResType, ArgType) \
...@@ -1040,7 +1040,7 @@ class V8_EXPORT_PRIVATE CodeAssembler { ...@@ -1040,7 +1040,7 @@ class V8_EXPORT_PRIVATE CodeAssembler {
// range, make sure that overflow detection is easy. In particular, return // range, make sure that overflow detection is easy. In particular, return
// int_min instead of int_max on arm platforms by using parameter // int_min instead of int_max on arm platforms by using parameter
// kSetOverflowToMin. // kSetOverflowToMin.
TNode<Int32T> TruncateFloat32ToInt32(SloppyTNode<Float32T> value); TNode<Int32T> TruncateFloat32ToInt32(TNode<Float32T> value);
// Projections // Projections
template <int index, class T1, class T2> template <int index, class T1, class T2>
......
...@@ -92,9 +92,10 @@ Handle<Code> BuildSetupFunction(Isolate* isolate, ...@@ -92,9 +92,10 @@ Handle<Code> BuildSetupFunction(Isolate* isolate,
params.push_back(__ IntPtrConstant(i + 42)); params.push_back(__ IntPtrConstant(i + 42));
} }
DCHECK_EQ(param_count + 1, params.size()); DCHECK_EQ(param_count + 1, params.size());
Node* raw_result = tester.raw_assembler_for_testing()->CallN( TNode<IntPtrT> intptr_result =
caller_descriptor, param_count + 1, params.data()); __ UncheckedCast<IntPtrT>(tester.raw_assembler_for_testing()->CallN(
__ Return(__ SmiTag(raw_result)); caller_descriptor, param_count + 1, params.data()));
__ Return(__ SmiTag(intptr_result));
return tester.GenerateCodeCloseAndEscape(); return tester.GenerateCodeCloseAndEscape();
} }
......
...@@ -73,9 +73,10 @@ Handle<Code> BuildSetupFunction(Isolate* isolate, ...@@ -73,9 +73,10 @@ Handle<Code> BuildSetupFunction(Isolate* isolate,
params.push_back(__ IntPtrConstant(i + 42)); params.push_back(__ IntPtrConstant(i + 42));
} }
DCHECK_EQ(param_count + 1, params.size()); DCHECK_EQ(param_count + 1, params.size());
Node* raw_result = tester.raw_assembler_for_testing()->CallN( TNode<IntPtrT> intptr_result =
caller_descriptor, param_count + 1, params.data()); __ UncheckedCast<IntPtrT>(tester.raw_assembler_for_testing()->CallN(
__ Return(__ SmiTag(raw_result)); caller_descriptor, param_count + 1, params.data()));
__ Return(__ SmiTag(intptr_result));
return tester.GenerateCodeCloseAndEscape(); return tester.GenerateCodeCloseAndEscape();
} }
......
...@@ -32,7 +32,7 @@ void TestStubCacheOffsetCalculation(StubCache::Table table) { ...@@ -32,7 +32,7 @@ void TestStubCacheOffsetCalculation(StubCache::Table table) {
auto map = m.Parameter<Map>(2); auto map = m.Parameter<Map>(2);
TNode<IntPtrT> primary_offset = TNode<IntPtrT> primary_offset =
m.StubCachePrimaryOffsetForTesting(name, map); m.StubCachePrimaryOffsetForTesting(name, map);
Node* result; TNode<IntPtrT> result;
if (table == StubCache::kPrimary) { if (table == StubCache::kPrimary) {
result = primary_offset; result = primary_offset;
} else { } else {
......
...@@ -65,7 +65,7 @@ TEST(CallCFunction) { ...@@ -65,7 +65,7 @@ TEST(CallCFunction) {
MachineType type_intptr = MachineType::IntPtr(); MachineType type_intptr = MachineType::IntPtr();
Node* const result = TNode<IntPtrT> const result = m.UncheckedCast<IntPtrT>(
m.CallCFunction(fun_constant, type_intptr, m.CallCFunction(fun_constant, type_intptr,
std::make_pair(type_intptr, m.IntPtrConstant(0)), std::make_pair(type_intptr, m.IntPtrConstant(0)),
std::make_pair(type_intptr, m.IntPtrConstant(1)), std::make_pair(type_intptr, m.IntPtrConstant(1)),
...@@ -76,7 +76,7 @@ TEST(CallCFunction) { ...@@ -76,7 +76,7 @@ TEST(CallCFunction) {
std::make_pair(type_intptr, m.IntPtrConstant(6)), std::make_pair(type_intptr, m.IntPtrConstant(6)),
std::make_pair(type_intptr, m.IntPtrConstant(7)), std::make_pair(type_intptr, m.IntPtrConstant(7)),
std::make_pair(type_intptr, m.IntPtrConstant(8)), std::make_pair(type_intptr, m.IntPtrConstant(8)),
std::make_pair(type_intptr, m.IntPtrConstant(9))); std::make_pair(type_intptr, m.IntPtrConstant(9))));
m.Return(m.SmiTag(result)); m.Return(m.SmiTag(result));
} }
...@@ -99,11 +99,12 @@ TEST(CallCFunctionWithCallerSavedRegisters) { ...@@ -99,11 +99,12 @@ TEST(CallCFunctionWithCallerSavedRegisters) {
MachineType type_intptr = MachineType::IntPtr(); MachineType type_intptr = MachineType::IntPtr();
Node* const result = m.CallCFunctionWithCallerSavedRegisters( TNode<IntPtrT> const result =
fun_constant, type_intptr, kSaveFPRegs, m.UncheckedCast<IntPtrT>(m.CallCFunctionWithCallerSavedRegisters(
std::make_pair(type_intptr, m.IntPtrConstant(0)), fun_constant, type_intptr, kSaveFPRegs,
std::make_pair(type_intptr, m.IntPtrConstant(1)), std::make_pair(type_intptr, m.IntPtrConstant(0)),
std::make_pair(type_intptr, m.IntPtrConstant(2))); std::make_pair(type_intptr, m.IntPtrConstant(1)),
std::make_pair(type_intptr, m.IntPtrConstant(2))));
m.Return(m.SmiTag(result)); m.Return(m.SmiTag(result));
} }
...@@ -3855,8 +3856,8 @@ TEST(InstructionSchedulingCallerSavedRegisters) { ...@@ -3855,8 +3856,8 @@ TEST(InstructionSchedulingCallerSavedRegisters) {
CodeStubAssembler m(asm_tester.state()); CodeStubAssembler m(asm_tester.state());
{ {
Node* x = m.SmiUntag(m.Parameter<Smi>(1)); TNode<IntPtrT> x = m.SmiUntag(m.Parameter<Smi>(1));
Node* y = m.WordOr(m.WordShr(x, 1), m.IntPtrConstant(1)); TNode<WordT> y = m.WordOr(m.WordShr(x, 1), m.IntPtrConstant(1));
TNode<ExternalReference> isolate_ptr = TNode<ExternalReference> isolate_ptr =
m.ExternalConstant(ExternalReference::isolate_address(isolate)); m.ExternalConstant(ExternalReference::isolate_address(isolate));
m.CallCFunctionWithCallerSavedRegisters( m.CallCFunctionWithCallerSavedRegisters(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment