Skip to content

protocols

Classes:

VisitorMixinRuntimeBase

VisitorMixinTypingBase

Methods:

activate_runtime_feature

activate_runtime_feature(_feature_name: str) -> None
Source code in packages/irx/src/irx/builder/protocols.py
779
780
781
782
783
784
785
786
def activate_runtime_feature(self, _feature_name: str) -> None:
    """
    title: Activate runtime feature.
    parameters:
      _feature_name:
        type: str
    """
    return None

create_entry_block_alloca

create_entry_block_alloca(
    _var_name: str, _type_name: str | Type
) -> Any
Source code in packages/irx/src/irx/builder/protocols.py
651
652
653
654
655
656
657
658
659
660
661
662
663
664
def create_entry_block_alloca(
    self, _var_name: str, _type_name: str | ir.Type
) -> Any:
    """
    title: Create entry block alloca.
    parameters:
      _var_name:
        type: str
      _type_name:
        type: str | ir.Type
    returns:
      type: Any
    """
    return cast(Any, None)

get_function

get_function(_name: str) -> Function | None
Source code in packages/irx/src/irx/builder/protocols.py
623
624
625
626
627
628
629
630
631
632
def get_function(self, _name: str) -> ir.Function | None:
    """
    title: Get function.
    parameters:
      _name:
        type: str
    returns:
      type: ir.Function | None
    """
    return cast(ir.Function | None, None)

llvm_function_name_for_node

llvm_function_name_for_node(
    _node: AST, _fallback: str
) -> str
Source code in packages/irx/src/irx/builder/protocols.py
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
def llvm_function_name_for_node(
    self,
    _node: astx.AST,
    _fallback: str,
) -> str:
    """
    title: Return the LLVM symbol name for a function node.
    parameters:
      _node:
        type: astx.AST
      _fallback:
        type: str
    returns:
      type: str
    """
    return _fallback

require_runtime_symbol

require_runtime_symbol(
    _feature_name: str, _symbol_name: str
) -> Function
Source code in packages/irx/src/irx/builder/protocols.py
764
765
766
767
768
769
770
771
772
773
774
775
776
777
def require_runtime_symbol(
    self, _feature_name: str, _symbol_name: str
) -> ir.Function:
    """
    title: Require runtime symbol.
    parameters:
      _feature_name:
        type: str
      _symbol_name:
        type: str
    returns:
      type: ir.Function
    """
    return cast(ir.Function, None)

set_fast_math

set_fast_math(_enabled: bool) -> None
Source code in packages/irx/src/irx/builder/protocols.py
788
789
790
791
792
793
794
795
def set_fast_math(self, _enabled: bool) -> None:
    """
    title: Set fast math.
    parameters:
      _enabled:
        type: bool
    """
    return None

visit

visit(_node: AST) -> None
Source code in packages/irx/src/irx/builder/protocols.py
605
606
607
608
609
610
611
612
def visit(self, _node: astx.AST) -> None:
    """
    title: Visit AST nodes.
    parameters:
      _node:
        type: astx.AST
    """
    raise NotImplementedError

visit_child

visit_child(_node: AST) -> None
Source code in packages/irx/src/irx/builder/protocols.py
614
615
616
617
618
619
620
621
def visit_child(self, _node: astx.AST) -> None:
    """
    title: Visit one child AST node.
    parameters:
      _node:
        type: astx.AST
    """
    raise NotImplementedError

VisitorProtocol

Bases: BaseVisitorProtocol, Protocol

Methods:

activate_runtime_feature

activate_runtime_feature(_feature_name: str) -> None
Source code in packages/irx/src/irx/builder/protocols.py
270
271
272
273
274
275
276
277
def activate_runtime_feature(self, _feature_name: str) -> None:
    """
    title: Activate runtime feature.
    parameters:
      _feature_name:
        type: str
    """
    ...

create_entry_block_alloca

create_entry_block_alloca(
    _var_name: str, _type_name: str | Type
) -> Any
Source code in packages/irx/src/irx/builder/protocols.py
129
130
131
132
133
134
135
136
137
138
139
140
141
142
def create_entry_block_alloca(
    self, _var_name: str, _type_name: str | ir.Type
) -> Any:
    """
    title: Create entry block alloca.
    parameters:
      _var_name:
        type: str
      _type_name:
        type: str | ir.Type
    returns:
      type: Any
    """
    ...

get_function

get_function(_name: str) -> Function | None
Source code in packages/irx/src/irx/builder/protocols.py
101
102
103
104
105
106
107
108
109
110
def get_function(self, _name: str) -> ir.Function | None:
    """
    title: Get function.
    parameters:
      _name:
        type: str
    returns:
      type: ir.Function | None
    """
    ...

llvm_function_name_for_node

llvm_function_name_for_node(
    _node: AST, _fallback: str
) -> str
Source code in packages/irx/src/irx/builder/protocols.py
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
def llvm_function_name_for_node(
    self,
    _node: astx.AST,
    _fallback: str,
) -> str:
    """
    title: Return the LLVM symbol name for a function node.
    parameters:
      _node:
        type: astx.AST
      _fallback:
        type: str
    returns:
      type: str
    """
    ...

require_runtime_symbol

require_runtime_symbol(
    _feature_name: str, _symbol_name: str
) -> Function
Source code in packages/irx/src/irx/builder/protocols.py
255
256
257
258
259
260
261
262
263
264
265
266
267
268
def require_runtime_symbol(
    self, _feature_name: str, _symbol_name: str
) -> ir.Function:
    """
    title: Require runtime symbol.
    parameters:
      _feature_name:
        type: str
      _symbol_name:
        type: str
    returns:
      type: ir.Function
    """
    ...

set_fast_math

set_fast_math(_enabled: bool) -> None
Source code in packages/irx/src/irx/builder/protocols.py
279
280
281
282
283
284
285
286
def set_fast_math(self, _enabled: bool) -> None:
    """
    title: Set fast math.
    parameters:
      _enabled:
        type: bool
    """
    ...

visit

visit(_node: AST) -> None
Source code in packages/irx/src/irx/base/visitors/protocols.py
17
18
19
20
21
22
23
24
def visit(self, _node: astx.AST) -> None:
    """
    title: Visit AST nodes.
    parameters:
      _node:
        type: astx.AST
    """
    ...

visit_child

visit_child(_node: AST) -> None
Source code in packages/irx/src/irx/base/visitors/protocols.py
26
27
28
29
30
31
32
33
def visit_child(self, _node: astx.AST) -> None:
    """
    title: Visit one child AST node.
    parameters:
      _node:
        type: astx.AST
    """
    ...