Commit a8883036 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[cleanup] Remove Sloppy in ChangeFloat64ToUintPtr & ChangeInt32ToIntPtr

Bug: v8:6949, v8:10155
Change-Id: I0113efe2d4d3a462533c306a87ebee851b1cb85c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2056853Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66286}
parent 992abcc3
......@@ -544,8 +544,8 @@ class ArrayPopulatorAssembler : public CodeStubAssembler {
};
TF_BUILTIN(TypedArrayPrototypeMap, ArrayBuiltinsAssembler) {
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
TNode<Object> receiver = args.GetReceiver();
......@@ -1071,8 +1071,8 @@ void ArrayIncludesIndexofAssembler::GenerateHoleyDoubles(
}
TF_BUILTIN(ArrayIncludes, ArrayIncludesIndexofAssembler) {
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
Generate(kIncludes, argc, context);
......@@ -1112,8 +1112,8 @@ TF_BUILTIN(ArrayIncludesHoleyDoubles, ArrayIncludesIndexofAssembler) {
}
TF_BUILTIN(ArrayIndexOf, ArrayIncludesIndexofAssembler) {
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
Generate(kIndexOf, argc, context);
......@@ -1541,8 +1541,8 @@ TF_BUILTIN(FlatMapIntoArray, ArrayFlattenAssembler) {
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flat
TF_BUILTIN(ArrayPrototypeFlat, CodeStubAssembler) {
const TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
const TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
const TNode<Context> context = CAST(Parameter(Descriptor::kContext));
const TNode<Object> receiver = args.GetReceiver();
......@@ -1583,8 +1583,8 @@ TF_BUILTIN(ArrayPrototypeFlat, CodeStubAssembler) {
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
TF_BUILTIN(ArrayPrototypeFlatMap, CodeStubAssembler) {
const TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
const TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
const TNode<Context> context = CAST(Parameter(Descriptor::kContext));
const TNode<Object> receiver = args.GetReceiver();
......
......@@ -311,8 +311,8 @@ AsyncGeneratorBuiltinsAssembler::TakeFirstAsyncGeneratorRequestFromQueue(
TF_BUILTIN(AsyncGeneratorPrototypeNext, AsyncGeneratorBuiltinsAssembler) {
const int kValueArg = 0;
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
TNode<Object> generator = args.GetReceiver();
......@@ -329,8 +329,8 @@ TF_BUILTIN(AsyncGeneratorPrototypeNext, AsyncGeneratorBuiltinsAssembler) {
TF_BUILTIN(AsyncGeneratorPrototypeReturn, AsyncGeneratorBuiltinsAssembler) {
const int kValueArg = 0;
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
TNode<Object> generator = args.GetReceiver();
......@@ -347,8 +347,8 @@ TF_BUILTIN(AsyncGeneratorPrototypeReturn, AsyncGeneratorBuiltinsAssembler) {
TF_BUILTIN(AsyncGeneratorPrototypeThrow, AsyncGeneratorBuiltinsAssembler) {
const int kValueArg = 0;
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
TNode<Object> generator = args.GetReceiver();
......
......@@ -854,8 +854,8 @@ TNode<HeapObject> CollectionsBuiltinsAssembler::AllocateTable(
TF_BUILTIN(MapConstructor, CollectionsBuiltinsAssembler) {
TNode<Object> new_target = CAST(Parameter(Descriptor::kJSNewTarget));
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
GenerateConstructor(kMap, isolate()->factory()->Map_string(), new_target,
......@@ -864,8 +864,8 @@ TF_BUILTIN(MapConstructor, CollectionsBuiltinsAssembler) {
TF_BUILTIN(SetConstructor, CollectionsBuiltinsAssembler) {
TNode<Object> new_target = CAST(Parameter(Descriptor::kJSNewTarget));
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
GenerateConstructor(kSet, isolate()->factory()->Set_string(), new_target,
......@@ -2703,8 +2703,8 @@ TNode<IntPtrT> WeakCollectionsBuiltinsAssembler::ValueIndexFromKeyIndex(
TF_BUILTIN(WeakMapConstructor, WeakCollectionsBuiltinsAssembler) {
TNode<Object> new_target = CAST(Parameter(Descriptor::kJSNewTarget));
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
GenerateConstructor(kWeakMap, isolate()->factory()->WeakMap_string(),
......@@ -2713,8 +2713,8 @@ TF_BUILTIN(WeakMapConstructor, WeakCollectionsBuiltinsAssembler) {
TF_BUILTIN(WeakSetConstructor, WeakCollectionsBuiltinsAssembler) {
TNode<Object> new_target = CAST(Parameter(Descriptor::kJSNewTarget));
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
GenerateConstructor(kWeakSet, isolate()->factory()->WeakSet_string(),
......
......@@ -644,8 +644,8 @@ TNode<JSObject> ConstructorBuiltinsAssembler::EmitCreateEmptyObjectLiteral(
// ES #sec-object-constructor
TF_BUILTIN(ObjectConstructor, ConstructorBuiltinsAssembler) {
int const kValueArg = 0;
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
TNode<Object> new_target = CAST(Parameter(Descriptor::kJSNewTarget));
......@@ -694,8 +694,8 @@ TF_BUILTIN(ObjectConstructor, ConstructorBuiltinsAssembler) {
// ES #sec-number-constructor
TF_BUILTIN(NumberConstructor, ConstructorBuiltinsAssembler) {
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
// 1. If no arguments were passed to this function invocation, let n be +0.
......
......@@ -435,8 +435,8 @@ TF_BUILTIN(ObjectPrototypeHasOwnProperty, ObjectBuiltinsAssembler) {
// ES #sec-object.assign
TF_BUILTIN(ObjectAssign, ObjectBuiltinsAssembler) {
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
......@@ -1064,8 +1064,8 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
int const kPrototypeArg = 0;
int const kPropertiesArg = 1;
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
TNode<Object> prototype = args.GetOptionalArgumentValue(kPrototypeArg);
......
......@@ -973,7 +973,7 @@ void StringBuiltinsAssembler::StringIndexOf(
const TNode<IntPtrT> search_length =
IntPtrSub(subject_length, start_position);
const TNode<IntPtrT> search_byte =
ChangeInt32ToIntPtr(Load(MachineType::Uint8(), adjusted_search_ptr));
ChangeInt32ToIntPtr(Load<Uint8T>(adjusted_search_ptr));
const TNode<ExternalReference> memchr =
ExternalConstant(ExternalReference::libc_memchr_function());
......@@ -1074,8 +1074,8 @@ TF_BUILTIN(StringIndexOf, StringBuiltinsAssembler) {
// ES6 String.prototype.includes(searchString [, position])
// #sec-string.prototype.includes
TF_BUILTIN(StringPrototypeIncludes, StringIncludesIndexOfAssembler) {
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
Generate(kIncludes, argc, context);
}
......@@ -1083,8 +1083,8 @@ TF_BUILTIN(StringPrototypeIncludes, StringIncludesIndexOfAssembler) {
// ES6 String.prototype.indexOf(searchString [, position])
// #sec-string.prototype.indexof
TF_BUILTIN(StringPrototypeIndexOf, StringIncludesIndexOfAssembler) {
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
Generate(kIndexOf, argc, context);
}
......@@ -1699,8 +1699,8 @@ TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) {
const int kSeparatorArg = 0;
const int kLimitArg = 1;
const TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
const TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
TNode<Object> receiver = args.GetReceiver();
......@@ -1808,8 +1808,8 @@ TF_BUILTIN(StringSubstring, StringBuiltinsAssembler) {
// ES6 #sec-string.prototype.trim
TF_BUILTIN(StringPrototypeTrim, StringTrimAssembler) {
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
Generate(String::kTrim, "String.prototype.trim", argc, context);
......@@ -1817,8 +1817,8 @@ TF_BUILTIN(StringPrototypeTrim, StringTrimAssembler) {
// https://github.com/tc39/proposal-string-left-right-trim
TF_BUILTIN(StringPrototypeTrimStart, StringTrimAssembler) {
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
Generate(String::kTrimStart, "String.prototype.trimLeft", argc, context);
......@@ -1826,8 +1826,8 @@ TF_BUILTIN(StringPrototypeTrimStart, StringTrimAssembler) {
// https://github.com/tc39/proposal-string-left-right-trim
TF_BUILTIN(StringPrototypeTrimEnd, StringTrimAssembler) {
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
Generate(String::kTrimEnd, "String.prototype.trimRight", argc, context);
......
......@@ -89,8 +89,8 @@ TF_BUILTIN(TypedArrayConstructor, TypedArrayBuiltinsAssembler) {
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
TNode<JSFunction> target = CAST(Parameter(Descriptor::kJSTarget));
TNode<Object> new_target = CAST(Parameter(Descriptor::kJSNewTarget));
TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
UncheckedCast<Int32T>(Parameter(Descriptor::kJSActualArgumentsCount)));
CodeStubArguments args(this, argc);
TNode<Object> arg1 = args.GetOptionalArgumentValue(0);
TNode<Object> arg2 = args.GetOptionalArgumentValue(1);
......
......@@ -1532,8 +1532,7 @@ TNode<IntPtrT> CodeStubAssembler::LoadAndUntagObjectField(
#if V8_TARGET_LITTLE_ENDIAN
offset += 4;
#endif
return ChangeInt32ToIntPtr(
LoadObjectField(object, offset, MachineType::Int32()));
return ChangeInt32ToIntPtr(LoadObjectField<Int32T>(object, offset));
} else {
return SmiToIntPtr(
LoadObjectField(object, offset, MachineType::TaggedSigned()));
......@@ -1754,8 +1753,8 @@ TNode<HeapObject> CodeStubAssembler::LoadMapPrototype(SloppyTNode<Map> map) {
TNode<IntPtrT> CodeStubAssembler::LoadMapInstanceSizeInWords(
SloppyTNode<Map> map) {
CSA_SLOW_ASSERT(this, IsMap(map));
return ChangeInt32ToIntPtr(LoadObjectField(
map, Map::kInstanceSizeInWordsOffset, MachineType::Uint8()));
return ChangeInt32ToIntPtr(
LoadObjectField<Uint8T>(map, Map::kInstanceSizeInWordsOffset));
}
TNode<IntPtrT> CodeStubAssembler::LoadMapInobjectPropertiesStartInWords(
......@@ -1763,9 +1762,8 @@ TNode<IntPtrT> CodeStubAssembler::LoadMapInobjectPropertiesStartInWords(
CSA_SLOW_ASSERT(this, IsMap(map));
// See Map::GetInObjectPropertiesStartInWords() for details.
CSA_ASSERT(this, IsJSObjectMap(map));
return ChangeInt32ToIntPtr(LoadObjectField(
map, Map::kInObjectPropertiesStartOrConstructorFunctionIndexOffset,
MachineType::Uint8()));
return ChangeInt32ToIntPtr(LoadObjectField<Uint8T>(
map, Map::kInObjectPropertiesStartOrConstructorFunctionIndexOffset));
}
TNode<IntPtrT> CodeStubAssembler::LoadMapConstructorFunctionIndex(
......@@ -1773,9 +1771,8 @@ TNode<IntPtrT> CodeStubAssembler::LoadMapConstructorFunctionIndex(
CSA_SLOW_ASSERT(this, IsMap(map));
// See Map::GetConstructorFunctionIndex() for details.
CSA_ASSERT(this, IsPrimitiveInstanceType(LoadMapInstanceType(map)));
return ChangeInt32ToIntPtr(LoadObjectField(
map, Map::kInObjectPropertiesStartOrConstructorFunctionIndexOffset,
MachineType::Uint8()));
return ChangeInt32ToIntPtr(LoadObjectField<Uint8T>(
map, Map::kInObjectPropertiesStartOrConstructorFunctionIndexOffset));
}
TNode<Object> CodeStubAssembler::LoadMapConstructor(SloppyTNode<Map> map) {
......
......@@ -562,7 +562,7 @@ TNode<UintPtrT> CodeAssembler::ChangeUint32ToWord(TNode<Word32T> value) {
return ReinterpretCast<UintPtrT>(value);
}
TNode<IntPtrT> CodeAssembler::ChangeInt32ToIntPtr(SloppyTNode<Word32T> value) {
TNode<IntPtrT> CodeAssembler::ChangeInt32ToIntPtr(TNode<Word32T> value) {
if (raw_assembler()->machine()->Is64()) {
return ReinterpretCast<IntPtrT>(raw_assembler()->ChangeInt32ToInt64(value));
}
......@@ -577,8 +577,7 @@ TNode<IntPtrT> CodeAssembler::ChangeFloat64ToIntPtr(TNode<Float64T> value) {
return ReinterpretCast<IntPtrT>(raw_assembler()->ChangeFloat64ToInt32(value));
}
TNode<UintPtrT> CodeAssembler::ChangeFloat64ToUintPtr(
SloppyTNode<Float64T> value) {
TNode<UintPtrT> CodeAssembler::ChangeFloat64ToUintPtr(TNode<Float64T> value) {
if (raw_assembler()->machine()->Is64()) {
return ReinterpretCast<UintPtrT>(
raw_assembler()->ChangeFloat64ToUint64(value));
......
......@@ -920,7 +920,7 @@ class V8_EXPORT_PRIVATE CodeAssembler {
// Changes a double to an inptr_t for pointer arithmetic outside of Smi range.
// Assumes that the double can be exactly represented as an int.
TNode<IntPtrT> ChangeFloat64ToIntPtr(TNode<Float64T> value);
TNode<UintPtrT> ChangeFloat64ToUintPtr(SloppyTNode<Float64T> value);
TNode<UintPtrT> ChangeFloat64ToUintPtr(TNode<Float64T> value);
// Same in the opposite direction.
TNode<Float64T> ChangeUintPtrToFloat64(TNode<UintPtrT> value);
......@@ -931,7 +931,7 @@ class V8_EXPORT_PRIVATE CodeAssembler {
// No-op on 32-bit, otherwise zero extend.
TNode<UintPtrT> ChangeUint32ToWord(TNode<Word32T> value);
// No-op on 32-bit, otherwise sign extend.
TNode<IntPtrT> ChangeInt32ToIntPtr(SloppyTNode<Word32T> value);
TNode<IntPtrT> ChangeInt32ToIntPtr(TNode<Word32T> value);
// No-op that guarantees that the value is kept alive till this point even
// if GC happens.
......
......@@ -265,8 +265,7 @@ TNode<IntPtrT> InterpreterAssembler::LoadAndUntagRegister(Register reg) {
#if V8_TARGET_LITTLE_ENDIAN
index += 4;
#endif
return ChangeInt32ToIntPtr(
Load(MachineType::Int32(), base, IntPtrConstant(index)));
return ChangeInt32ToIntPtr(Load<Int32T>(base, IntPtrConstant(index)));
} else {
return SmiToIntPtr(
Load(MachineType::TaggedSigned(), base, IntPtrConstant(index)));
......
......@@ -433,8 +433,9 @@ void ImplementationVisitor::Visit(Builtin* builtin) {
source_out()
<< " Node* argc = Parameter(Descriptor::kJSActualArgumentsCount);\n";
source_out()
<< " TNode<IntPtrT> arguments_length(ChangeInt32ToIntPtr(argc));\n";
source_out() << " TNode<IntPtrT> "
"arguments_length(ChangeInt32ToIntPtr(UncheckedCast<"
"Int32T>(argc)));\n";
source_out() << " TNode<RawPtrT> arguments_frame = "
"UncheckedCast<RawPtrT>(LoadFramePointer());\n";
source_out() << " TorqueStructArguments "
......
......@@ -34,10 +34,9 @@ Node* UndefinedConstant(CodeAssembler* m) {
return m->LoadRoot(RootIndex::kUndefinedValue);
}
TNode<Smi> SmiFromInt32(CodeAssembler* m, Node* value) {
value = m->ChangeInt32ToIntPtr(value);
TNode<Smi> SmiFromInt32(CodeAssembler* m, TNode<Int32T> value) {
return m->BitcastWordToTaggedSigned(
m->WordShl(value, kSmiShiftSize + kSmiTagSize));
m->WordShl(m->ChangeInt32ToIntPtr(value), kSmiShiftSize + kSmiTagSize));
}
Node* LoadObjectField(CodeAssembler* m, Node* object, int offset,
......@@ -514,7 +513,7 @@ TEST(GotoIfExceptionMultiple) {
error.Bind(UndefinedConstant(&m));
string = m.CallStub(to_string, context, second_value);
m.GotoIfException(string, &exception_handler2, &error);
m.Return(SmiFromInt32(&m, return_value.value()));
m.Return(SmiFromInt32(&m, m.UncheckedCast<Int32T>(return_value.value())));
// try { ToString(param3); return 7 & ~2; } catch (e) { return e; }
m.Bind(&exception_handler2);
......@@ -523,8 +522,9 @@ TEST(GotoIfExceptionMultiple) {
string = m.CallStub(to_string, context, third_value);
m.GotoIfException(string, &exception_handler3, &error);
m.Return(SmiFromInt32(
&m, m.Word32And(return_value.value(),
m.Word32Xor(m.Int32Constant(2), m.Int32Constant(-1)))));
&m, m.UncheckedCast<Int32T>(m.Word32And(
return_value.value(),
m.Word32Xor(m.Int32Constant(2), m.Int32Constant(-1))))));
m.Bind(&exception_handler3);
m.Return(m.UncheckedCast<Object>(error.value()));
......
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