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

[CSA][cleanup] TNodify low hanging fruits in interpreter-generator

TNodify:
 * FloatOp
 * BigIntOp
 * Loads into their respective types
 * return type of:
  * GetContextAtDepth
  * ConstructWithSpread
  * Construct
  * CallBuiltin


Also TNodify CheckEnumCache in code-stub-assembler.

Bug: v8:6949, v8:9396
Change-Id: I79a90296b4851e47f4b89ed52fadfc9b61be1e6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1789161
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63625}
parent 0a31d508
...@@ -719,11 +719,11 @@ TF_BUILTIN(SetDataProperties, SetOrCopyDataPropertiesAssembler) { ...@@ -719,11 +719,11 @@ TF_BUILTIN(SetDataProperties, SetOrCopyDataPropertiesAssembler) {
} }
TF_BUILTIN(ForInEnumerate, CodeStubAssembler) { TF_BUILTIN(ForInEnumerate, CodeStubAssembler) {
Node* receiver = Parameter(Descriptor::kReceiver); TNode<HeapObject> receiver = CAST(Parameter(Descriptor::kReceiver));
Node* context = Parameter(Descriptor::kContext); TNode<Context> context = CAST(Parameter(Descriptor::kContext));
Label if_empty(this), if_runtime(this, Label::kDeferred); Label if_empty(this), if_runtime(this, Label::kDeferred);
Node* receiver_map = CheckEnumCache(receiver, &if_empty, &if_runtime); TNode<Map> receiver_map = CheckEnumCache(receiver, &if_empty, &if_runtime);
Return(receiver_map); Return(receiver_map);
BIND(&if_empty); BIND(&if_empty);
......
...@@ -1695,7 +1695,7 @@ void CodeStubAssembler::GotoIfMapHasSlowProperties(TNode<Map> map, ...@@ -1695,7 +1695,7 @@ void CodeStubAssembler::GotoIfMapHasSlowProperties(TNode<Map> map,
} }
TNode<HeapObject> CodeStubAssembler::LoadFastProperties( TNode<HeapObject> CodeStubAssembler::LoadFastProperties(
SloppyTNode<JSObject> object) { SloppyTNode<JSReceiver> object) {
CSA_SLOW_ASSERT(this, Word32BinaryNot(IsDictionaryMap(LoadMap(object)))); CSA_SLOW_ASSERT(this, Word32BinaryNot(IsDictionaryMap(LoadMap(object))));
TNode<Object> properties = LoadJSReceiverPropertiesOrHash(object); TNode<Object> properties = LoadJSReceiverPropertiesOrHash(object);
return Select<HeapObject>( return Select<HeapObject>(
...@@ -1704,7 +1704,7 @@ TNode<HeapObject> CodeStubAssembler::LoadFastProperties( ...@@ -1704,7 +1704,7 @@ TNode<HeapObject> CodeStubAssembler::LoadFastProperties(
} }
TNode<HeapObject> CodeStubAssembler::LoadSlowProperties( TNode<HeapObject> CodeStubAssembler::LoadSlowProperties(
SloppyTNode<JSObject> object) { SloppyTNode<JSReceiver> object) {
CSA_SLOW_ASSERT(this, IsDictionaryMap(LoadMap(object))); CSA_SLOW_ASSERT(this, IsDictionaryMap(LoadMap(object)));
TNode<Object> properties = LoadJSReceiverPropertiesOrHash(object); TNode<Object> properties = LoadJSReceiverPropertiesOrHash(object);
return Select<HeapObject>( return Select<HeapObject>(
...@@ -13977,7 +13977,8 @@ void CodeStubAssembler::CheckPrototypeEnumCache(Node* receiver, ...@@ -13977,7 +13977,8 @@ void CodeStubAssembler::CheckPrototypeEnumCache(Node* receiver,
} }
} }
Node* CodeStubAssembler::CheckEnumCache(Node* receiver, Label* if_empty, TNode<Map> CodeStubAssembler::CheckEnumCache(TNode<HeapObject> receiver,
Label* if_empty,
Label* if_runtime) { Label* if_runtime) {
Label if_fast(this), if_cache(this), if_no_cache(this, Label::kDeferred); Label if_fast(this), if_cache(this), if_no_cache(this, Label::kDeferred);
TNode<Map> receiver_map = LoadMap(receiver); TNode<Map> receiver_map = LoadMap(receiver);
...@@ -13993,7 +13994,7 @@ Node* CodeStubAssembler::CheckEnumCache(Node* receiver, Label* if_empty, ...@@ -13993,7 +13994,7 @@ Node* CodeStubAssembler::CheckEnumCache(Node* receiver, Label* if_empty,
{ {
// Avoid runtime-call for empty dictionary receivers. // Avoid runtime-call for empty dictionary receivers.
GotoIfNot(IsDictionaryMap(receiver_map), if_runtime); GotoIfNot(IsDictionaryMap(receiver_map), if_runtime);
TNode<NameDictionary> properties = CAST(LoadSlowProperties(receiver)); TNode<NameDictionary> properties = CAST(LoadSlowProperties(CAST(receiver)));
TNode<Smi> length = GetNumberOfElements(properties); TNode<Smi> length = GetNumberOfElements(properties);
GotoIfNot(TaggedEqual(length, SmiConstant(0)), if_runtime); GotoIfNot(TaggedEqual(length, SmiConstant(0)), if_runtime);
// Check that there are no elements on the {receiver} and its prototype // Check that there are no elements on the {receiver} and its prototype
......
...@@ -1061,9 +1061,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -1061,9 +1061,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<Word32T> IsStringWrapperElementsKind(TNode<Map> map); TNode<Word32T> IsStringWrapperElementsKind(TNode<Map> map);
void GotoIfMapHasSlowProperties(TNode<Map> map, Label* if_slow); void GotoIfMapHasSlowProperties(TNode<Map> map, Label* if_slow);
// Load the properties backing store of a JSObject. // Load the properties backing store of a JSReceiver.
TNode<HeapObject> LoadSlowProperties(SloppyTNode<JSObject> object); TNode<HeapObject> LoadSlowProperties(SloppyTNode<JSReceiver> object);
TNode<HeapObject> LoadFastProperties(SloppyTNode<JSObject> object); TNode<HeapObject> LoadFastProperties(SloppyTNode<JSReceiver> object);
// Load the elements backing store of a JSObject. // Load the elements backing store of a JSObject.
TNode<FixedArrayBase> LoadElements(SloppyTNode<JSObject> object) { TNode<FixedArrayBase> LoadElements(SloppyTNode<JSObject> object) {
return LoadJSObjectElements(object); return LoadJSObjectElements(object);
...@@ -3490,7 +3490,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -3490,7 +3490,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
// for..in helpers // for..in helpers
void CheckPrototypeEnumCache(Node* receiver, Node* receiver_map, void CheckPrototypeEnumCache(Node* receiver, Node* receiver_map,
Label* if_fast, Label* if_slow); Label* if_fast, Label* if_slow);
Node* CheckEnumCache(Node* receiver, Label* if_empty, Label* if_runtime); TNode<Map> CheckEnumCache(TNode<HeapObject> receiver, Label* if_empty,
Label* if_runtime);
TNode<Object> GetArgumentValue(TorqueStructArguments args, TNode<Object> GetArgumentValue(TorqueStructArguments args,
TNode<IntPtrT> index); TNode<IntPtrT> index);
......
...@@ -835,7 +835,7 @@ void KeyedStoreGenericAssembler::EmitGenericPropertyStore( ...@@ -835,7 +835,7 @@ void KeyedStoreGenericAssembler::EmitGenericPropertyStore(
TVARIABLE(IntPtrT, var_name_index); TVARIABLE(IntPtrT, var_name_index);
Label dictionary_found(this, &var_name_index), not_found(this); Label dictionary_found(this, &var_name_index), not_found(this);
TNode<NameDictionary> properties = CAST(LoadSlowProperties(CAST(receiver))); TNode<NameDictionary> properties = CAST(LoadSlowProperties(receiver));
NameDictionaryLookup<NameDictionary>(properties, name, &dictionary_found, NameDictionaryLookup<NameDictionary>(properties, name, &dictionary_found,
&var_name_index, &not_found); &var_name_index, &not_found);
BIND(&dictionary_found); BIND(&dictionary_found);
......
...@@ -243,7 +243,7 @@ IGNITION_HANDLER(LdaContextSlot, InterpreterAssembler) { ...@@ -243,7 +243,7 @@ IGNITION_HANDLER(LdaContextSlot, InterpreterAssembler) {
TNode<Context> context = CAST(LoadRegisterAtOperandIndex(0)); TNode<Context> context = CAST(LoadRegisterAtOperandIndex(0));
TNode<IntPtrT> slot_index = Signed(BytecodeOperandIdx(1)); TNode<IntPtrT> slot_index = Signed(BytecodeOperandIdx(1));
TNode<Uint32T> depth = BytecodeOperandUImm(2); TNode<Uint32T> depth = BytecodeOperandUImm(2);
Node* slot_context = GetContextAtDepth(context, depth); TNode<Context> slot_context = GetContextAtDepth(context, depth);
TNode<Object> result = LoadContextElement(slot_context, slot_index); TNode<Object> result = LoadContextElement(slot_context, slot_index);
SetAccumulator(result); SetAccumulator(result);
Dispatch(); Dispatch();
...@@ -257,7 +257,7 @@ IGNITION_HANDLER(LdaImmutableContextSlot, InterpreterAssembler) { ...@@ -257,7 +257,7 @@ IGNITION_HANDLER(LdaImmutableContextSlot, InterpreterAssembler) {
TNode<Context> context = CAST(LoadRegisterAtOperandIndex(0)); TNode<Context> context = CAST(LoadRegisterAtOperandIndex(0));
TNode<IntPtrT> slot_index = Signed(BytecodeOperandIdx(1)); TNode<IntPtrT> slot_index = Signed(BytecodeOperandIdx(1));
TNode<Uint32T> depth = BytecodeOperandUImm(2); TNode<Uint32T> depth = BytecodeOperandUImm(2);
Node* slot_context = GetContextAtDepth(context, depth); TNode<Context> slot_context = GetContextAtDepth(context, depth);
TNode<Object> result = LoadContextElement(slot_context, slot_index); TNode<Object> result = LoadContextElement(slot_context, slot_index);
SetAccumulator(result); SetAccumulator(result);
Dispatch(); Dispatch();
...@@ -294,7 +294,7 @@ IGNITION_HANDLER(StaContextSlot, InterpreterAssembler) { ...@@ -294,7 +294,7 @@ IGNITION_HANDLER(StaContextSlot, InterpreterAssembler) {
TNode<Context> context = CAST(LoadRegisterAtOperandIndex(0)); TNode<Context> context = CAST(LoadRegisterAtOperandIndex(0));
TNode<IntPtrT> slot_index = Signed(BytecodeOperandIdx(1)); TNode<IntPtrT> slot_index = Signed(BytecodeOperandIdx(1));
TNode<Uint32T> depth = BytecodeOperandUImm(2); TNode<Uint32T> depth = BytecodeOperandUImm(2);
Node* slot_context = GetContextAtDepth(context, depth); TNode<Context> slot_context = GetContextAtDepth(context, depth);
StoreContextElement(slot_context, slot_index, value); StoreContextElement(slot_context, slot_index, value);
Dispatch(); Dispatch();
} }
...@@ -355,7 +355,7 @@ class InterpreterLookupContextSlotAssembler : public InterpreterAssembler { ...@@ -355,7 +355,7 @@ class InterpreterLookupContextSlotAssembler : public InterpreterAssembler {
// Fast path does a normal load context. // Fast path does a normal load context.
{ {
Node* slot_context = GetContextAtDepth(context, depth); TNode<Context> slot_context = GetContextAtDepth(context, depth);
TNode<Object> result = LoadContextElement(slot_context, slot_index); TNode<Object> result = LoadContextElement(slot_context, slot_index);
SetAccumulator(result); SetAccumulator(result);
Dispatch(); Dispatch();
...@@ -730,7 +730,7 @@ IGNITION_HANDLER(LdaModuleVariable, InterpreterAssembler) { ...@@ -730,7 +730,7 @@ IGNITION_HANDLER(LdaModuleVariable, InterpreterAssembler) {
TNode<IntPtrT> cell_index = BytecodeOperandImmIntPtr(0); TNode<IntPtrT> cell_index = BytecodeOperandImmIntPtr(0);
TNode<Uint32T> depth = BytecodeOperandUImm(1); TNode<Uint32T> depth = BytecodeOperandUImm(1);
Node* module_context = GetContextAtDepth(GetContext(), depth); TNode<Context> module_context = GetContextAtDepth(GetContext(), depth);
TNode<SourceTextModule> module = TNode<SourceTextModule> module =
CAST(LoadContextElement(module_context, Context::EXTENSION_INDEX)); CAST(LoadContextElement(module_context, Context::EXTENSION_INDEX));
...@@ -775,7 +775,7 @@ IGNITION_HANDLER(StaModuleVariable, InterpreterAssembler) { ...@@ -775,7 +775,7 @@ IGNITION_HANDLER(StaModuleVariable, InterpreterAssembler) {
TNode<IntPtrT> cell_index = BytecodeOperandImmIntPtr(0); TNode<IntPtrT> cell_index = BytecodeOperandImmIntPtr(0);
TNode<Uint32T> depth = BytecodeOperandUImm(1); TNode<Uint32T> depth = BytecodeOperandUImm(1);
Node* module_context = GetContextAtDepth(GetContext(), depth); TNode<Context> module_context = GetContextAtDepth(GetContext(), depth);
TNode<SourceTextModule> module = TNode<SourceTextModule> module =
CAST(LoadContextElement(module_context, Context::EXTENSION_INDEX)); CAST(LoadContextElement(module_context, Context::EXTENSION_INDEX));
...@@ -1189,14 +1189,14 @@ class UnaryNumericOpAssembler : public InterpreterAssembler { ...@@ -1189,14 +1189,14 @@ class UnaryNumericOpAssembler : public InterpreterAssembler {
virtual TNode<Number> SmiOp(TNode<Smi> smi_value, Variable* var_feedback, virtual TNode<Number> SmiOp(TNode<Smi> smi_value, Variable* var_feedback,
Label* do_float_op, Variable* var_float) = 0; Label* do_float_op, Variable* var_float) = 0;
// Must return a Float64 value. // Must return a Float64 value.
virtual Node* FloatOp(Node* float_value) = 0; virtual TNode<Float64T> FloatOp(TNode<Float64T> float_value) = 0;
// Must return a tagged value. // Must return a tagged value.
virtual Node* BigIntOp(Node* bigint_value) = 0; virtual TNode<HeapObject> BigIntOp(TNode<HeapObject> bigint_value) = 0;
void UnaryOpWithFeedback() { void UnaryOpWithFeedback() {
VARIABLE(var_value, MachineRepresentation::kTagged, GetAccumulator()); TVARIABLE(Object, var_value, GetAccumulator());
VARIABLE(var_result, MachineRepresentation::kTagged); TVARIABLE(Object, var_result);
VARIABLE(var_float_value, MachineRepresentation::kFloat64); TVARIABLE(Float64T, var_float_value);
TVARIABLE(Smi, var_feedback, SmiConstant(BinaryOperationFeedback::kNone)); TVARIABLE(Smi, var_feedback, SmiConstant(BinaryOperationFeedback::kNone));
Variable* loop_vars[] = {&var_value, &var_feedback}; Variable* loop_vars[] = {&var_value, &var_feedback};
Label start(this, arraysize(loop_vars), loop_vars), end(this); Label start(this, arraysize(loop_vars), loop_vars), end(this);
...@@ -1208,9 +1208,11 @@ class UnaryNumericOpAssembler : public InterpreterAssembler { ...@@ -1208,9 +1208,11 @@ class UnaryNumericOpAssembler : public InterpreterAssembler {
Label if_smi(this), if_heapnumber(this), if_oddball(this); Label if_smi(this), if_heapnumber(this), if_oddball(this);
Label if_bigint(this, Label::kDeferred); Label if_bigint(this, Label::kDeferred);
Label if_other(this, Label::kDeferred); Label if_other(this, Label::kDeferred);
Node* value = var_value.value(); TNode<Object> value = var_value.value();
GotoIf(TaggedIsSmi(value), &if_smi); GotoIf(TaggedIsSmi(value), &if_smi);
TNode<Map> map = LoadMap(value);
TNode<HeapObject> value_heap_object = CAST(value);
TNode<Map> map = LoadMap(value_heap_object);
GotoIf(IsHeapNumberMap(map), &if_heapnumber); GotoIf(IsHeapNumberMap(map), &if_heapnumber);
TNode<Uint16T> instance_type = LoadMapInstanceType(map); TNode<Uint16T> instance_type = LoadMapInstanceType(map);
GotoIf(IsBigIntInstanceType(instance_type), &if_bigint); GotoIf(IsBigIntInstanceType(instance_type), &if_bigint);
...@@ -1219,20 +1221,20 @@ class UnaryNumericOpAssembler : public InterpreterAssembler { ...@@ -1219,20 +1221,20 @@ class UnaryNumericOpAssembler : public InterpreterAssembler {
BIND(&if_smi); BIND(&if_smi);
{ {
var_result.Bind( var_result =
SmiOp(CAST(value), &var_feedback, &do_float_op, &var_float_value)); SmiOp(CAST(value), &var_feedback, &do_float_op, &var_float_value);
Goto(&end); Goto(&end);
} }
BIND(&if_heapnumber); BIND(&if_heapnumber);
{ {
var_float_value.Bind(LoadHeapNumberValue(value)); var_float_value = LoadHeapNumberValue(value_heap_object);
Goto(&do_float_op); Goto(&do_float_op);
} }
BIND(&if_bigint); BIND(&if_bigint);
{ {
var_result.Bind(BigIntOp(value)); var_result = BigIntOp(value_heap_object);
CombineFeedback(&var_feedback, BinaryOperationFeedback::kBigInt); CombineFeedback(&var_feedback, BinaryOperationFeedback::kBigInt);
Goto(&end); Goto(&end);
} }
...@@ -1246,7 +1248,8 @@ class UnaryNumericOpAssembler : public InterpreterAssembler { ...@@ -1246,7 +1248,8 @@ class UnaryNumericOpAssembler : public InterpreterAssembler {
SmiConstant(BinaryOperationFeedback::kNone))); SmiConstant(BinaryOperationFeedback::kNone)));
OverwriteFeedback(&var_feedback, OverwriteFeedback(&var_feedback,
BinaryOperationFeedback::kNumberOrOddball); BinaryOperationFeedback::kNumberOrOddball);
var_value.Bind(LoadObjectField(value, Oddball::kToNumberOffset)); var_value =
LoadObjectField(value_heap_object, Oddball::kToNumberOffset);
Goto(&start); Goto(&start);
} }
...@@ -1258,8 +1261,8 @@ class UnaryNumericOpAssembler : public InterpreterAssembler { ...@@ -1258,8 +1261,8 @@ class UnaryNumericOpAssembler : public InterpreterAssembler {
CSA_ASSERT(this, SmiEqual(var_feedback.value(), CSA_ASSERT(this, SmiEqual(var_feedback.value(),
SmiConstant(BinaryOperationFeedback::kNone))); SmiConstant(BinaryOperationFeedback::kNone)));
OverwriteFeedback(&var_feedback, BinaryOperationFeedback::kAny); OverwriteFeedback(&var_feedback, BinaryOperationFeedback::kAny);
var_value.Bind( var_value = CallBuiltin(Builtins::kNonNumberToNumeric, GetContext(),
CallBuiltin(Builtins::kNonNumberToNumeric, GetContext(), value)); value_heap_object);
Goto(&start); Goto(&start);
} }
} }
...@@ -1267,8 +1270,8 @@ class UnaryNumericOpAssembler : public InterpreterAssembler { ...@@ -1267,8 +1270,8 @@ class UnaryNumericOpAssembler : public InterpreterAssembler {
BIND(&do_float_op); BIND(&do_float_op);
{ {
CombineFeedback(&var_feedback, BinaryOperationFeedback::kNumber); CombineFeedback(&var_feedback, BinaryOperationFeedback::kNumber);
var_result.Bind( var_result =
AllocateHeapNumberWithValue(FloatOp(var_float_value.value()))); AllocateHeapNumberWithValue(FloatOp(var_float_value.value()));
Goto(&end); Goto(&end);
} }
...@@ -1315,11 +1318,13 @@ class NegateAssemblerImpl : public UnaryNumericOpAssembler { ...@@ -1315,11 +1318,13 @@ class NegateAssemblerImpl : public UnaryNumericOpAssembler {
return var_result.value(); return var_result.value();
} }
Node* FloatOp(Node* float_value) override { return Float64Neg(float_value); } TNode<Float64T> FloatOp(TNode<Float64T> float_value) override {
return Float64Neg(float_value);
}
Node* BigIntOp(Node* bigint_value) override { TNode<HeapObject> BigIntOp(TNode<HeapObject> bigint_value) override {
return CallRuntime(Runtime::kBigIntUnaryOp, GetContext(), bigint_value, return CAST(CallRuntime(Runtime::kBigIntUnaryOp, GetContext(), bigint_value,
SmiConstant(Operation::kNegate)); SmiConstant(Operation::kNegate)));
} }
}; };
...@@ -1403,15 +1408,15 @@ class IncDecAssembler : public UnaryNumericOpAssembler { ...@@ -1403,15 +1408,15 @@ class IncDecAssembler : public UnaryNumericOpAssembler {
return result; return result;
} }
Node* FloatOp(Node* float_value) override { TNode<Float64T> FloatOp(TNode<Float64T> float_value) override {
return op() == Operation::kIncrement return op() == Operation::kIncrement
? Float64Add(float_value, Float64Constant(1.0)) ? Float64Add(float_value, Float64Constant(1.0))
: Float64Sub(float_value, Float64Constant(1.0)); : Float64Sub(float_value, Float64Constant(1.0));
} }
Node* BigIntOp(Node* bigint_value) override { TNode<HeapObject> BigIntOp(TNode<HeapObject> bigint_value) override {
return CallRuntime(Runtime::kBigIntUnaryOp, GetContext(), bigint_value, return CAST(CallRuntime(Runtime::kBigIntUnaryOp, GetContext(), bigint_value,
SmiConstant(op())); SmiConstant(op())));
} }
void IncWithFeedback() { void IncWithFeedback() {
...@@ -1762,8 +1767,8 @@ IGNITION_HANDLER(ConstructWithSpread, InterpreterAssembler) { ...@@ -1762,8 +1767,8 @@ IGNITION_HANDLER(ConstructWithSpread, InterpreterAssembler) {
TNode<UintPtrT> slot_id = BytecodeOperandIdx(3); TNode<UintPtrT> slot_id = BytecodeOperandIdx(3);
TNode<HeapObject> maybe_feedback_vector = LoadFeedbackVector(); TNode<HeapObject> maybe_feedback_vector = LoadFeedbackVector();
TNode<Context> context = GetContext(); TNode<Context> context = GetContext();
Node* result = ConstructWithSpread(constructor, context, new_target, args, TNode<Object> result = ConstructWithSpread(
slot_id, maybe_feedback_vector); constructor, context, new_target, args, slot_id, maybe_feedback_vector);
SetAccumulator(result); SetAccumulator(result);
Dispatch(); Dispatch();
} }
...@@ -1781,8 +1786,8 @@ IGNITION_HANDLER(Construct, InterpreterAssembler) { ...@@ -1781,8 +1786,8 @@ IGNITION_HANDLER(Construct, InterpreterAssembler) {
TNode<UintPtrT> slot_id = BytecodeOperandIdx(3); TNode<UintPtrT> slot_id = BytecodeOperandIdx(3);
TNode<HeapObject> maybe_feedback_vector = LoadFeedbackVector(); TNode<HeapObject> maybe_feedback_vector = LoadFeedbackVector();
TNode<Context> context = GetContext(); TNode<Context> context = GetContext();
Node* result = Construct(constructor, context, new_target, args, slot_id, TNode<Object> result = Construct(constructor, context, new_target, args,
maybe_feedback_vector); slot_id, maybe_feedback_vector);
SetAccumulator(result); SetAccumulator(result);
Dispatch(); Dispatch();
} }
...@@ -1895,9 +1900,9 @@ IGNITION_HANDLER(TestIn, InterpreterAssembler) { ...@@ -1895,9 +1900,9 @@ IGNITION_HANDLER(TestIn, InterpreterAssembler) {
TNode<HeapObject> feedback_vector = LoadFeedbackVector(); TNode<HeapObject> feedback_vector = LoadFeedbackVector();
TNode<Context> context = GetContext(); TNode<Context> context = GetContext();
VARIABLE(var_result, MachineRepresentation::kTagged); TVARIABLE(Object, var_result);
var_result.Bind(CallBuiltin(Builtins::kKeyedHasIC, context, object, name, var_result = CallBuiltin(Builtins::kKeyedHasIC, context, object, name,
smi_slot, feedback_vector)); smi_slot, feedback_vector);
SetAccumulator(var_result.value()); SetAccumulator(var_result.value());
Dispatch(); Dispatch();
} }
...@@ -2800,8 +2805,8 @@ IGNITION_HANDLER(CreateMappedArguments, InterpreterAssembler) { ...@@ -2800,8 +2805,8 @@ IGNITION_HANDLER(CreateMappedArguments, InterpreterAssembler) {
// duplicate parameters. // duplicate parameters.
TNode<SharedFunctionInfo> shared_info = LoadObjectField<SharedFunctionInfo>( TNode<SharedFunctionInfo> shared_info = LoadObjectField<SharedFunctionInfo>(
closure, JSFunction::kSharedFunctionInfoOffset); closure, JSFunction::kSharedFunctionInfoOffset);
Node* flags = LoadObjectField(shared_info, SharedFunctionInfo::kFlagsOffset, TNode<Uint32T> flags =
MachineType::Uint32()); LoadObjectField<Uint32T>(shared_info, SharedFunctionInfo::kFlagsOffset);
TNode<BoolT> has_duplicate_parameters = TNode<BoolT> has_duplicate_parameters =
IsSetWord32<SharedFunctionInfo::HasDuplicateParametersBit>(flags); IsSetWord32<SharedFunctionInfo::HasDuplicateParametersBit>(flags);
Branch(has_duplicate_parameters, &if_duplicate_parameters, Branch(has_duplicate_parameters, &if_duplicate_parameters,
...@@ -2866,7 +2871,7 @@ IGNITION_HANDLER(StackCheck, InterpreterAssembler) { ...@@ -2866,7 +2871,7 @@ IGNITION_HANDLER(StackCheck, InterpreterAssembler) {
IGNITION_HANDLER(SetPendingMessage, InterpreterAssembler) { IGNITION_HANDLER(SetPendingMessage, InterpreterAssembler) {
TNode<ExternalReference> pending_message = ExternalConstant( TNode<ExternalReference> pending_message = ExternalConstant(
ExternalReference::address_of_pending_message_obj(isolate())); ExternalReference::address_of_pending_message_obj(isolate()));
Node* previous_message = Load(MachineType::TaggedPointer(), pending_message); TNode<HeapObject> previous_message = Load<HeapObject>(pending_message);
TNode<Object> new_message = GetAccumulator(); TNode<Object> new_message = GetAccumulator();
StoreFullTaggedNoWriteBarrier(pending_message, new_message); StoreFullTaggedNoWriteBarrier(pending_message, new_message);
SetAccumulator(previous_message); SetAccumulator(previous_message);
...@@ -2993,7 +2998,7 @@ IGNITION_HANDLER(Debugger, InterpreterAssembler) { ...@@ -2993,7 +2998,7 @@ IGNITION_HANDLER(Debugger, InterpreterAssembler) {
TNode<Object> accumulator = GetAccumulator(); \ TNode<Object> accumulator = GetAccumulator(); \
TNode<Object> result_pair = \ TNode<Object> result_pair = \
CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \ CallRuntime(Runtime::kDebugBreakOnBytecode, context, accumulator); \
Node* return_value = Projection(0, result_pair); \ TNode<Object> return_value = CAST(Projection(0, result_pair)); \
TNode<IntPtrT> original_bytecode = SmiUntag(Projection(1, result_pair)); \ TNode<IntPtrT> original_bytecode = SmiUntag(Projection(1, result_pair)); \
MaybeDropFrames(context); \ MaybeDropFrames(context); \
SetAccumulator(return_value); \ SetAccumulator(return_value); \
...@@ -3023,11 +3028,11 @@ IGNITION_HANDLER(IncBlockCounter, InterpreterAssembler) { ...@@ -3023,11 +3028,11 @@ IGNITION_HANDLER(IncBlockCounter, InterpreterAssembler) {
// map of the |receiver| if it has a usable enum cache or a fixed array // map of the |receiver| if it has a usable enum cache or a fixed array
// with the keys to enumerate in the accumulator. // with the keys to enumerate in the accumulator.
IGNITION_HANDLER(ForInEnumerate, InterpreterAssembler) { IGNITION_HANDLER(ForInEnumerate, InterpreterAssembler) {
TNode<Object> receiver = LoadRegisterAtOperandIndex(0); TNode<HeapObject> receiver = CAST(LoadRegisterAtOperandIndex(0));
TNode<Context> context = GetContext(); TNode<Context> context = GetContext();
Label if_empty(this), if_runtime(this, Label::kDeferred); Label if_empty(this), if_runtime(this, Label::kDeferred);
Node* receiver_map = CheckEnumCache(receiver, &if_empty, &if_runtime); TNode<Map> receiver_map = CheckEnumCache(receiver, &if_empty, &if_runtime);
SetAccumulator(receiver_map); SetAccumulator(receiver_map);
Dispatch(); Dispatch();
......
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