Lines Matching refs:Node
29 int parameter_count, Node* control_dependency, Node* context);
39 Node* LookupAccumulator() const;
40 Node* LookupRegister(interpreter::Register the_register) const;
42 void BindAccumulator(Node* node,
44 void BindRegister(interpreter::Register the_register, Node* node,
47 interpreter::Register first_reg, Node* node,
49 void RecordAfterState(Node* node,
53 Node* GetEffectDependency() { return effect_dependency_; }
54 void UpdateEffectDependency(Node* dependency) {
60 Node* Checkpoint(BailoutId bytecode_offset, OutputFrameStateCombine combine,
65 Node* GetControlDependency() const { return control_dependency_; }
66 void UpdateControlDependency(Node* dependency) {
70 Node* Context() const { return context_; }
71 void SetContext(Node* new_context) { context_ = new_context; }
78 void PrepareForLoopExit(Node* loop,
84 bool StateValuesRequireUpdate(Node** state_values, Node** values, int count);
85 void UpdateStateValues(Node** state_values, Node** values, int count);
86 void UpdateStateValuesWithCache(Node** state_values, Node** values, int count,
104 Node* context_;
105 Node* control_dependency_;
106 Node* effect_dependency_;
108 Node* parameters_state_values_;
109 Node* registers_state_values_;
110 Node* accumulator_state_values_;
122 Node* control_dependency,
123 Node* context)
146 Node* parameter = builder->graph()->NewNode(op, graph()->start());
152 Node* undefined_constant = builder->jsgraph()->UndefinedConstant();
187 Node* BytecodeGraphBuilder::Environment::LookupAccumulator() const {
192 Node* BytecodeGraphBuilder::Environment::LookupRegister(
207 Node* node, FrameStateAttachmentMode mode) {
209 builder()->PrepareFrameState(node, OutputFrameStateCombine::PokeAt(0));
211 values()->at(accumulator_base_) = node;
215 interpreter::Register the_register, Node* node,
219 builder()->PrepareFrameState(node, OutputFrameStateCombine::PokeAt(
222 values()->at(values_index) = node;
226 interpreter::Register first_reg, Node* node,
230 builder()->PrepareFrameState(node, OutputFrameStateCombine::PokeAt(
233 for (int i = 0; i < node->op()->ValueOutputCount(); i++) {
235 builder()->NewNode(common()->Projection(i), node);
240 Node* node, FrameStateAttachmentMode mode) {
242 builder()->PrepareFrameState(node, OutputFrameStateCombine::Ignore());
255 Node* control = builder()->MergeControl(GetControlDependency(),
261 Node* effect = builder()->MergeEffect(GetEffectDependency(),
266 // potentially extending an existing Phi node if possible.
275 // Create a control node for the loop header.
276 Node* control = builder()->NewLoop();
279 Node* effect = builder()->NewEffectPhi(1, GetEffectDependency(), control);
302 Node* terminate = builder()->graph()->NewNode(
311 Node* start = graph()->start();
313 // Create a control node for the OSR entry point and update the current
315 Node* entry = graph()->NewNode(common()->OsrLoopEntry(), start, start);
331 Node* frame_state =
333 Node* checkpoint =
339 Node* effect = checkpoint;
344 Node* context = effect = graph()->NewNode(guard_op, Context(), effect, entry);
350 Node** state_values, Node** values, int count) {
354 Node::Inputs inputs = (*state_values)->inputs();
365 Node* loop, const BytecodeLoopAssignments& assignments) {
368 Node* control = GetControlDependency();
370 // Create the loop exit node.
371 Node* loop_exit = graph()->NewNode(common()->LoopExit(), control, loop);
375 Node* effect_rename = graph()->NewNode(common()->LoopExitEffect(),
386 Node* rename =
393 Node* rename = graph()->NewNode(common()->LoopExitValue(),
400 Node* rename = graph()->NewNode(common()->LoopExitValue(),
406 void BytecodeGraphBuilder::Environment::UpdateStateValues(Node** state_values,
407 Node** values,
416 Node** state_values, Node** values, int count, const BitVector* liveness,
422 Node* BytecodeGraphBuilder::Environment::Checkpoint(
456 Node* result = graph()->NewNode(
496 Node* BytecodeGraphBuilder::GetNewTarget() {
501 Node* node = NewNode(op, graph()->start());
502 new_target_.set(node);
508 Node* BytecodeGraphBuilder::GetFunctionContext() {
513 Node* node = NewNode(op, graph()->start());
514 function_context_.set(node);
520 Node* BytecodeGraphBuilder::GetFunctionClosure() {
524 Node* node = NewNode(op, graph()->start());
525 function_closure_.set(node);
531 Node* BytecodeGraphBuilder::BuildLoadNativeContextField(int index) {
534 Node* native_context = NewNode(op);
535 Node* result = NewNode(javascript()->LoadContext(0, index, true));
568 Node** const inputs = &exit_controls_.front();
569 Node* end = graph()->NewNode(common()->End(input_count), input_count, inputs);
577 // Create an explicit checkpoint node for before the operation. This only
580 Node* node = NewNode(common()->Checkpoint());
581 DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op()));
583 NodeProperties::GetFrameStateInput(node)->opcode());
590 Node* frame_state_before = environment()->Checkpoint(
592 NodeProperties::ReplaceFrameStateInput(node, frame_state_before);
598 Node* effect = environment()->GetEffectDependency();
610 void BytecodeGraphBuilder::PrepareFrameState(Node* node,
612 if (OperatorProperties::HasFrameStateInput(node->op())) {
613 // Add the frame state for after the operation. The node in question has
615 DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op()));
617 NodeProperties::GetFrameStateInput(node)->opcode());
619 bool has_exception = NodeProperties::IsExceptionalCall(node);
625 Node* frame_state_after = environment()->Checkpoint(
627 NodeProperties::ReplaceFrameStateInput(node, frame_state_after);
681 Node* node = jsgraph()->ZeroConstant();
682 environment()->BindAccumulator(node);
686 Node* node = jsgraph()->Constant(bytecode_iterator().GetImmediateOperand(0));
687 environment()->BindAccumulator(node);
691 Node* node =
693 environment()->BindAccumulator(node);
697 Node* node = jsgraph()->UndefinedConstant();
698 environment()->BindAccumulator(node);
702 Node* node = jsgraph()->NullConstant();
703 environment()->BindAccumulator(node);
707 Node* node = jsgraph()->TheHoleConstant();
708 environment()->BindAccumulator(node);
712 Node* node = jsgraph()->TrueConstant();
713 environment()->BindAccumulator(node);
717 Node* node = jsgraph()->FalseConstant();
718 environment()->BindAccumulator(node);
722 Node* value =
728 Node* value = environment()->LookupAccumulator();
733 Node* value =
738 Node* BytecodeGraphBuilder::BuildLoadGlobal(Handle<Name> name,
752 Node* node =
754 environment()->BindAccumulator(node, Environment::kAttachFrameState);
762 Node* node =
764 environment()->BindAccumulator(node, Environment::kAttachFrameState);
773 Node* value = environment()->LookupAccumulator();
776 Node* node = NewNode(op, value);
777 environment()->RecordAfterState(node, Environment::kAttachFrameState);
791 Node* object =
793 Node* name =
795 Node* value = environment()->LookupAccumulator();
801 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags));
802 environment()->RecordAfterState(node, Environment::kAttachFrameState);
809 Node* node = NewNode(op);
810 Node* context =
812 NodeProperties::ReplaceContextInput(node, context);
813 environment()->BindAccumulator(node);
820 Node* node = NewNode(op);
821 Node* context =
823 NodeProperties::ReplaceContextInput(node, context);
824 environment()->BindAccumulator(node);
830 Node* node = NewNode(op);
831 environment()->BindAccumulator(node);
837 Node* node = NewNode(op);
838 environment()->BindAccumulator(node);
845 Node* value = environment()->LookupAccumulator();
846 Node* node = NewNode(op, value);
847 Node* context =
849 node, context);
855 Node* value = environment()->LookupAccumulator();
861 Node* name =
867 Node* value = NewNode(op, name);
887 Node* extension_slot =
890 Node* check_no_extension =
946 Node* name = jsgraph()->Constant(
953 Node* value = NewNode(op, name);
983 Node* node = BuildLoadGlobal(name, feedback_slot_index, typeof_mode);
984 environment()->BindAccumulator(node, Environment::kAttachFrameState);
996 Node* name = jsgraph()->Constant(
1003 Node* value = NewNode(op, name);
1023 Node* value = environment()->LookupAccumulator();
1024 Node* name =
1029 Node* store = NewNode(op, name, value);
1043 Node* object =
1051 Node* node = NewNode(op, object);
1052 environment()->BindAccumulator(node, Environment::kAttachFrameState);
1057 Node* key = environment()->LookupAccumulator();
1058 Node* object =
1064 Node* node = NewNode(op, object, key);
1065 environment()->BindAccumulator(node, Environment::kAttachFrameState);
1071 Node* value = environment()->LookupAccumulator();
1072 Node* object =
1090 Node* node = NewNode(op, object, value);
1091 environment()->RecordAfterState(node, Environment::kAttachFrameState);
1108 Node* value = environment()->LookupAccumulator();
1109 Node* object =
1111 Node* key =
1118 Node* node = NewNode(op, object, key, value);
1119 environment()->RecordAfterState(node, Environment::kAttachFrameState);
1133 Node* module =
1135 Node* value = NewNode(javascript()->LoadModule(cell_index), module);
1142 Node* module =
1144 Node* value = environment()->LookupAccumulator();
1149 Node* new_context = environment()->LookupAccumulator();
1156 Node* context =
1172 Node* closure = NewNode(op);
1181 Node* context = NewNode(op, environment()->LookupAccumulator());
1189 Node* context = NewNode(op, GetFunctionClosure());
1196 Node* context = NewNode(op, GetFunctionClosure());
1202 Node* exception = environment()->LookupRegister(reg);
1207 Node* closure = environment()->LookupAccumulator();
1210 Node* context = NewNode(op, exception, closure);
1215 Node* object =
1221 Node* context = NewNode(op, object, environment()->LookupAccumulator());
1227 Node* object = NewNode(op, GetFunctionClosure());
1248 Node* literal = NewNode(javascript()->CreateLiteralRegExp(
1270 Node* literal = NewNode(
1288 Node* literal = NewNode(
1296 Node* BytecodeGraphBuilder::ProcessCallArguments(const Operator* call_op,
1297 Node* callee,
1300 Node** all = local_zone()->NewArray<Node*>(static_cast<int>(arity));
1308 Node* value = MakeNode(call_op, static_cast<int>(arity), all, false);
1316 Node* callee =
1330 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1);
1340 Node* callee =
1347 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1);
1365 Node* callee =
1370 // Create node to perform the JS runtime call.
1372 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1);
1376 Node* BytecodeGraphBuilder::ProcessCallRuntimeArguments(
1379 Node** all = local_zone()->NewArray<Node*>(arity);
1385 Node* value = MakeNode(call_runtime_op, static_cast<int>(arity), all, false);
1395 // Create node to perform the runtime call.
1397 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count);
1409 // Create node to perform the runtime call.
1411 Node* return_pair = ProcessCallRuntimeArguments(call, first_arg, arg_count);
1416 Node* BytecodeGraphBuilder::ProcessConstructWithSpreadArguments(
1417 const Operator* op, Node* callee, Node* new_target,
1419 Node** all = local_zone()->NewArray<Node*>(arity);
1427 Node* value = MakeNode(op, static_cast<int>(arity), all, false);
1437 Node* new_target = environment()->LookupAccumulator();
1438 Node* callee = environment()->LookupRegister(callee_reg);
1442 Node* value = ProcessConstructWithSpreadArguments(op, callee, new_target,
1453 // Create node to perform the runtime call. Turbofan will take care of the
1456 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count);
1460 Node* BytecodeGraphBuilder::ProcessConstructArguments(
1461 const Operator* call_new_op, Node* callee, Node* new_target,
1463 Node** all = local_zone()->NewArray<Node*>(arity);
1471 Node* value = MakeNode(call_new_op, static_cast<int>(arity), all, false);
1486 Node* new_target = environment()->LookupAccumulator();
1487 Node* callee = environment()->LookupRegister(callee_reg);
1492 Node* value = ProcessConstructArguments(call, callee, new_target, first_arg,
1499 Node* value = environment()->LookupAccumulator();
1500 Node* call = NewNode(javascript()->CallRuntime(Runtime::kThrow), value);
1502 Node* control = NewNode(common()->Throw(), call);
1508 Node* value = environment()->LookupAccumulator();
1509 Node* call = NewNode(javascript()->CallRuntime(Runtime::kReThrow), value);
1510 Node* control = NewNode(common()->Throw(), call);
1514 Node* BytecodeGraphBuilder::TryBuildSimplifiedBinaryOp(const Operator* op,
1515 Node* left, Node* right,
1517 Node* effect = environment()->GetEffectDependency();
1518 Node* control = environment()->GetControlDependency();
1523 Node* node = early_reduction.replacement();
1524 if (node->op()->EffectOutputCount() > 0) {
1525 environment()->UpdateEffectDependency(node);
1527 return node;
1534 Node* left =
1536 Node* right = environment()->LookupAccumulator();
1538 Node* node = nullptr;
1541 if (Node* simplified = TryBuildSimplifiedBinaryOp(op, left, right, slot)) {
1542 node = simplified;
1544 node = NewNode(op, left, right);
1547 environment()->BindAccumulator(node, Environment::kAttachFrameState);
1625 Node* left =
1627 Node* right = jsgraph()->Constant(bytecode_iterator().GetImmediateOperand(0));
1629 Node* node = nullptr;
1632 if (Node* simplified = TryBuildSimplifiedBinaryOp(op, left, right, slot)) {
1633 node = simplified;
1635 node = NewNode(op, left, right);
1638 environment()->BindAccumulator(node, Environment::kAttachFrameState);
1670 Node* left = environment()->LookupAccumulator();
1671 Node* right = jsgraph()->Constant(-1);
1674 Node* node = nullptr;
1677 if (Node
1678 node = simplified;
1680 node = NewNode(op, left, right);
1683 environment()->BindAccumulator(node, Environment::kAttachFrameState);
1688 Node* left = environment()->LookupAccumulator();
1689 Node* right = jsgraph()->OneConstant();
1692 Node* node = nullptr;
1695 if (Node* simplified = TryBuildSimplifiedBinaryOp(op, left, right, slot)) {
1696 node = simplified;
1698 node = NewNode(op, left, right);
1701 environment()->BindAccumulator(node, Environment::kAttachFrameState);
1705 Node* value = environment()->LookupAccumulator();
1706 Node* node = NewNode(simplified()->BooleanNot(), value);
1707 environment()->BindAccumulator(node);
1711 Node* value = NewNode(javascript()->ToBoolean(ToBooleanHint::kAny),
1713 Node* node = NewNode(simplified()->BooleanNot(), value);
1714 environment()->BindAccumulator(node);
1718 Node* node =
1720 environment()->BindAccumulator(node);
1725 Node* key = environment()->LookupAccumulator();
1726 Node* object =
1728 Node* node =
1730 environment()->BindAccumulator(node, Environment::kAttachFrameState);
1742 Node* node = NewNode(javascript()->GetSuperConstructor(),
1744 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), node,
1750 Node* left =
1752 Node* right = environment()->LookupAccumulator();
1753 Node* node = NewNode(js_op, left, right);
1754 environment()->BindAccumulator(node, Environment::kAttachFrameState);
1794 Node* object =
1796 Node* node = NewNode(jsgraph()->simplified()->ObjectIsUndetectable(), object);
1797 environment()->BindAccumulator(node);
1801 Node* object =
1803 Node* result = NewNode(simplified()->ReferenceEqual(), object,
1809 Node* object =
1811 Node* result = NewNode(simplified()->ReferenceEqual(), object,
1817 Node* value = NewNode(js_op, environment()->LookupAccumulator());
1894 Node* node = NewNode(javascript()->StackCheck());
1895 environment()->RecordAfterState(node, Environment::kAttachFrameState);
1899 Node* previous_message = NewNode(javascript()->LoadMessage());
1906 Node* pop_node = jsgraph()->ZeroConstant();
1907 Node* control =
1914 Node* call = NewNode(javascript()->Debugger());
1926 Node* receiver =
1928 Node* prepare = NewNode(javascript()->ForInPrepare(), receiver);
1938 Node* index =
1940 Node* cache_length =
1942 Node* exit_cond =
1950 Node* receiver =
1952 Node* index =
1955 Node* cache_type = environment()->LookupRegister(
1957 Node* cache_array = environment()->LookupRegister(
1960 Node* value = NewNode(javascript()->ForInNext(), receiver, cache_array,
1969 Node* index =
1978 Node* state = environment()->LookupAccumulator();
1979 Node* generator = environment()->LookupRegister(
1983 Node* offset =
1990 Node** value_inputs = local_zone()->NewArray<Node*>(value_input_count);
2006 Node* generator = environment()->LookupRegister(
2012 Node* value = NewNode(javascript()->GeneratorRestoreRegister(i), generator);
2016 Node* state =
2083 void BytecodeGraphBuilder::MergeControlToLeaveFunction(Node* exit) {
2092 // For OSR add a special {OsrLoopEntry} node into the current loop header.
2126 Node* loop_node = merge_environments_[current_loop]->GetControlDependency();
2142 void BytecodeGraphBuilder::BuildJumpIf(Node* condition) {
2151 Node* condition) {
2160 void BytecodeGraphBuilder::BuildJumpIfEqual(Node* comperand) {
2161 Node* accumulator = environment()->LookupAccumulator();
2162 Node* condition =
2190 Node* accumulator = environment()->LookupAccumulator();
2191 Node* condition =
2197 Node* accumulator = environment()->LookupAccumulator();
2198 Node* condition =
2204 Node* accumulator = environment()->LookupAccumulator();
2205 Node* condition = NewNode(simplified()->ReferenceEqual(), accumulator,
2211 Node* accumulator = environment()->LookupAccumulator();
2212 Node* condition = NewNode(simplified()->ObjectIsReceiver(), accumulator);
2216 Node** BytecodeGraphBuilder::EnsureInputBufferSize(int size) {
2219 input_buffer_ = local_zone()->NewArray<Node*>(size);
2249 Node* BytecodeGraphBuilder::MakeNode(const Operator* op, int value_input_count,
2250 Node** value_inputs, bool incomplete) {
2261 Node* result = nullptr;
2271 Node** buffer = EnsureInputBufferSize(input_count_with_deps);
2273 Node** current_input = buffer + value_input_count;
2278 // The frame state will be inserted later. Here we misuse the {Dead} node
2305 Node* effect = environment()->GetEffectDependency();
2306 Node* on_exception = graph()->NewNode(op, effect, result);
2307 Node* context = environment()->LookupRegister(context_register);
2318 Node* on_success = graph()->NewNode(if_success, result);
2331 Node* BytecodeGraphBuilder::NewPhi(int count, Node* input, Node* control) {
2333 Node** buffer = EnsureInputBufferSize(count + 1);
2340 Node* BytecodeGraphBuilder::NewEffectPhi(int count, Node* input,
2341 Node* control) {
2343 Node** buffer = EnsureInputBufferSize(count + 1);
2350 Node* BytecodeGraphBuilder::MergeControl(Node* control, Node* other) {
2353 // Control node for loop exists, add input.
2358 // Control node for merge exists, add input.
2363 // Control node is a singleton, introduce a merge.
2365 Node* merge_inputs[] = {control, other};
2372 Node* BytecodeGraphBuilder::MergeEffect(Node* value, Node* other,
2373 Node* control) {
2389 Node* BytecodeGraphBuilder::MergeValue(Node* value, Node* other,
2390 Node* control) {