28 if (node->opcode() != IrOpcode::kJSCallRuntime)
return NoChange();
32 case Runtime::kIsBeingInterpreted:
34 case Runtime::kTurbofanStaticAssert:
36 case Runtime::kVerifyType:
38 case Runtime::kCheckTurboshaftTypeOf:
45 case Runtime::kInlineCopyDataProperties:
47 case Runtime::kInlineCopyDataPropertiesWithExcludedPropertiesOnStack:
49 case Runtime::kInlineCreateIterResultObject:
51 case Runtime::kInlineDeoptimizeNow:
53 case Runtime::kInlineGeneratorClose:
55 case Runtime::kInlineCreateJSGeneratorObject:
57 case Runtime::kInlineAsyncFunctionAwait:
59 case Runtime::kInlineAsyncFunctionEnter:
61 case Runtime::kInlineAsyncFunctionReject:
63 case Runtime::kInlineAsyncFunctionResolve:
65 case Runtime::kInlineAsyncGeneratorAwait:
67 case Runtime::kInlineAsyncGeneratorReject:
69 case Runtime::kInlineAsyncGeneratorResolve:
71 case Runtime::kInlineAsyncGeneratorYieldWithAwait:
73 case Runtime::kInlineGeneratorGetResumeMode:
75 case Runtime::kInlineIncBlockCounter:
77 case Runtime::kInlineGetImportMetaObject:
97 isolate(), Builtin::kCopyDataPropertiesWithExcludedProperties);
99 graph()->zone(), callable.descriptor(), input_count - 1, flags,
100 node->op()->properties());
101 node->InsertInput(
graph()->zone(), 0,
103 node->InsertInput(
graph()->zone(), 2,
104 jsgraph()->SmiConstant(input_count - 1));
106 return Changed(node);
125 frame_state, effect, control);
128 node->TrimInputCount(0);
130 return Changed(node);
140 Node* create_generator =
142 ReplaceWithValue(node, create_generator, create_generator);
143 return Changed(create_generator);
152 Node*
const undefined =
jsgraph()->UndefinedConstant();
156 ReplaceWithValue(node, undefined, node);
158 return Change(node, op, generator, closed, effect, control);
168 return Changed(node);
174 return Changed(node);
180 return Changed(node);
214 return Change(node, op, generator, effect, control);
232 Node* etrue = effect;
236 Node* efalse = effect;
245 jsgraph()->ConstantNoHole(instance_type));
251 ReplaceWithValue(node, node, ephi, merge);
265 RelaxEffectsAndControls(node);
270 common()->StaticAssert(
"%TurbofanStaticAssert"), value, effect);
271 ReplaceWithValue(node, node, assert,
nullptr);
273 return Changed(
jsgraph_->UndefinedConstant());
280 ReplaceWithValue(node, value, effect);
281 return Changed(effect);
287 RelaxEffectsAndControls(node);
288 ReplaceWithValue(node, value);
289 return Changed(value);
297 ReplaceWithValue(node, value, check);
298 return Changed(value);
302 RelaxEffectsAndControls(node);
303 return Changed(
jsgraph_->FalseConstant());
308 RelaxEffectsAndControls(node);
313 return Changed(node);
318 return Changed(node);
323 return Changed(node);
329 if (
m.HasResolvedValue() &&
m.Ref(
broker()).IsString()) {
330 ReplaceWithValue(node,
m.node());
331 return Replace(
m.node());
334 return Changed(node);
340 static constexpr int kTargetAndReceiver = 2;
343 node->InsertInput(
graph()->zone(), arity, feedback);
347 return Changed(node);
360 return Changed(node);
366 node->ReplaceInput(0, a);
367 node->ReplaceInput(1, b);
368 node->TrimInputCount(2);
370 return Changed(node);
376 node->ReplaceInput(0, a);
377 node->ReplaceInput(1, b);
378 node->ReplaceInput(2, c);
379 node->TrimInputCount(3);
381 return Changed(node);
387 node->ReplaceInput(0, a);
388 node->ReplaceInput(1, b);
389 node->ReplaceInput(2, c);
390 node->ReplaceInput(3, d);
391 node->TrimInputCount(4);
393 return Changed(node);
397 int stack_parameter_count,
404 node->op()->properties());
405 node->InsertInput(
graph()->zone(), 0,
408 return Changed(node);
static V8_EXPORT_PRIVATE Callable CallableFor(Isolate *isolate, Builtin builtin)
Handle< Code > code() const
CallInterfaceDescriptor descriptor() const
static const int kGeneratorClosed
static V8_EXPORT_PRIVATE const Function * FunctionForId(FunctionId id)
static FieldAccess ForMap(WriteBarrierKind write_barrier=kMapWriteBarrier)
static FieldAccess ForMapInstanceType()
static FieldAccess ForJSGeneratorObjectResumeMode()
static FieldAccess ForJSGeneratorObjectContinuation()
static constexpr int ArityForArgc(int parameters)
static constexpr bool kFeedbackVectorIsLastInput
JSOperatorBuilder * javascript() const
SimplifiedOperatorBuilder * simplified() const
Isolate * isolate() const
Node * ConstantNoHole(ObjectRef ref, JSHeapBroker *broker)
Reduction ReduceIsBeingInterpreted(Node *node)
Reduction Change(Node *node, const Operator *op)
JSIntrinsicLowering(Editor *editor, JSGraph *jsgraph, JSHeapBroker *broker)
Reduction ReduceCopyDataProperties(Node *node)
Isolate * isolate() const
CommonOperatorBuilder * common() const
Reduction ReduceAsyncFunctionReject(Node *node)
Reduction ReduceIncBlockCounter(Node *node)
Reduction ReduceCreateIterResultObject(Node *node)
Reduction ReduceCheckTurboshaftTypeOf(Node *node)
JSHeapBroker * broker() const
Reduction ReduceAsyncFunctionAwait(Node *node)
Reduction ReduceGeneratorGetResumeMode(Node *node)
Reduction ReduceIsInstanceType(Node *node, InstanceType instance_type)
Reduction ReduceTurbofanStaticAssert(Node *node)
Reduction ReduceAsyncFunctionEnter(Node *node)
Reduction ReduceAsyncGeneratorReject(Node *node)
Reduction Reduce(Node *node) final
JSOperatorBuilder * javascript() const
Reduction ReduceAsyncGeneratorYieldWithAwait(Node *node)
Reduction ReduceVerifyType(Node *node)
Reduction ReduceIsJSReceiver(Node *node)
JSGraph * jsgraph() const
Reduction ReduceToString(Node *node)
Reduction ReduceDeoptimizeNow(Node *node)
SimplifiedOperatorBuilder * simplified() const
Reduction ReduceToLength(Node *node)
Reduction ReduceGeneratorClose(Node *node)
Reduction ReduceGetImportMetaObject(Node *node)
Reduction ReduceAsyncGeneratorAwait(Node *node)
Reduction ReduceCreateJSGeneratorObject(Node *node)
Reduction ReduceCopyDataPropertiesWithExcludedPropertiesOnStack(Node *node)
Reduction ReduceCall(Node *node)
Reduction ReduceAsyncFunctionResolve(Node *node)
Reduction ReduceToObject(Node *node)
Reduction ReduceAsyncGeneratorResolve(Node *node)
const Operator * CreateGeneratorObject()
static bool NeedsFrameStateInput(Runtime::FunctionId function)
static CallDescriptor * GetStubCallDescriptor(Zone *zone, const CallInterfaceDescriptor &descriptor, int stack_parameter_count, CallDescriptor::Flags flags, Operator::Properties properties=Operator::kNoProperties, StubCallMode stub_mode=StubCallMode::kCallCodeObject)
CommonOperatorBuilder * common() const
static void ChangeOp(Node *node, const Operator *new_op)
static void RemoveNonValueInputs(Node *node)
static Node * GetEffectInput(Node *node, int index=0)
static Node * GetContextInput(Node *node)
static void RemoveType(Node *node)
static Node * GetFrameStateInput(Node *node)
static Node * GetValueInput(Node *node, int index)
static Node * GetControlInput(Node *node, int index=0)
Node * InputAt(int index) const
const Operator * StoreField(FieldAccess const &, bool maybe_initializing_or_transitioning=true)
const Operator * LoadField(FieldAccess const &)
Node * NewNode(const Operator *op, int input_count, Node *const *inputs, bool incomplete=false)
JSHeapBroker *const broker_
const CallRuntimeParameters & CallRuntimeParametersOf(const Operator *op)
HeapConstantNoHole(BUILTIN_CODE(isolate(), AllocateInOldGeneration))) DEFINE_GETTER(ArrayConstructorStubConstant
std::string ToString(const BytecodeLivenessState &liveness)
V8_EXPORT_PRIVATE FlagValues v8_flags
#define DCHECK(condition)
IntrinsicType intrinsic_type