Skip to content

protocols

Classes:

VisitorMixinRuntimeBase

VisitorMixinTypingBase

Methods:

activate_runtime_feature

activate_runtime_feature(_feature_name: str) -> None
Source code in src/irx/builder/protocols.py
683
684
685
686
687
688
689
690
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 src/irx/builder/protocols.py
586
587
588
589
590
591
592
593
594
595
596
597
598
599
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 src/irx/builder/protocols.py
558
559
560
561
562
563
564
565
566
567
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 src/irx/builder/protocols.py
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
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 src/irx/builder/protocols.py
668
669
670
671
672
673
674
675
676
677
678
679
680
681
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 src/irx/builder/protocols.py
692
693
694
695
696
697
698
699
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 src/irx/builder/protocols.py
540
541
542
543
544
545
546
547
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 src/irx/builder/protocols.py
549
550
551
552
553
554
555
556
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 src/irx/builder/protocols.py
220
221
222
223
224
225
226
227
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 src/irx/builder/protocols.py
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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 src/irx/builder/protocols.py
81
82
83
84
85
86
87
88
89
90
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 src/irx/builder/protocols.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
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 src/irx/builder/protocols.py
205
206
207
208
209
210
211
212
213
214
215
216
217
218
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 src/irx/builder/protocols.py
229
230
231
232
233
234
235
236
def set_fast_math(self, _enabled: bool) -> None:
    """
    title: Set fast math.
    parameters:
      _enabled:
        type: bool
    """
    ...

visit

visit(_node: AST) -> None
Source code in 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 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
    """
    ...