[csa][cleanup] Remove Sloppy-ness for more classes
Remove for: * Number * BoolT * Context * HeapObject Bug: v8:6949, v8:11074 Change-Id: Id9f96314c93c75094a2440e1903b56e0649111b2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2523312 Reviewed-by: Mythri Alle <mythria@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#71042}
This commit is contained in:
parent
829af6dfa6
commit
2a69a92c01
@ -197,24 +197,26 @@ void CodeStubAssembler::FailAssert(
|
||||
Unreachable();
|
||||
}
|
||||
|
||||
TNode<Int32T> CodeStubAssembler::SelectInt32Constant(
|
||||
SloppyTNode<BoolT> condition, int true_value, int false_value) {
|
||||
TNode<Int32T> CodeStubAssembler::SelectInt32Constant(TNode<BoolT> condition,
|
||||
int true_value,
|
||||
int false_value) {
|
||||
return SelectConstant<Int32T>(condition, Int32Constant(true_value),
|
||||
Int32Constant(false_value));
|
||||
}
|
||||
|
||||
TNode<IntPtrT> CodeStubAssembler::SelectIntPtrConstant(
|
||||
SloppyTNode<BoolT> condition, int true_value, int false_value) {
|
||||
TNode<IntPtrT> CodeStubAssembler::SelectIntPtrConstant(TNode<BoolT> condition,
|
||||
int true_value,
|
||||
int false_value) {
|
||||
return SelectConstant<IntPtrT>(condition, IntPtrConstant(true_value),
|
||||
IntPtrConstant(false_value));
|
||||
}
|
||||
|
||||
TNode<Oddball> CodeStubAssembler::SelectBooleanConstant(
|
||||
SloppyTNode<BoolT> condition) {
|
||||
TNode<BoolT> condition) {
|
||||
return SelectConstant<Oddball>(condition, TrueConstant(), FalseConstant());
|
||||
}
|
||||
|
||||
TNode<Smi> CodeStubAssembler::SelectSmiConstant(SloppyTNode<BoolT> condition,
|
||||
TNode<Smi> CodeStubAssembler::SelectSmiConstant(TNode<BoolT> condition,
|
||||
Smi true_value,
|
||||
Smi false_value) {
|
||||
return SelectConstant<Smi>(condition, SmiConstant(true_value),
|
||||
@ -770,8 +772,7 @@ TNode<Smi> CodeStubAssembler::TrySmiAbs(TNode<Smi> a, Label* if_overflow) {
|
||||
}
|
||||
}
|
||||
|
||||
TNode<Number> CodeStubAssembler::NumberMax(SloppyTNode<Number> a,
|
||||
SloppyTNode<Number> b) {
|
||||
TNode<Number> CodeStubAssembler::NumberMax(TNode<Number> a, TNode<Number> b) {
|
||||
// TODO(danno): This could be optimized by specifically handling smi cases.
|
||||
TVARIABLE(Number, result);
|
||||
Label done(this), greater_than_equal_a(this), greater_than_equal_b(this);
|
||||
@ -789,8 +790,7 @@ TNode<Number> CodeStubAssembler::NumberMax(SloppyTNode<Number> a,
|
||||
return result.value();
|
||||
}
|
||||
|
||||
TNode<Number> CodeStubAssembler::NumberMin(SloppyTNode<Number> a,
|
||||
SloppyTNode<Number> b) {
|
||||
TNode<Number> CodeStubAssembler::NumberMin(TNode<Number> a, TNode<Number> b) {
|
||||
// TODO(danno): This could be optimized by specifically handling smi cases.
|
||||
TVARIABLE(Number, result);
|
||||
Label done(this), greater_than_equal_a(this), greater_than_equal_b(this);
|
||||
@ -1485,7 +1485,7 @@ TNode<Object> CodeStubAssembler::LoadFromParentFrame(int offset) {
|
||||
}
|
||||
|
||||
TNode<IntPtrT> CodeStubAssembler::LoadAndUntagObjectField(
|
||||
SloppyTNode<HeapObject> object, int offset) {
|
||||
TNode<HeapObject> object, int offset) {
|
||||
if (SmiValuesAre32Bits()) {
|
||||
#if V8_TARGET_LITTLE_ENDIAN
|
||||
offset += 4;
|
||||
@ -1497,7 +1497,7 @@ TNode<IntPtrT> CodeStubAssembler::LoadAndUntagObjectField(
|
||||
}
|
||||
|
||||
TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32ObjectField(
|
||||
SloppyTNode<HeapObject> object, int offset) {
|
||||
TNode<HeapObject> object, int offset) {
|
||||
if (SmiValuesAre32Bits()) {
|
||||
#if V8_TARGET_LITTLE_ENDIAN
|
||||
offset += 4;
|
||||
@ -1509,7 +1509,7 @@ TNode<Int32T> CodeStubAssembler::LoadAndUntagToWord32ObjectField(
|
||||
}
|
||||
|
||||
TNode<Float64T> CodeStubAssembler::LoadHeapNumberValue(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<HeapObject> object) {
|
||||
CSA_ASSERT(this, Word32Or(IsHeapNumber(object), IsOddball(object)));
|
||||
STATIC_ASSERT(HeapNumber::kValueOffset == Oddball::kToNumberRawOffset);
|
||||
return LoadObjectField<Float64T>(object, HeapNumber::kValueOffset);
|
||||
@ -1522,27 +1522,26 @@ TNode<Map> CodeStubAssembler::GetInstanceTypeMap(InstanceType instance_type) {
|
||||
return HeapConstant(map_handle);
|
||||
}
|
||||
|
||||
TNode<Map> CodeStubAssembler::LoadMap(SloppyTNode<HeapObject> object) {
|
||||
TNode<Map> CodeStubAssembler::LoadMap(TNode<HeapObject> object) {
|
||||
return LoadObjectField<Map>(object, HeapObject::kMapOffset);
|
||||
}
|
||||
|
||||
TNode<Uint16T> CodeStubAssembler::LoadInstanceType(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<Uint16T> CodeStubAssembler::LoadInstanceType(TNode<HeapObject> object) {
|
||||
return LoadMapInstanceType(LoadMap(object));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::HasInstanceType(SloppyTNode<HeapObject> object,
|
||||
TNode<BoolT> CodeStubAssembler::HasInstanceType(TNode<HeapObject> object,
|
||||
InstanceType instance_type) {
|
||||
return InstanceTypeEqual(LoadInstanceType(object), instance_type);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::DoesntHaveInstanceType(
|
||||
SloppyTNode<HeapObject> object, InstanceType instance_type) {
|
||||
TNode<HeapObject> object, InstanceType instance_type) {
|
||||
return Word32NotEqual(LoadInstanceType(object), Int32Constant(instance_type));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::TaggedDoesntHaveInstanceType(
|
||||
SloppyTNode<HeapObject> any_tagged, InstanceType type) {
|
||||
TNode<HeapObject> any_tagged, InstanceType type) {
|
||||
/* return Phi <TaggedIsSmi(val), DoesntHaveInstanceType(val, type)> */
|
||||
TNode<BoolT> tagged_is_smi = TaggedIsSmi(any_tagged);
|
||||
return Select<BoolT>(
|
||||
@ -1678,8 +1677,7 @@ TNode<Int32T> CodeStubAssembler::LoadMapElementsKind(TNode<Map> map) {
|
||||
return Signed(DecodeWord32<Map::Bits2::ElementsKindBits>(bit_field2));
|
||||
}
|
||||
|
||||
TNode<Int32T> CodeStubAssembler::LoadElementsKind(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<Int32T> CodeStubAssembler::LoadElementsKind(TNode<HeapObject> object) {
|
||||
return LoadMapElementsKind(LoadMap(object));
|
||||
}
|
||||
|
||||
@ -2560,21 +2558,20 @@ TNode<BoolT> CodeStubAssembler::LoadScopeInfoHasExtensionField(
|
||||
}
|
||||
|
||||
void CodeStubAssembler::StoreContextElementNoWriteBarrier(
|
||||
SloppyTNode<Context> context, int slot_index, SloppyTNode<Object> value) {
|
||||
TNode<Context> context, int slot_index, SloppyTNode<Object> value) {
|
||||
int offset = Context::SlotOffset(slot_index);
|
||||
StoreNoWriteBarrier(MachineRepresentation::kTagged, context,
|
||||
IntPtrConstant(offset), value);
|
||||
}
|
||||
|
||||
TNode<NativeContext> CodeStubAssembler::LoadNativeContext(
|
||||
SloppyTNode<Context> context) {
|
||||
TNode<Context> context) {
|
||||
TNode<Map> map = LoadMap(context);
|
||||
return CAST(LoadObjectField(
|
||||
map, Map::kConstructorOrBackPointerOrNativeContextOffset));
|
||||
}
|
||||
|
||||
TNode<Context> CodeStubAssembler::LoadModuleContext(
|
||||
SloppyTNode<Context> context) {
|
||||
TNode<Context> CodeStubAssembler::LoadModuleContext(TNode<Context> context) {
|
||||
TNode<NativeContext> native_context = LoadNativeContext(context);
|
||||
TNode<Map> module_map = CAST(
|
||||
LoadContextElement(native_context, Context::MODULE_CONTEXT_MAP_INDEX));
|
||||
@ -3461,7 +3458,7 @@ void CodeStubAssembler::InitializeJSObjectFromMap(
|
||||
}
|
||||
|
||||
void CodeStubAssembler::InitializeJSObjectBodyNoSlackTracking(
|
||||
SloppyTNode<HeapObject> object, TNode<Map> map,
|
||||
TNode<HeapObject> object, TNode<Map> map,
|
||||
SloppyTNode<IntPtrT> instance_size, int start_offset) {
|
||||
STATIC_ASSERT(Map::kNoSlackTracking == 0);
|
||||
CSA_ASSERT(this, IsClearWord32<Map::Bits3::ConstructionCounterBits>(
|
||||
@ -3471,7 +3468,7 @@ void CodeStubAssembler::InitializeJSObjectBodyNoSlackTracking(
|
||||
}
|
||||
|
||||
void CodeStubAssembler::InitializeJSObjectBodyWithSlackTracking(
|
||||
SloppyTNode<HeapObject> object, TNode<Map> map,
|
||||
TNode<HeapObject> object, TNode<Map> map,
|
||||
SloppyTNode<IntPtrT> instance_size) {
|
||||
Comment("InitializeJSObjectBodyNoSlackTracking");
|
||||
|
||||
@ -5000,7 +4997,7 @@ TNode<Float64T> CodeStubAssembler::TryTaggedToFloat64(
|
||||
}
|
||||
|
||||
TNode<Float64T> CodeStubAssembler::TruncateTaggedToFloat64(
|
||||
SloppyTNode<Context> context, SloppyTNode<Object> value) {
|
||||
TNode<Context> context, SloppyTNode<Object> value) {
|
||||
// We might need to loop once due to ToNumber conversion.
|
||||
TVARIABLE(Object, var_value, value);
|
||||
TVARIABLE(Float64T, var_result);
|
||||
@ -5030,7 +5027,7 @@ TNode<Float64T> CodeStubAssembler::TruncateTaggedToFloat64(
|
||||
}
|
||||
|
||||
TNode<Word32T> CodeStubAssembler::TruncateTaggedToWord32(
|
||||
SloppyTNode<Context> context, SloppyTNode<Object> value) {
|
||||
TNode<Context> context, SloppyTNode<Object> value) {
|
||||
TVARIABLE(Word32T, var_result);
|
||||
Label done(this);
|
||||
TaggedToWord32OrBigIntImpl<Object::Conversion::kToNumber>(context, value,
|
||||
@ -5761,7 +5758,7 @@ TNode<BoolT> CodeStubAssembler::IsPromiseSpeciesProtectorCellInvalid() {
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsPrototypeInitialArrayPrototype(
|
||||
SloppyTNode<Context> context, TNode<Map> map) {
|
||||
TNode<Context> context, TNode<Map> map) {
|
||||
const TNode<NativeContext> native_context = LoadNativeContext(context);
|
||||
const TNode<Object> initial_array_prototype = LoadContextElement(
|
||||
native_context, Context::INITIAL_ARRAY_PROTOTYPE_INDEX);
|
||||
@ -5770,7 +5767,7 @@ TNode<BoolT> CodeStubAssembler::IsPrototypeInitialArrayPrototype(
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsPrototypeTypedArrayPrototype(
|
||||
SloppyTNode<Context> context, TNode<Map> map) {
|
||||
TNode<Context> context, TNode<Map> map) {
|
||||
const TNode<NativeContext> native_context = LoadNativeContext(context);
|
||||
const TNode<Object> typed_array_prototype =
|
||||
LoadContextElement(native_context, Context::TYPED_ARRAY_PROTOTYPE_INDEX);
|
||||
@ -5821,7 +5818,7 @@ TNode<BoolT> CodeStubAssembler::TaggedIsCallable(TNode<Object> object) {
|
||||
});
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsCallable(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsCallable(TNode<HeapObject> object) {
|
||||
return IsCallableMap(LoadMap(object));
|
||||
}
|
||||
|
||||
@ -5829,7 +5826,7 @@ TNode<BoolT> CodeStubAssembler::IsConstructorMap(TNode<Map> map) {
|
||||
return IsSetWord32<Map::Bits1::IsConstructorBit>(LoadMapBitField(map));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsConstructor(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsConstructor(TNode<HeapObject> object) {
|
||||
return IsConstructorMap(LoadMap(object));
|
||||
}
|
||||
|
||||
@ -5924,12 +5921,11 @@ TNode<BoolT> CodeStubAssembler::IsJSReceiverMap(TNode<Map> map) {
|
||||
return IsJSReceiverInstanceType(LoadMapInstanceType(map));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSReceiver(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSReceiver(TNode<HeapObject> object) {
|
||||
return IsJSReceiverMap(LoadMap(object));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsNullOrJSReceiver(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsNullOrJSReceiver(TNode<HeapObject> object) {
|
||||
return UncheckedCast<BoolT>(Word32Or(IsJSReceiver(object), IsNull(object)));
|
||||
}
|
||||
|
||||
@ -5946,8 +5942,7 @@ TNode<BoolT> CodeStubAssembler::IsJSGlobalProxyMap(TNode<Map> map) {
|
||||
return IsJSGlobalProxyInstanceType(LoadMapInstanceType(map));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSGlobalProxy(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSGlobalProxy(TNode<HeapObject> object) {
|
||||
return IsJSGlobalProxyMap(LoadMap(object));
|
||||
}
|
||||
|
||||
@ -5966,7 +5961,7 @@ TNode<BoolT> CodeStubAssembler::IsJSObjectMap(TNode<Map> map) {
|
||||
return IsJSObjectInstanceType(LoadMapInstanceType(map));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSObject(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSObject(TNode<HeapObject> object) {
|
||||
return IsJSObjectMap(LoadMap(object));
|
||||
}
|
||||
|
||||
@ -5984,25 +5979,24 @@ TNode<BoolT> CodeStubAssembler::IsJSPromiseMap(TNode<Map> map) {
|
||||
return InstanceTypeEqual(LoadMapInstanceType(map), JS_PROMISE_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSPromise(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSPromise(TNode<HeapObject> object) {
|
||||
return IsJSPromiseMap(LoadMap(object));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSProxy(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSProxy(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, JS_PROXY_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSStringIterator(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSStringIterator(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, JS_STRING_ITERATOR_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSRegExpStringIterator(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, JS_REG_EXP_STRING_ITERATOR_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsMap(SloppyTNode<HeapObject> map) {
|
||||
TNode<BoolT> CodeStubAssembler::IsMap(TNode<HeapObject> map) {
|
||||
return IsMetaMap(LoadMap(map));
|
||||
}
|
||||
|
||||
@ -6011,8 +6005,7 @@ TNode<BoolT> CodeStubAssembler::IsJSPrimitiveWrapperInstanceType(
|
||||
return InstanceTypeEqual(instance_type, JS_PRIMITIVE_WRAPPER_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSPrimitiveWrapper(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSPrimitiveWrapper(TNode<HeapObject> object) {
|
||||
return IsJSPrimitiveWrapperMap(LoadMap(object));
|
||||
}
|
||||
|
||||
@ -6025,7 +6018,7 @@ TNode<BoolT> CodeStubAssembler::IsJSArrayInstanceType(
|
||||
return InstanceTypeEqual(instance_type, JS_ARRAY_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSArray(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSArray(TNode<HeapObject> object) {
|
||||
return IsJSArrayMap(LoadMap(object));
|
||||
}
|
||||
|
||||
@ -6033,22 +6026,20 @@ TNode<BoolT> CodeStubAssembler::IsJSArrayMap(TNode<Map> map) {
|
||||
return IsJSArrayInstanceType(LoadMapInstanceType(map));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSArrayIterator(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSArrayIterator(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, JS_ARRAY_ITERATOR_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSAsyncGeneratorObject(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, JS_ASYNC_GENERATOR_OBJECT_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsFixedArray(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsFixedArray(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, FIXED_ARRAY_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsFixedArraySubclass(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsFixedArraySubclass(TNode<HeapObject> object) {
|
||||
TNode<Uint16T> instance_type = LoadInstanceType(object);
|
||||
return UncheckedCast<BoolT>(
|
||||
Word32And(Int32GreaterThanOrEqual(instance_type,
|
||||
@ -6058,7 +6049,7 @@ TNode<BoolT> CodeStubAssembler::IsFixedArraySubclass(
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsNotWeakFixedArraySubclass(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<HeapObject> object) {
|
||||
TNode<Uint16T> instance_type = LoadInstanceType(object);
|
||||
return UncheckedCast<BoolT>(Word32Or(
|
||||
Int32LessThan(instance_type, Int32Constant(FIRST_WEAK_FIXED_ARRAY_TYPE)),
|
||||
@ -6066,8 +6057,7 @@ TNode<BoolT> CodeStubAssembler::IsNotWeakFixedArraySubclass(
|
||||
Int32Constant(LAST_WEAK_FIXED_ARRAY_TYPE))));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsPropertyArray(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsPropertyArray(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, PROPERTY_ARRAY_TYPE);
|
||||
}
|
||||
|
||||
@ -6104,8 +6094,8 @@ TNode<BoolT> CodeStubAssembler::IsFixedArrayWithKindOrEmpty(
|
||||
return var_result.value();
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsFixedArrayWithKind(
|
||||
SloppyTNode<HeapObject> object, ElementsKind kind) {
|
||||
TNode<BoolT> CodeStubAssembler::IsFixedArrayWithKind(TNode<HeapObject> object,
|
||||
ElementsKind kind) {
|
||||
if (IsDoubleElementsKind(kind)) {
|
||||
return IsFixedDoubleArray(object);
|
||||
} else {
|
||||
@ -6115,11 +6105,11 @@ TNode<BoolT> CodeStubAssembler::IsFixedArrayWithKind(
|
||||
}
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsBoolean(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsBoolean(TNode<HeapObject> object) {
|
||||
return IsBooleanMap(LoadMap(object));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsPropertyCell(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsPropertyCell(TNode<HeapObject> object) {
|
||||
return IsPropertyCellMap(LoadMap(object));
|
||||
}
|
||||
|
||||
@ -6128,7 +6118,7 @@ TNode<BoolT> CodeStubAssembler::IsHeapNumberInstanceType(
|
||||
return InstanceTypeEqual(instance_type, HEAP_NUMBER_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsOddball(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsOddball(TNode<HeapObject> object) {
|
||||
return IsOddballInstanceType(LoadInstanceType(object));
|
||||
}
|
||||
|
||||
@ -6137,7 +6127,7 @@ TNode<BoolT> CodeStubAssembler::IsOddballInstanceType(
|
||||
return InstanceTypeEqual(instance_type, ODDBALL_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsName(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsName(TNode<HeapObject> object) {
|
||||
return IsNameInstanceType(LoadInstanceType(object));
|
||||
}
|
||||
|
||||
@ -6146,7 +6136,7 @@ TNode<BoolT> CodeStubAssembler::IsNameInstanceType(
|
||||
return Int32LessThanOrEqual(instance_type, Int32Constant(LAST_NAME_TYPE));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsString(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsString(TNode<HeapObject> object) {
|
||||
return IsStringInstanceType(LoadInstanceType(object));
|
||||
}
|
||||
|
||||
@ -6214,7 +6204,7 @@ TNode<BoolT> CodeStubAssembler::IsBigIntInstanceType(
|
||||
return InstanceTypeEqual(instance_type, BIGINT_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsBigInt(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsBigInt(TNode<HeapObject> object) {
|
||||
return IsBigIntInstanceType(LoadInstanceType(object));
|
||||
}
|
||||
|
||||
@ -6229,7 +6219,7 @@ TNode<BoolT> CodeStubAssembler::IsPrivateName(SloppyTNode<Symbol> symbol) {
|
||||
return IsSetWord32<Symbol::IsPrivateNameBit>(flags);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsHashTable(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsHashTable(TNode<HeapObject> object) {
|
||||
TNode<Uint16T> instance_type = LoadInstanceType(object);
|
||||
return UncheckedCast<BoolT>(
|
||||
Word32And(Int32GreaterThanOrEqual(instance_type,
|
||||
@ -6238,23 +6228,19 @@ TNode<BoolT> CodeStubAssembler::IsHashTable(SloppyTNode<HeapObject> object) {
|
||||
Int32Constant(LAST_HASH_TABLE_TYPE))));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsEphemeronHashTable(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsEphemeronHashTable(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, EPHEMERON_HASH_TABLE_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsNameDictionary(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsNameDictionary(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, NAME_DICTIONARY_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsGlobalDictionary(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsGlobalDictionary(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, GLOBAL_DICTIONARY_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsNumberDictionary(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsNumberDictionary(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, NUMBER_DICTIONARY_TYPE);
|
||||
}
|
||||
|
||||
@ -6267,12 +6253,11 @@ TNode<BoolT> CodeStubAssembler::IsJSFunctionInstanceType(
|
||||
return InstanceTypeEqual(instance_type, JS_FUNCTION_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSFunction(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSFunction(TNode<HeapObject> object) {
|
||||
return IsJSFunctionMap(LoadMap(object));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSBoundFunction(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSBoundFunction(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, JS_BOUND_FUNCTION_TYPE);
|
||||
}
|
||||
|
||||
@ -6289,12 +6274,11 @@ TNode<BoolT> CodeStubAssembler::IsJSTypedArrayMap(TNode<Map> map) {
|
||||
return IsJSTypedArrayInstanceType(LoadMapInstanceType(map));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSTypedArray(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSTypedArray(TNode<HeapObject> object) {
|
||||
return IsJSTypedArrayMap(LoadMap(object));
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSArrayBuffer(
|
||||
SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSArrayBuffer(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, JS_ARRAY_BUFFER_TYPE);
|
||||
}
|
||||
|
||||
@ -6302,7 +6286,7 @@ TNode<BoolT> CodeStubAssembler::IsJSDataView(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, JS_DATA_VIEW_TYPE);
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsJSRegExp(SloppyTNode<HeapObject> object) {
|
||||
TNode<BoolT> CodeStubAssembler::IsJSRegExp(TNode<HeapObject> object) {
|
||||
return HasInstanceType(object, JS_REG_EXP_TYPE);
|
||||
}
|
||||
|
||||
@ -6315,7 +6299,7 @@ TNode<BoolT> CodeStubAssembler::IsNumeric(SloppyTNode<Object> object) {
|
||||
});
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsNumberNormalized(SloppyTNode<Number> number) {
|
||||
TNode<BoolT> CodeStubAssembler::IsNumberNormalized(TNode<Number> number) {
|
||||
TVARIABLE(BoolT, var_result, Int32TrueConstant());
|
||||
Label out(this);
|
||||
|
||||
@ -6338,7 +6322,7 @@ TNode<BoolT> CodeStubAssembler::IsNumberNormalized(SloppyTNode<Number> number) {
|
||||
return var_result.value();
|
||||
}
|
||||
|
||||
TNode<BoolT> CodeStubAssembler::IsNumberPositive(SloppyTNode<Number> number) {
|
||||
TNode<BoolT> CodeStubAssembler::IsNumberPositive(TNode<Number> number) {
|
||||
return Select<BoolT>(
|
||||
TaggedIsSmi(number), [=] { return TaggedIsPositiveSmi(number); },
|
||||
[=] { return IsHeapNumberPositive(CAST(number)); });
|
||||
@ -6945,7 +6929,7 @@ TNode<Numeric> CodeStubAssembler::NonNumberToNumberOrNumeric(
|
||||
}
|
||||
|
||||
TNode<Number> CodeStubAssembler::NonNumberToNumber(
|
||||
TNode<Context> context, SloppyTNode<HeapObject> input,
|
||||
TNode<Context> context, TNode<HeapObject> input,
|
||||
BigIntHandling bigint_handling) {
|
||||
return CAST(NonNumberToNumberOrNumeric(
|
||||
context, input, Object::Conversion::kToNumber, bigint_handling));
|
||||
@ -6976,13 +6960,13 @@ void CodeStubAssembler::TryPlainPrimitiveNonNumberToNumber(
|
||||
BIND(&done);
|
||||
}
|
||||
|
||||
TNode<Numeric> CodeStubAssembler::NonNumberToNumeric(
|
||||
TNode<Context> context, SloppyTNode<HeapObject> input) {
|
||||
TNode<Numeric> CodeStubAssembler::NonNumberToNumeric(TNode<Context> context,
|
||||
TNode<HeapObject> input) {
|
||||
return NonNumberToNumberOrNumeric(context, input,
|
||||
Object::Conversion::kToNumeric);
|
||||
}
|
||||
|
||||
TNode<Number> CodeStubAssembler::ToNumber_Inline(SloppyTNode<Context> context,
|
||||
TNode<Number> CodeStubAssembler::ToNumber_Inline(TNode<Context> context,
|
||||
SloppyTNode<Object> input) {
|
||||
TVARIABLE(Number, var_result);
|
||||
Label end(this), not_smi(this, Label::kDeferred);
|
||||
@ -7151,7 +7135,7 @@ void CodeStubAssembler::TaggedToNumeric(TNode<Context> context,
|
||||
}
|
||||
|
||||
// ES#sec-touint32
|
||||
TNode<Number> CodeStubAssembler::ToUint32(SloppyTNode<Context> context,
|
||||
TNode<Number> CodeStubAssembler::ToUint32(TNode<Context> context,
|
||||
SloppyTNode<Object> input) {
|
||||
const TNode<Float64T> float_zero = Float64Constant(0.0);
|
||||
const TNode<Float64T> float_two_32 =
|
||||
@ -7254,7 +7238,7 @@ TNode<Number> CodeStubAssembler::ToUint32(SloppyTNode<Context> context,
|
||||
return CAST(var_result.value());
|
||||
}
|
||||
|
||||
TNode<String> CodeStubAssembler::ToString_Inline(SloppyTNode<Context> context,
|
||||
TNode<String> CodeStubAssembler::ToString_Inline(TNode<Context> context,
|
||||
SloppyTNode<Object> input) {
|
||||
TVARIABLE(Object, var_result, input);
|
||||
Label stub_call(this, Label::kDeferred), out(this);
|
||||
@ -7270,7 +7254,7 @@ TNode<String> CodeStubAssembler::ToString_Inline(SloppyTNode<Context> context,
|
||||
return CAST(var_result.value());
|
||||
}
|
||||
|
||||
TNode<JSReceiver> CodeStubAssembler::ToObject(SloppyTNode<Context> context,
|
||||
TNode<JSReceiver> CodeStubAssembler::ToObject(TNode<Context> context,
|
||||
SloppyTNode<Object> input) {
|
||||
return CAST(CallBuiltin(Builtins::kToObject, context, input));
|
||||
}
|
||||
@ -7299,7 +7283,7 @@ TNode<JSReceiver> CodeStubAssembler::ToObject_Inline(TNode<Context> context,
|
||||
return result.value();
|
||||
}
|
||||
|
||||
TNode<Number> CodeStubAssembler::ToLength_Inline(SloppyTNode<Context> context,
|
||||
TNode<Number> CodeStubAssembler::ToLength_Inline(TNode<Context> context,
|
||||
SloppyTNode<Object> input) {
|
||||
TNode<Smi> smi_zero = SmiConstant(0);
|
||||
return Select<Number>(
|
||||
@ -8474,11 +8458,11 @@ void CodeStubAssembler::TryLookupPropertyInSimpleObject(
|
||||
}
|
||||
|
||||
void CodeStubAssembler::TryLookupProperty(
|
||||
SloppyTNode<HeapObject> object, TNode<Map> map,
|
||||
SloppyTNode<Int32T> instance_type, TNode<Name> unique_name,
|
||||
Label* if_found_fast, Label* if_found_dict, Label* if_found_global,
|
||||
TVariable<HeapObject>* var_meta_storage, TVariable<IntPtrT>* var_name_index,
|
||||
Label* if_not_found, Label* if_bailout) {
|
||||
TNode<HeapObject> object, TNode<Map> map, SloppyTNode<Int32T> instance_type,
|
||||
TNode<Name> unique_name, Label* if_found_fast, Label* if_found_dict,
|
||||
Label* if_found_global, TVariable<HeapObject>* var_meta_storage,
|
||||
TVariable<IntPtrT>* var_name_index, Label* if_not_found,
|
||||
Label* if_bailout) {
|
||||
Label if_objectisspecial(this);
|
||||
GotoIf(IsSpecialReceiverInstanceType(instance_type), &if_objectisspecial);
|
||||
|
||||
@ -10516,12 +10500,11 @@ void CodeStubAssembler::InitializeFieldsWithRoot(TNode<HeapObject> object,
|
||||
-kTaggedSize, CodeStubAssembler::IndexAdvanceMode::kPre);
|
||||
}
|
||||
|
||||
void CodeStubAssembler::BranchIfNumberRelationalComparison(
|
||||
Operation op, SloppyTNode<Number> left, SloppyTNode<Number> right,
|
||||
Label* if_true, Label* if_false) {
|
||||
CSA_SLOW_ASSERT(this, IsNumber(left));
|
||||
CSA_SLOW_ASSERT(this, IsNumber(right));
|
||||
|
||||
void CodeStubAssembler::BranchIfNumberRelationalComparison(Operation op,
|
||||
TNode<Number> left,
|
||||
TNode<Number> right,
|
||||
Label* if_true,
|
||||
Label* if_false) {
|
||||
Label do_float_comparison(this);
|
||||
TVARIABLE(Float64T, var_left_float);
|
||||
TVARIABLE(Float64T, var_right_float);
|
||||
@ -10613,8 +10596,9 @@ void CodeStubAssembler::BranchIfNumberRelationalComparison(
|
||||
}
|
||||
}
|
||||
|
||||
void CodeStubAssembler::GotoIfNumberGreaterThanOrEqual(
|
||||
SloppyTNode<Number> left, SloppyTNode<Number> right, Label* if_true) {
|
||||
void CodeStubAssembler::GotoIfNumberGreaterThanOrEqual(TNode<Number> left,
|
||||
TNode<Number> right,
|
||||
Label* if_true) {
|
||||
Label if_false(this);
|
||||
BranchIfNumberRelationalComparison(Operation::kGreaterThanOrEqual, left,
|
||||
right, if_true, &if_false);
|
||||
@ -11169,7 +11153,7 @@ void CodeStubAssembler::GenerateEqual_Same(SloppyTNode<Object> value,
|
||||
// ES6 section 7.2.12 Abstract Equality Comparison
|
||||
TNode<Oddball> CodeStubAssembler::Equal(SloppyTNode<Object> left,
|
||||
SloppyTNode<Object> right,
|
||||
SloppyTNode<Context> context,
|
||||
TNode<Context> context,
|
||||
TVariable<Smi>* var_type_feedback) {
|
||||
// This is a slightly optimized version of Object::Equals. Whenever you
|
||||
// change something functionality wise in here, remember to update the
|
||||
@ -12110,7 +12094,7 @@ void CodeStubAssembler::BranchIfSameNumberValue(TNode<Float64T> lhs_value,
|
||||
}
|
||||
}
|
||||
|
||||
TNode<Oddball> CodeStubAssembler::HasProperty(SloppyTNode<Context> context,
|
||||
TNode<Oddball> CodeStubAssembler::HasProperty(TNode<Context> context,
|
||||
SloppyTNode<Object> object,
|
||||
SloppyTNode<Object> key,
|
||||
HasPropertyLookupMode mode) {
|
||||
@ -12361,7 +12345,7 @@ TNode<HeapObject> CodeStubAssembler::GetSuperConstructor(
|
||||
}
|
||||
|
||||
TNode<JSReceiver> CodeStubAssembler::SpeciesConstructor(
|
||||
SloppyTNode<Context> context, SloppyTNode<Object> object,
|
||||
TNode<Context> context, SloppyTNode<Object> object,
|
||||
TNode<JSReceiver> default_constructor) {
|
||||
Isolate* isolate = this->isolate();
|
||||
TVARIABLE(JSReceiver, var_result, default_constructor);
|
||||
@ -12476,7 +12460,7 @@ TNode<Oddball> CodeStubAssembler::InstanceOf(TNode<Object> object,
|
||||
return var_result.value();
|
||||
}
|
||||
|
||||
TNode<Number> CodeStubAssembler::NumberInc(SloppyTNode<Number> value) {
|
||||
TNode<Number> CodeStubAssembler::NumberInc(TNode<Number> value) {
|
||||
TVARIABLE(Number, var_result);
|
||||
TVARIABLE(Float64T, var_finc_value);
|
||||
Label if_issmi(this), if_isnotsmi(this), do_finc(this), end(this);
|
||||
@ -12519,7 +12503,7 @@ TNode<Number> CodeStubAssembler::NumberInc(SloppyTNode<Number> value) {
|
||||
return var_result.value();
|
||||
}
|
||||
|
||||
TNode<Number> CodeStubAssembler::NumberDec(SloppyTNode<Number> value) {
|
||||
TNode<Number> CodeStubAssembler::NumberDec(TNode<Number> value) {
|
||||
TVARIABLE(Number, var_result);
|
||||
TVARIABLE(Float64T, var_fdec_value);
|
||||
Label if_issmi(this), if_isnotsmi(this), do_fdec(this), end(this);
|
||||
@ -12562,8 +12546,7 @@ TNode<Number> CodeStubAssembler::NumberDec(SloppyTNode<Number> value) {
|
||||
return var_result.value();
|
||||
}
|
||||
|
||||
TNode<Number> CodeStubAssembler::NumberAdd(SloppyTNode<Number> a,
|
||||
SloppyTNode<Number> b) {
|
||||
TNode<Number> CodeStubAssembler::NumberAdd(TNode<Number> a, TNode<Number> b) {
|
||||
TVARIABLE(Number, var_result);
|
||||
Label float_add(this, Label::kDeferred), end(this);
|
||||
GotoIf(TaggedIsNotSmi(a), &float_add);
|
||||
@ -12584,8 +12567,7 @@ TNode<Number> CodeStubAssembler::NumberAdd(SloppyTNode<Number> a,
|
||||
return var_result.value();
|
||||
}
|
||||
|
||||
TNode<Number> CodeStubAssembler::NumberSub(SloppyTNode<Number> a,
|
||||
SloppyTNode<Number> b) {
|
||||
TNode<Number> CodeStubAssembler::NumberSub(TNode<Number> a, TNode<Number> b) {
|
||||
TVARIABLE(Number, var_result);
|
||||
Label float_sub(this, Label::kDeferred), end(this);
|
||||
GotoIf(TaggedIsNotSmi(a), &float_sub);
|
||||
@ -12651,7 +12633,7 @@ TNode<Number> CodeStubAssembler::BitwiseOp(TNode<Word32T> left32,
|
||||
}
|
||||
|
||||
TNode<JSObject> CodeStubAssembler::AllocateJSIteratorResult(
|
||||
SloppyTNode<Context> context, SloppyTNode<Object> value,
|
||||
TNode<Context> context, SloppyTNode<Object> value,
|
||||
SloppyTNode<Oddball> done) {
|
||||
CSA_ASSERT(this, IsBoolean(done));
|
||||
TNode<NativeContext> native_context = LoadNativeContext(context);
|
||||
@ -12711,7 +12693,7 @@ TNode<JSReceiver> CodeStubAssembler::ArraySpeciesCreate(TNode<Context> context,
|
||||
}
|
||||
|
||||
void CodeStubAssembler::ThrowIfArrayBufferIsDetached(
|
||||
SloppyTNode<Context> context, TNode<JSArrayBuffer> array_buffer,
|
||||
TNode<Context> context, TNode<JSArrayBuffer> array_buffer,
|
||||
const char* method_name) {
|
||||
Label if_detached(this, Label::kDeferred), if_not_detached(this);
|
||||
Branch(IsDetachedBuffer(array_buffer), &if_detached, &if_not_detached);
|
||||
@ -12721,7 +12703,7 @@ void CodeStubAssembler::ThrowIfArrayBufferIsDetached(
|
||||
}
|
||||
|
||||
void CodeStubAssembler::ThrowIfArrayBufferViewBufferIsDetached(
|
||||
SloppyTNode<Context> context, TNode<JSArrayBufferView> array_buffer_view,
|
||||
TNode<Context> context, TNode<JSArrayBufferView> array_buffer_view,
|
||||
const char* method_name) {
|
||||
TNode<JSArrayBuffer> buffer = LoadJSArrayBufferViewBuffer(array_buffer_view);
|
||||
ThrowIfArrayBufferIsDetached(context, buffer, method_name);
|
||||
|
@ -556,9 +556,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<Float64T> Float64RoundToEven(SloppyTNode<Float64T> x);
|
||||
TNode<Float64T> Float64Trunc(SloppyTNode<Float64T> x);
|
||||
// Select the minimum of the two provided Number values.
|
||||
TNode<Number> NumberMax(SloppyTNode<Number> left, SloppyTNode<Number> right);
|
||||
TNode<Number> NumberMax(TNode<Number> left, TNode<Number> right);
|
||||
// Select the minimum of the two provided Number values.
|
||||
TNode<Number> NumberMin(SloppyTNode<Number> left, SloppyTNode<Number> right);
|
||||
TNode<Number> NumberMin(TNode<Number> left, TNode<Number> right);
|
||||
|
||||
// Returns true iff the given value fits into smi range and is >= 0.
|
||||
TNode<BoolT> IsValidPositiveSmi(TNode<IntPtrT> value);
|
||||
@ -720,10 +720,10 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
#undef BINT_COMPARISON_OP
|
||||
|
||||
// Smi | HeapNumber operations.
|
||||
TNode<Number> NumberInc(SloppyTNode<Number> value);
|
||||
TNode<Number> NumberDec(SloppyTNode<Number> value);
|
||||
TNode<Number> NumberAdd(SloppyTNode<Number> a, SloppyTNode<Number> b);
|
||||
TNode<Number> NumberSub(SloppyTNode<Number> a, SloppyTNode<Number> b);
|
||||
TNode<Number> NumberInc(TNode<Number> value);
|
||||
TNode<Number> NumberDec(TNode<Number> value);
|
||||
TNode<Number> NumberAdd(TNode<Number> a, TNode<Number> b);
|
||||
TNode<Number> NumberSub(TNode<Number> a, TNode<Number> b);
|
||||
void GotoIfNotNumber(TNode<Object> value, Label* is_not_number);
|
||||
void GotoIfNumber(TNode<Object> value, Label* is_number);
|
||||
TNode<Number> SmiToNumber(TNode<Smi> v) { return v; }
|
||||
@ -859,22 +859,22 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
condition, [=] { return true_value; }, [=] { return false_value; });
|
||||
}
|
||||
|
||||
TNode<Int32T> SelectInt32Constant(SloppyTNode<BoolT> condition,
|
||||
int true_value, int false_value);
|
||||
TNode<IntPtrT> SelectIntPtrConstant(SloppyTNode<BoolT> condition,
|
||||
int true_value, int false_value);
|
||||
TNode<Oddball> SelectBooleanConstant(SloppyTNode<BoolT> condition);
|
||||
TNode<Smi> SelectSmiConstant(SloppyTNode<BoolT> condition, Smi true_value,
|
||||
TNode<Int32T> SelectInt32Constant(TNode<BoolT> condition, int true_value,
|
||||
int false_value);
|
||||
TNode<IntPtrT> SelectIntPtrConstant(TNode<BoolT> condition, int true_value,
|
||||
int false_value);
|
||||
TNode<Oddball> SelectBooleanConstant(TNode<BoolT> condition);
|
||||
TNode<Smi> SelectSmiConstant(TNode<BoolT> condition, Smi true_value,
|
||||
Smi false_value);
|
||||
TNode<Smi> SelectSmiConstant(SloppyTNode<BoolT> condition, int true_value,
|
||||
TNode<Smi> SelectSmiConstant(TNode<BoolT> condition, int true_value,
|
||||
Smi false_value) {
|
||||
return SelectSmiConstant(condition, Smi::FromInt(true_value), false_value);
|
||||
}
|
||||
TNode<Smi> SelectSmiConstant(SloppyTNode<BoolT> condition, Smi true_value,
|
||||
TNode<Smi> SelectSmiConstant(TNode<BoolT> condition, Smi true_value,
|
||||
int false_value) {
|
||||
return SelectSmiConstant(condition, true_value, Smi::FromInt(false_value));
|
||||
}
|
||||
TNode<Smi> SelectSmiConstant(SloppyTNode<BoolT> condition, int true_value,
|
||||
TNode<Smi> SelectSmiConstant(TNode<BoolT> condition, int true_value,
|
||||
int false_value) {
|
||||
return SelectSmiConstant(condition, Smi::FromInt(true_value),
|
||||
Smi::FromInt(false_value));
|
||||
@ -1109,13 +1109,12 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
IntPtrSub(offset, IntPtrConstant(kHeapObjectTag))));
|
||||
}
|
||||
// Load a SMI field and untag it.
|
||||
TNode<IntPtrT> LoadAndUntagObjectField(SloppyTNode<HeapObject> object,
|
||||
int offset);
|
||||
TNode<IntPtrT> LoadAndUntagObjectField(TNode<HeapObject> object, int offset);
|
||||
// Load a SMI field, untag it, and convert to Word32.
|
||||
TNode<Int32T> LoadAndUntagToWord32ObjectField(SloppyTNode<HeapObject> object,
|
||||
TNode<Int32T> LoadAndUntagToWord32ObjectField(TNode<HeapObject> object,
|
||||
int offset);
|
||||
|
||||
TNode<MaybeObject> LoadMaybeWeakObjectField(SloppyTNode<HeapObject> object,
|
||||
TNode<MaybeObject> LoadMaybeWeakObjectField(TNode<HeapObject> object,
|
||||
int offset) {
|
||||
return UncheckedCast<MaybeObject>(LoadObjectField(object, offset));
|
||||
}
|
||||
@ -1184,17 +1183,16 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
}
|
||||
|
||||
// Load the floating point value of a HeapNumber.
|
||||
TNode<Float64T> LoadHeapNumberValue(SloppyTNode<HeapObject> object);
|
||||
TNode<Float64T> LoadHeapNumberValue(TNode<HeapObject> object);
|
||||
// Load the Map of an HeapObject.
|
||||
TNode<Map> LoadMap(SloppyTNode<HeapObject> object);
|
||||
TNode<Map> LoadMap(TNode<HeapObject> object);
|
||||
// Load the instance type of an HeapObject.
|
||||
TNode<Uint16T> LoadInstanceType(SloppyTNode<HeapObject> object);
|
||||
TNode<Uint16T> LoadInstanceType(TNode<HeapObject> object);
|
||||
// Compare the instance the type of the object against the provided one.
|
||||
TNode<BoolT> HasInstanceType(SloppyTNode<HeapObject> object,
|
||||
InstanceType type);
|
||||
TNode<BoolT> DoesntHaveInstanceType(SloppyTNode<HeapObject> object,
|
||||
TNode<BoolT> HasInstanceType(TNode<HeapObject> object, InstanceType type);
|
||||
TNode<BoolT> DoesntHaveInstanceType(TNode<HeapObject> object,
|
||||
InstanceType type);
|
||||
TNode<BoolT> TaggedDoesntHaveInstanceType(SloppyTNode<HeapObject> any_tagged,
|
||||
TNode<BoolT> TaggedDoesntHaveInstanceType(TNode<HeapObject> any_tagged,
|
||||
InstanceType type);
|
||||
|
||||
TNode<Word32T> IsStringWrapperElementsKind(TNode<Map> map);
|
||||
@ -1233,7 +1231,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<Uint16T> LoadMapInstanceType(TNode<Map> map);
|
||||
// Load the ElementsKind of a map.
|
||||
TNode<Int32T> LoadMapElementsKind(TNode<Map> map);
|
||||
TNode<Int32T> LoadElementsKind(SloppyTNode<HeapObject> object);
|
||||
TNode<Int32T> LoadElementsKind(TNode<HeapObject> object);
|
||||
// Load the instance descriptors of a map.
|
||||
TNode<DescriptorArray> LoadMapDescriptors(TNode<Map> map);
|
||||
// Load the prototype of a map.
|
||||
@ -1457,12 +1455,11 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<BoolT> LoadScopeInfoHasExtensionField(TNode<ScopeInfo> scope_info);
|
||||
|
||||
// Context manipulation:
|
||||
void StoreContextElementNoWriteBarrier(SloppyTNode<Context> context,
|
||||
int slot_index,
|
||||
void StoreContextElementNoWriteBarrier(TNode<Context> context, int slot_index,
|
||||
SloppyTNode<Object> value);
|
||||
TNode<NativeContext> LoadNativeContext(SloppyTNode<Context> context);
|
||||
TNode<NativeContext> LoadNativeContext(TNode<Context> context);
|
||||
// Calling this is only valid if there's a module context in the chain.
|
||||
TNode<Context> LoadModuleContext(SloppyTNode<Context> context);
|
||||
TNode<Context> LoadModuleContext(TNode<Context> context);
|
||||
|
||||
void GotoIfContextElementEqual(SloppyTNode<Object> value,
|
||||
TNode<NativeContext> native_context,
|
||||
@ -1757,10 +1754,10 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
SlackTrackingMode slack_tracking_mode = kNoSlackTracking);
|
||||
|
||||
void InitializeJSObjectBodyWithSlackTracking(
|
||||
SloppyTNode<HeapObject> object, TNode<Map> map,
|
||||
TNode<HeapObject> object, TNode<Map> map,
|
||||
SloppyTNode<IntPtrT> instance_size);
|
||||
void InitializeJSObjectBodyNoSlackTracking(
|
||||
SloppyTNode<HeapObject> object, TNode<Map> map,
|
||||
TNode<HeapObject> object, TNode<Map> map,
|
||||
SloppyTNode<IntPtrT> instance_size,
|
||||
int start_offset = JSObject::kHeaderSize);
|
||||
|
||||
@ -1881,7 +1878,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<PropertyArray> AllocatePropertyArray(TNode<IntPtrT> capacity);
|
||||
|
||||
// TODO(v8:9722): Return type should be JSIteratorResult
|
||||
TNode<JSObject> AllocateJSIteratorResult(SloppyTNode<Context> context,
|
||||
TNode<JSObject> AllocateJSIteratorResult(TNode<Context> context,
|
||||
SloppyTNode<Object> value,
|
||||
SloppyTNode<Oddball> done);
|
||||
|
||||
@ -2196,9 +2193,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
|
||||
TNode<Float64T> TryTaggedToFloat64(TNode<Object> value,
|
||||
Label* if_valueisnotnumber);
|
||||
TNode<Float64T> TruncateTaggedToFloat64(SloppyTNode<Context> context,
|
||||
TNode<Float64T> TruncateTaggedToFloat64(TNode<Context> context,
|
||||
SloppyTNode<Object> value);
|
||||
TNode<Word32T> TruncateTaggedToWord32(SloppyTNode<Context> context,
|
||||
TNode<Word32T> TruncateTaggedToWord32(TNode<Context> context,
|
||||
SloppyTNode<Object> value);
|
||||
void TaggedToWord32OrBigInt(TNode<Context> context, TNode<Object> value,
|
||||
Label* if_number, TVariable<Word32T>* var_word32,
|
||||
@ -2312,86 +2309,86 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<BoolT> IsNoElementsProtectorCellInvalid();
|
||||
TNode<BoolT> IsArrayIteratorProtectorCellInvalid();
|
||||
TNode<BoolT> IsBigIntInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsBigInt(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsBoolean(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsBigInt(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsBoolean(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsCallableMap(TNode<Map> map);
|
||||
TNode<BoolT> IsCallable(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsCallable(TNode<HeapObject> object);
|
||||
TNode<BoolT> TaggedIsCallable(TNode<Object> object);
|
||||
TNode<BoolT> IsConsStringInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsConstructorMap(TNode<Map> map);
|
||||
TNode<BoolT> IsConstructor(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsConstructor(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsDeprecatedMap(TNode<Map> map);
|
||||
TNode<BoolT> IsNameDictionary(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsGlobalDictionary(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsNameDictionary(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsGlobalDictionary(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsExtensibleMap(TNode<Map> map);
|
||||
TNode<BoolT> IsExtensibleNonPrototypeMap(TNode<Map> map);
|
||||
TNode<BoolT> IsExternalStringInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsFixedArray(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsFixedArraySubclass(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsFixedArrayWithKind(SloppyTNode<HeapObject> object,
|
||||
TNode<BoolT> IsFixedArray(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsFixedArraySubclass(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsFixedArrayWithKind(TNode<HeapObject> object,
|
||||
ElementsKind kind);
|
||||
TNode<BoolT> IsFixedArrayWithKindOrEmpty(TNode<FixedArrayBase> object,
|
||||
ElementsKind kind);
|
||||
TNode<BoolT> IsFunctionWithPrototypeSlotMap(TNode<Map> map);
|
||||
TNode<BoolT> IsHashTable(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsEphemeronHashTable(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsHashTable(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsEphemeronHashTable(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsHeapNumberInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsOddball(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsOddball(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsOddballInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsIndirectStringInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsJSArrayBuffer(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSArrayBuffer(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSDataView(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSArrayInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsJSArrayMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSArray(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSArrayIterator(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSAsyncGeneratorObject(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSArray(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSArrayIterator(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSAsyncGeneratorObject(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSFunctionInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsJSFunctionMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSFunction(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSBoundFunction(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSFunction(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSBoundFunction(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSGeneratorObject(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSGlobalProxyInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsJSGlobalProxyMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSGlobalProxy(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSGlobalProxy(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSObjectInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsJSObjectMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSObject(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSObject(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSFinalizationRegistryMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSFinalizationRegistry(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSPromiseMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSPromise(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSProxy(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSStringIterator(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSRegExpStringIterator(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSPromise(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSProxy(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSStringIterator(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSRegExpStringIterator(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSReceiverInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsJSReceiverMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSReceiver(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSRegExp(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSReceiver(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSRegExp(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSTypedArrayInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsJSTypedArrayMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSTypedArray(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSTypedArray(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSGeneratorMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSPrimitiveWrapperInstanceType(
|
||||
SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsJSPrimitiveWrapperMap(TNode<Map> map);
|
||||
TNode<BoolT> IsJSPrimitiveWrapper(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsMap(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsName(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsJSPrimitiveWrapper(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsMap(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsName(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsNameInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsNullOrJSReceiver(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsNullOrJSReceiver(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsNullOrUndefined(SloppyTNode<Object> object);
|
||||
TNode<BoolT> IsNumberDictionary(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsNumberDictionary(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsOneByteStringInstanceType(TNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsSeqOneByteStringInstanceType(TNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsPrimitiveInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsPrivateName(SloppyTNode<Symbol> symbol);
|
||||
TNode<BoolT> IsPropertyArray(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsPropertyCell(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsPropertyArray(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsPropertyCell(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsPromiseReactionJobTask(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsPrototypeInitialArrayPrototype(SloppyTNode<Context> context,
|
||||
TNode<BoolT> IsPrototypeInitialArrayPrototype(TNode<Context> context,
|
||||
TNode<Map> map);
|
||||
TNode<BoolT> IsPrototypeTypedArrayPrototype(SloppyTNode<Context> context,
|
||||
TNode<BoolT> IsPrototypeTypedArrayPrototype(TNode<Context> context,
|
||||
TNode<Map> map);
|
||||
|
||||
TNode<BoolT> IsFastAliasedArgumentsMap(TNode<Context> context,
|
||||
@ -2410,7 +2407,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsSpecialReceiverMap(TNode<Map> map);
|
||||
TNode<BoolT> IsStringInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
TNode<BoolT> IsString(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsString(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsSeqOneByteString(TNode<HeapObject> object);
|
||||
|
||||
TNode<BoolT> IsSymbolInstanceType(SloppyTNode<Int32T> instance_type);
|
||||
@ -2419,7 +2416,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<BoolT> IsUniqueNameNoIndex(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsUniqueNameNoCachedIndex(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsUndetectableMap(TNode<Map> map);
|
||||
TNode<BoolT> IsNotWeakFixedArraySubclass(SloppyTNode<HeapObject> object);
|
||||
TNode<BoolT> IsNotWeakFixedArraySubclass(TNode<HeapObject> object);
|
||||
TNode<BoolT> IsZeroOrContext(SloppyTNode<Object> object);
|
||||
|
||||
TNode<BoolT> IsPromiseResolveProtectorCellInvalid();
|
||||
@ -2443,8 +2440,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
|
||||
// True iff |number| is either a Smi, or a HeapNumber whose value is not
|
||||
// within Smi range.
|
||||
TNode<BoolT> IsNumberNormalized(SloppyTNode<Number> number);
|
||||
TNode<BoolT> IsNumberPositive(SloppyTNode<Number> number);
|
||||
TNode<BoolT> IsNumberNormalized(TNode<Number> number);
|
||||
TNode<BoolT> IsNumberPositive(TNode<Number> number);
|
||||
TNode<BoolT> IsHeapNumberPositive(TNode<HeapNumber> number);
|
||||
|
||||
// True iff {number} is non-negative and less or equal than 2**53-1.
|
||||
@ -2521,11 +2518,11 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
|
||||
// Convert a Non-Number object to a Number.
|
||||
TNode<Number> NonNumberToNumber(
|
||||
TNode<Context> context, SloppyTNode<HeapObject> input,
|
||||
TNode<Context> context, TNode<HeapObject> input,
|
||||
BigIntHandling bigint_handling = BigIntHandling::kThrow);
|
||||
// Convert a Non-Number object to a Numeric.
|
||||
TNode<Numeric> NonNumberToNumeric(TNode<Context> context,
|
||||
SloppyTNode<HeapObject> input);
|
||||
TNode<HeapObject> input);
|
||||
// Convert any object to a Number.
|
||||
// Conforms to ES#sec-tonumber if {bigint_handling} == kThrow.
|
||||
// With {bigint_handling} == kConvertToNumber, matches behavior of
|
||||
@ -2533,7 +2530,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<Number> ToNumber(
|
||||
TNode<Context> context, SloppyTNode<Object> input,
|
||||
BigIntHandling bigint_handling = BigIntHandling::kThrow);
|
||||
TNode<Number> ToNumber_Inline(SloppyTNode<Context> context,
|
||||
TNode<Number> ToNumber_Inline(TNode<Context> context,
|
||||
SloppyTNode<Object> input);
|
||||
// Convert any plain primitive to a Number. No need to handle BigInts since
|
||||
// they are not plain primitives.
|
||||
@ -2546,15 +2543,13 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
// Converts |input| to one of 2^32 integer values in the range 0 through
|
||||
// 2^32-1, inclusive.
|
||||
// ES#sec-touint32
|
||||
TNode<Number> ToUint32(SloppyTNode<Context> context,
|
||||
SloppyTNode<Object> input);
|
||||
TNode<Number> ToUint32(TNode<Context> context, SloppyTNode<Object> input);
|
||||
|
||||
// Convert any object to a String.
|
||||
TNode<String> ToString_Inline(SloppyTNode<Context> context,
|
||||
TNode<String> ToString_Inline(TNode<Context> context,
|
||||
SloppyTNode<Object> input);
|
||||
|
||||
TNode<JSReceiver> ToObject(SloppyTNode<Context> context,
|
||||
SloppyTNode<Object> input);
|
||||
TNode<JSReceiver> ToObject(TNode<Context> context, SloppyTNode<Object> input);
|
||||
|
||||
// Same as ToObject but avoids the Builtin call if |input| is already a
|
||||
// JSReceiver.
|
||||
@ -2562,7 +2557,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<Object> input);
|
||||
|
||||
// ES6 7.1.15 ToLength, but with inlined fast path.
|
||||
TNode<Number> ToLength_Inline(SloppyTNode<Context> context,
|
||||
TNode<Number> ToLength_Inline(TNode<Context> context,
|
||||
SloppyTNode<Object> input);
|
||||
|
||||
TNode<Object> OrdinaryToPrimitive(TNode<Context> context, TNode<Object> input,
|
||||
@ -2951,12 +2946,12 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TVariable<Object>* var_raw_value, Label* if_not_found,
|
||||
Label* if_bailout, GetOwnPropertyMode mode);
|
||||
|
||||
TNode<Object> GetProperty(SloppyTNode<Context> context,
|
||||
TNode<Object> GetProperty(TNode<Context> context,
|
||||
SloppyTNode<Object> receiver, Handle<Name> name) {
|
||||
return GetProperty(context, receiver, HeapConstant(name));
|
||||
}
|
||||
|
||||
TNode<Object> GetProperty(SloppyTNode<Context> context,
|
||||
TNode<Object> GetProperty(TNode<Context> context,
|
||||
SloppyTNode<Object> receiver,
|
||||
SloppyTNode<Object> name) {
|
||||
return CallBuiltin(Builtins::kGetProperty, context, receiver, name);
|
||||
@ -3028,7 +3023,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
//
|
||||
// Note: this code does not check if the global dictionary points to deleted
|
||||
// entry! This has to be done by the caller.
|
||||
void TryLookupProperty(SloppyTNode<HeapObject> object, TNode<Map> map,
|
||||
void TryLookupProperty(TNode<HeapObject> object, TNode<Map> map,
|
||||
SloppyTNode<Int32T> instance_type,
|
||||
TNode<Name> unique_name, Label* if_found_fast,
|
||||
Label* if_found_dict, Label* if_found_global,
|
||||
@ -3277,10 +3272,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
Operation op, TNode<Object> left, TNode<Object> right,
|
||||
TNode<Context> context, TVariable<Smi>* var_type_feedback = nullptr);
|
||||
|
||||
void BranchIfNumberRelationalComparison(Operation op,
|
||||
SloppyTNode<Number> left,
|
||||
SloppyTNode<Number> right,
|
||||
Label* if_true, Label* if_false);
|
||||
void BranchIfNumberRelationalComparison(Operation op, TNode<Number> left,
|
||||
TNode<Number> right, Label* if_true,
|
||||
Label* if_false);
|
||||
|
||||
void BranchIfNumberEqual(TNode<Number> left, TNode<Number> right,
|
||||
Label* if_true, Label* if_false) {
|
||||
@ -3323,12 +3317,11 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
Branch(IsAccessorPair(CAST(value)), if_accessor_pair, if_not_accessor_pair);
|
||||
}
|
||||
|
||||
void GotoIfNumberGreaterThanOrEqual(SloppyTNode<Number> left,
|
||||
SloppyTNode<Number> right,
|
||||
void GotoIfNumberGreaterThanOrEqual(TNode<Number> left, TNode<Number> right,
|
||||
Label* if_false);
|
||||
|
||||
TNode<Oddball> Equal(SloppyTNode<Object> lhs, SloppyTNode<Object> rhs,
|
||||
SloppyTNode<Context> context,
|
||||
TNode<Context> context,
|
||||
TVariable<Smi>* var_type_feedback = nullptr);
|
||||
|
||||
TNode<Oddball> StrictEqual(SloppyTNode<Object> lhs, SloppyTNode<Object> rhs,
|
||||
@ -3349,8 +3342,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
|
||||
enum HasPropertyLookupMode { kHasProperty, kForInHasProperty };
|
||||
|
||||
TNode<Oddball> HasProperty(SloppyTNode<Context> context,
|
||||
SloppyTNode<Object> object,
|
||||
TNode<Oddball> HasProperty(TNode<Context> context, SloppyTNode<Object> object,
|
||||
SloppyTNode<Object> key,
|
||||
HasPropertyLookupMode mode);
|
||||
|
||||
@ -3378,7 +3370,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
|
||||
TNode<HeapObject> GetSuperConstructor(TNode<JSFunction> active_function);
|
||||
|
||||
TNode<JSReceiver> SpeciesConstructor(SloppyTNode<Context> context,
|
||||
TNode<JSReceiver> SpeciesConstructor(TNode<Context> context,
|
||||
SloppyTNode<Object> object,
|
||||
TNode<JSReceiver> default_constructor);
|
||||
|
||||
@ -3391,7 +3383,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
// JSArrayBuffer helpers
|
||||
TNode<RawPtrT> LoadJSArrayBufferBackingStorePtr(
|
||||
TNode<JSArrayBuffer> array_buffer);
|
||||
void ThrowIfArrayBufferIsDetached(SloppyTNode<Context> context,
|
||||
void ThrowIfArrayBufferIsDetached(TNode<Context> context,
|
||||
TNode<JSArrayBuffer> array_buffer,
|
||||
const char* method_name);
|
||||
|
||||
@ -3403,7 +3395,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
TNode<UintPtrT> LoadJSArrayBufferViewByteOffset(
|
||||
TNode<JSArrayBufferView> array_buffer_view);
|
||||
void ThrowIfArrayBufferViewBufferIsDetached(
|
||||
SloppyTNode<Context> context, TNode<JSArrayBufferView> array_buffer_view,
|
||||
TNode<Context> context, TNode<JSArrayBufferView> array_buffer_view,
|
||||
const char* method_name);
|
||||
|
||||
// JSTypedArray helpers
|
||||
|
@ -123,10 +123,11 @@ Handle<Code> BuildSetupFunction(Isolate* isolate,
|
||||
case MachineRepresentation::kTagged:
|
||||
break;
|
||||
case MachineRepresentation::kFloat32:
|
||||
element = __ TruncateFloat64ToFloat32(__ LoadHeapNumberValue(element));
|
||||
element = __ TruncateFloat64ToFloat32(
|
||||
__ LoadHeapNumberValue(__ CAST(element)));
|
||||
break;
|
||||
case MachineRepresentation::kFloat64:
|
||||
element = __ LoadHeapNumberValue(element);
|
||||
element = __ LoadHeapNumberValue(__ CAST(element));
|
||||
break;
|
||||
case MachineRepresentation::kSimd128: {
|
||||
Node* vector = tester.raw_assembler_for_testing()->AddNode(
|
||||
|
Loading…
Reference in New Issue
Block a user