Lines Matching refs:Node
37 class Node;
52 // Expose {Node} and {Graph} opaquely as {wasm::TFNode} and {wasm::TFGraph}.
53 using TFNode = compiler::Node;
193 Node* mem_start;
194 Node* mem_size;
198 Node* header;
204 WasmLoopInfo(Node* header, uint32_t nesting_depth, bool can_be_innermost)
262 Node* Param(int index, const char* debug_name = nullptr);
263 Node* Loop(Node* entry);
264 void TerminateLoop(Node* effect, Node* control);
265 Node* LoopExit(Node* loop_node);
267 Node* LoopExitValue(Node* value, MachineRepresentation representation);
268 void TerminateThrow(Node* effect, Node* control);
269 Node* Merge(unsigned count, Node** controls);
271 Node* Merge(Node* fst, Nodes*... args);
272 Node* Phi(wasm::ValueType type, unsigned count, Node** vals_and_control);
273 Node* CreateOrMergeIntoPhi(MachineRepresentation rep, Node* merge,
274 Node* tnode, Node* fnode);
275 Node* CreateOrMergeIntoEffectPhi(Node* merge, Node* tnode, Node* fnode);
276 Node* EffectPhi(unsigned count, Node** effects_and_control);
277 Node* RefNull();
278 Node* RefFunc(uint32_t function_index);
279 Node* RefAsNonNull(Node* arg, wasm::WasmCodePosition position);
280 Node* Int32Constant(int32_t value);
281 Node* Int64Constant(int64_t value);
282 Node* Float32Constant(float value);
283 Node* Float64Constant(double value);
284 Node* Simd128Constant(const uint8_t value[16]);
285 Node* Binop(wasm::WasmOpcode opcode, Node* left, Node* right,
287 Node* Unop(wasm::WasmOpcode opcode, Node* input,
289 Node* MemoryGrow(Node* input);
290 Node* Throw(uint32_t tag_index, const wasm::WasmTag* tag,
291 const base::Vector<Node*> values,
293 Node* Rethrow(Node* except_obj);
294 Node* ExceptionTagEqual(Node* caught_tag, Node* expected_tag);
295 Node* LoadTagFromTable(uint32_t tag_index);
296 Node* GetExceptionTag(Node* except_obj);
297 Node* GetExceptionValues(Node* except_obj, const wasm::WasmTag* tag,
298 base::Vector<Node*> values_out);
299 bool IsPhiWithMerge(Node* phi, Node* merge);
300 bool ThrowsException(Node* node, Node** if_success, Node** if_exception);
301 void AppendToMerge(Node* merge, Node* from);
302 void AppendToPhi(Node* phi, Node* from);
312 Node* BranchNoHint(Node* cond, Node** true_node, Node** false_node);
313 Node* BranchExpectFalse(Node* cond, Node** true_node, Node** false_node);
314 Node* BranchExpectTrue(Node* cond, Node** true_node, Node** false_node);
316 void TrapIfTrue(wasm::TrapReason reason, Node* cond,
318 void TrapIfFalse(wasm::TrapReason reason, Node* cond,
320 Node* Select(Node *cond, Node* true_node, Node* false_node,
323 void TrapIfEq32(wasm::TrapReason reason, Node* node, int32_t val,
325 void ZeroCheck32(wasm::TrapReason reason, Node* node,
327 void TrapIfEq64(wasm::TrapReason reason, Node* node, int64_t val,
329 void ZeroCheck64(wasm::TrapReason reason, Node* node,
332 Node* Switch(unsigned count, Node* key);
333 Node* IfValue(int32_t value, Node* sw);
334 Node* IfDefault(Node* sw);
335 Node* Return(base::Vector<Node*> nodes);
337 Node* Return(Node* fst, Nodes*... more) {
338 Node* arr[] = {fst, more...};
343 void TraceFunctionExit(base::Vector<Node*> vals,
351 Node* CallDirect(uint32_t index, wasm::FunctionSig* real_sig,
352 base::Vector<Node*> args, base::Vector<Node*> rets,
354 Node* CallIndirect(uint32_t table_index, uint32_t sig_index,
355 wasm::FunctionSig* real_sig, base::Vector<Node*> args,
356 base::Vector<Node*> rets, wasm::WasmCodePosition position);
357 Node* CallRef(const wasm::FunctionSig* real_sig, base::Vector<Node*> args,
358 base::Vector<Node*> rets, CheckForNull null_check,
361 Node* ReturnCall(uint32_t index, const wasm::FunctionSig* real_sig,
362 base::Vector<Node*> args, wasm::WasmCodePosition position);
363 Node* ReturnCallIndirect(uint32_t table_index, uint32_t sig_index,
365 base::Vector<Node*> args,
367 Node* ReturnCallRef(const wasm::FunctionSig* real_sig,
368 base::Vector<Node*> args, CheckForNull null_check,
371 void CompareToInternalFunctionAtIndex(Node* func_ref, uint32_t function_index,
372 Node** success_control,
373 Node** failure_control);
375 void BrOnNull(Node* ref_object, Node** non_null_node, Node** null_node);
377 Node* Invert(Node* node);
379 Node* GlobalGet(uint32_t index);
380 void GlobalSet(uint32_t index, Node* val);
381 Node* TableGet(uint32_t table_index, Node* index,
383 void TableSet(uint32_t table_index, Node* index, Node* val,
388 Node* CurrentMemoryPages();
389 void TraceMemoryOperation(bool is_store, MachineRepresentation, Node* index,
391 Node* LoadMem(wasm::ValueType type, MachineType memtype, Node* index,
395 Node* LoadTransformBigEndian(wasm::ValueType type, MachineType memtype,
397 Node* index, uint64_t offset, uint32_t alignment,
400 Node* LoadTransform(wasm::ValueType type, MachineType memtype,
401 wasm::LoadTransformationKind transform, Node* index,
404 Node* LoadLane(wasm::ValueType type, MachineType memtype, Node* value,
405 Node* index, uint64_t offset, uint32_t alignment,
407 void StoreMem(MachineRepresentation mem_rep, Node* index, uint64_t offset,
408 uint32_t alignment, Node* val, wasm::WasmCodePosition position,
410 void StoreLane(MachineRepresentation mem_rep, Node* index, uint64_t offset,
411 uint32_t alignment, Node* val, uint8_t laneidx,
413 static void PrintDebugName(Node* node);
415 Node* effect();
416 Node* control();
417 Node* SetEffect(Node* node);
418 Node* SetControl(Node* node);
419 void SetEffectControl(Node* effect, Node* control);
420 Node* SetEffectControl(Node* effect_and_control) {
428 Node* control);
430 WasmInstanceCacheNodes* from, Node* merge);
432 WasmInstanceCacheNodes* from, Node* merge);
447 void SetSourcePosition(Node* node, wasm::WasmCodePosition position);
449 Node* S128Zero();
450 Node* S1x4Zero();
451 Node* S1x8Zero();
452 Node* S1x16Zero();
454 Node* SimdOp(wasm::WasmOpcode opcode, Node* const* inputs);
456 Node* SimdLaneOp(wasm::WasmOpcode opcode, uint8_t lane, Node* const* inputs);
458 Node* Simd8x16ShuffleOp(const uint8_t shuffle[16], Node* const* inputs);
460 Node* AtomicOp(wasm::WasmOpcode opcode, Node* const* inputs,
465 void MemoryInit(uint32_t data_segment_index, Node* dst, Node* src, Node* size,
467 void MemoryCopy(Node* dst, Node* src, Node* size,
470 void MemoryFill(Node* dst, Node* fill, Node* size,
473 void TableInit(uint32_t table_index, uint32_t elem_segment_index, Node* dst,
474 Node* src, Node* size, wasm::WasmCodePosition position);
476 void TableCopy(uint32_t table_dst_index, uint32_t table_src_index, Node* dst,
477 Node* src, Node* size, wasm::WasmCodePosition position);
478 Node* TableGrow(uint32_t table_index, Node* value, Node* delta);
479 Node* TableSize(uint32_t table_index);
480 void TableFill(uint32_t table_index, Node* start, Node* value, Node* count);
482 Node* StructNewWithRtt(uint32_t struct_index, const wasm::StructType* type,
483 Node* rtt, base::Vector<Node*> fields);
484 Node* StructGet(Node* struct_object, const wasm::StructType* struct_type,
487 void StructSet(Node* struct_object, const wasm::StructType* struct_type,
488 uint32_t field_index, Node* value, CheckForNull null_check,
490 Node* ArrayNewWithRtt(uint32_t array_index, const wasm::ArrayType* type,
491 Node* length, Node* initial_value, Node* rtt,
493 Node* ArrayGet(Node* array_object, const wasm::ArrayType* type, Node* index,
496 void ArraySet(Node* array_object, const wasm::ArrayType* type, Node* index,
497 Node* value, CheckForNull null_check,
499 Node* ArrayLen(Node* array_object, CheckForNull null_check,
501 void ArrayCopy(Node* dst_array, Node* dst_index, CheckForNull dst_null_check,
502 Node* src_array, Node* src_index, CheckForNull src_null_check,
503 Node* length, wasm::WasmCodePosition position);
504 Node* ArrayInit(const wasm::ArrayType* type, Node* rtt,
505 base::Vector<Node*> elements);
506 Node* ArrayInitFromData(const wasm::ArrayType* type, uint32_t data_segment,
507 Node* offset, Node* length, Node* rtt,
509 Node* I31New(Node* input);
510 Node* I31GetS(Node* input);
511 Node* I31GetU(Node* input);
512 Node* RttCanon(uint32_t type_index);
514 Node* RefTest(Node* object, Node* rtt, ObjectReferenceKnowledge config);
515 Node* RefCast(Node* object, Node* rtt, ObjectReferenceKnowledge config,
517 void BrOnCast(Node* object, Node* rtt, ObjectReferenceKnowledge config,
518 Node** match_control, Node** match_effect,
519 Node** no_match_control, Node** no_match_effect);
520 Node* RefIsData(Node* object, bool object_can_be_null);
521 Node* RefAsData(Node* object, bool object_can_be_null,
523 void BrOnData(Node* object, Node* rtt, ObjectReferenceKnowledge config,
524 Node** match_control, Node** match_effect,
525 Node** no_match_control, Node** no_match_effect);
526 Node* RefIsFunc(Node* object, bool object_can_be_null);
527 Node* RefAsFunc(Node* object, bool object_can_be_null,
529 void BrOnFunc(Node* object, Node* rtt, ObjectReferenceKnowledge config,
530 Node** match_control, Node** match_effect,
531 Node** no_match_control, Node** no_match_effect);
532 Node* RefIsArray(Node* object, bool object_can_be_null);
533 Node* RefAsArray(Node* object, bool object_can_be_null,
535 void BrOnArray(Node* object, Node* rtt, ObjectReferenceKnowledge config,
536 Node** match_control, Node** match_effect,
537 Node** no_match_control, Node** no_match_effect);
538 Node* RefIsI31(Node* object);
539 Node* RefAsI31(Node* object, wasm::WasmCodePosition position);
540 void BrOnI31(Node* object, Node* rtt, ObjectReferenceKnowledge config,
541 Node** match_control, Node** match_effect,
542 Node** no_match_control, Node** no_match_effect);
570 Node* NoContextConstant();
572 Node* GetInstance();
573 Node* BuildLoadIsolateRoot();
574 Node* UndefinedValue();
578 Node* MemBuffer(uintptr_t offset);
583 std::pair<Node*, BoundsCheckResult> BoundsCheckMem(uint8_t access_size,
584 Node* index,
589 Node* CheckBoundsAndAlignment(int8_t access_size, Node* index,
594 Node* BuildChangeEndiannessStore(Node* node, MachineRepresentation rep,
596 Node* BuildChangeEndiannessLoad(Node* node, MachineType type,
599 Node* MaskShiftCount32(Node* node);
600 Node* MaskShiftCount64(Node* node);
605 Node* BuildCCall(MachineSignature* sig, Node* function, Args... args);
606 Node* BuildCallNode(const wasm::FunctionSig* sig, base::Vector<Node*> args,
607 wasm::WasmCodePosition position, Node* instance_node,
608 const Operator* op, Node* frame_state = nullptr);
610 void LoadIndirectFunctionTable(uint32_t table_index, Node** ift_size,
611 Node** ift_sig_ids, Node** ift_targets,
612 Node** ift_instances);
613 Node* BuildIndirectCall(uint32_t table_index, uint32_t sig_index,
614 wasm::FunctionSig* real_sig, base::Vector<Node*> args,
615 base::Vector<Node*> rets,
618 Node* BuildWasmCall(const wasm::FunctionSig* sig, base::Vector<Node*> args,
619 base::Vector<Node*> rets, wasm::WasmCodePosition position,
620 Node* instance_node, Node* frame_state = nullptr);
621 Node* BuildWasmReturnCall(const wasm::FunctionSig* sig,
622 base::Vector<Node*> args,
624 Node* instance_node);
625 Node* BuildImportCall(const wasm::FunctionSig* sig, base::Vector<Node*> args,
626 base::Vector<Node*> rets,
629 Node* BuildImportCall(const wasm::FunctionSig* sig, base::Vector<Node*> args,
630 base::Vector<Node*> rets,
631 wasm::WasmCodePosition position, Node* func_index,
633 Node* BuildCallRef(const wasm::FunctionSig* real_sig,
634 base::Vector<Node*> args, base::Vector<Node*> rets,
638 Node* BuildF32CopySign(Node* left, Node* right);
639 Node* BuildF64CopySign(Node* left, Node* right);
641 Node* BuildIntConvertFloat(Node* input, wasm::WasmCodePosition position,
643 Node* BuildI32Ctz(Node* input);
644 Node* BuildI32Popcnt(Node* input);
645 Node* BuildI64Ctz(Node* input);
646 Node* BuildI64Popcnt(Node* input);
647 Node* BuildBitCountingCall(Node* input, ExternalReference ref,
650 Node* BuildCFuncInstruction(ExternalReference ref, MachineType type,
651 Node* input0, Node* input1 = nullptr);
652 Node* BuildF32Trunc(Node* input);
653 Node* BuildF32Floor(Node* input);
654 Node* BuildF32Ceil(Node* input);
655 Node* BuildF32NearestInt(Node* input);
656 Node* BuildF64Trunc(Node* input);
657 Node* BuildF64Floor(Node* input);
658 Node* BuildF64Ceil(Node* input);
659 Node* BuildF64NearestInt(Node* input);
660 Node* BuildI32Rol(Node* left, Node* right);
661 Node* BuildI64Rol(Node* left, Node* right);
663 Node* BuildF64Acos(Node* input);
664 Node* BuildF64Asin(Node* input);
665 Node* BuildF64Pow(Node* left, Node* right);
666 Node* BuildF64Mod(Node* left, Node* right);
668 Node* BuildIntToFloatConversionInstruction(
669 Node* input, ExternalReference ref,
672 Node* BuildF32SConvertI64(Node* input);
673 Node* BuildF32UConvertI64(Node* input);
674 Node* BuildF64SConvertI64(Node* input);
675 Node* BuildF64UConvertI64(Node* input);
677 Node* BuildCcallConvertFloat(Node* input, wasm::WasmCodePosition position,
680 Node* BuildI32DivS(Node* left, Node* right, wasm::WasmCodePosition position);
681 Node* BuildI32RemS(Node* left, Node* right, wasm::WasmCodePosition position);
682 Node* BuildI32DivU(Node* left, Node* right, wasm::WasmCodePosition position);
683 Node* BuildI32RemU(Node* left, Node* right, wasm::WasmCodePosition position);
685 Node* BuildI64DivS(Node* left, Node* right, wasm::WasmCodePosition position);
686 Node* BuildI64RemS(Node* left, Node* right, wasm::WasmCodePosition position);
687 Node* BuildI64DivU(Node* left, Node* right, wasm::WasmCodePosition position);
688 Node* BuildI64RemU(Node* left, Node* right, wasm::WasmCodePosition position);
689 Node* BuildDiv64Call(Node* left, Node* right, ExternalReference ref,
693 Node* BuildTruncateIntPtrToInt32(Node* value);
694 Node* BuildChangeInt32ToIntPtr(Node* value);
695 Node* BuildChangeIntPtrToInt64(Node* value);
696 Node* BuildChangeUint32ToUintPtr(Node*);
697 Node* BuildChangeInt32ToSmi(Node* value);
698 Node* BuildChangeUint31ToSmi(Node* value);
699 Node* BuildSmiShiftBitsConstant();
700 Node* BuildSmiShiftBitsConstant32();
701 Node* BuildChangeSmiToInt32(Node* value);
702 Node* BuildChangeSmiToIntPtr(Node* value);
704 Node* BuildConvertUint32ToSmiWithSaturation(Node* index, uint32_t maxval);
706 void MemTypeToUintPtrOrOOBTrap(std::initializer_list<Node**> nodes,
709 Node* IsNull(Node* object);
711 void GetGlobalBaseAndOffset(const wasm::WasmGlobal&, Node** base_node,
712 Node** offset_node);
714 using BranchBuilder = std::function<void(Node*, BranchHint)>;
725 using SmallNodeVector = base::SmallVector<Node*, 6>;
735 void TypeCheck(Node* object, Node* rtt, ObjectReferenceKnowledge config,
737 void DataCheck(Node* object, bool object_can_be_null, Callbacks callbacks);
738 void ManagedObjectInstanceCheck(Node* object, bool object_can_be_null,
742 void BrOnCastAbs(Node** match_control, Node** match_effect,
743 Node** no_match_control, Node** no_match_effect,
745 void BoundsCheckArray(Node* array, Node* index,
747 void BoundsCheckArrayCopy(Node* array, Node* index, Node* length,
751 Node* BuildI32AsmjsSConvertF32(Node* input);
752 Node* BuildI32AsmjsSConvertF64(Node* input);
753 Node* BuildI32AsmjsUConvertF32(Node* input);
754 Node* BuildI32AsmjsUConvertF64(Node* input);
755 Node* BuildI32AsmjsDivS(Node* left, Node* right);
756 Node* BuildI32AsmjsRemS(Node* left, Node* right);
757 Node* BuildI32AsmjsDivU(Node* left, Node* right);
758 Node* BuildI32AsmjsRemU(Node* left, Node* right);
759 Node* BuildAsmjsLoadMem(MachineType type, Node* index);
760 Node* BuildAsmjsStoreMem(MachineType type, Node* index, Node* val);
763 Node* BuildF64x2Ceil(Node* input);
764 Node* BuildF64x2Floor(Node* input);
765 Node* BuildF64x2Trunc(Node* input);
766 Node* BuildF64x2NearestInt(Node* input);
767 Node* BuildF32x4Ceil(Node* input);
768 Node* BuildF32x4Floor(Node* input);
769 Node* BuildF32x4Trunc(Node* input);
770 Node* BuildF32x4NearestInt(Node* input);
772 void BuildEncodeException32BitValue(Node* values_array, uint32_t* index,
773 Node* value);
774 Node* BuildDecodeException32BitValue(Node* values_array, uint32_t* index);
775 Node* BuildDecodeException64BitValue(Node* values_array, uint32_t* index);
777 Node* BuildMultiReturnFixedArrayFromIterable(const wasm::FunctionSig* sig,
778 Node* iterable, Node* context);
780 Node* BuildLoadExternalPointerFromObject(
781 Node* object, int offset,
784 Node* BuildLoadCallTargetFromExportedFunctionData(Node* function_data);
790 Node* BuildCallToRuntime(Runtime::FunctionId f, Node** parameters,
793 Node* BuildCallToRuntimeWithContext(Runtime::FunctionId f, Node* js_context,
794 Node** parameters, int parameter_count);
804 Node* StoreArgsInStackSlot(
805 std::initializer_list<std::pair<MachineRepresentation, Node*>> args);
812 Node** parameters_;
816 SetOncePointer<Node> stack_check_code_node_;
829 SetOncePointer<Node> instance_node_;
843 Node* frame_state);