module Savi::Program::Intrinsic

Overview

This module defines the evaluation effects for all of those declarators whose effects are not defined in Savi code. Such declarators are tagged with the :intrinsic declaration indicating they are not defined in Savi.

Eventually we may be able to refactor some of these compiler intrinsics such that they are definable in Savi code, based more fundamental intrinsics.

Defined in:

savi/program/declarator/intrinsic.cr

Class Method Summary

Class Method Detail

def self.declare_enum_each_enum_member(ctx : Compiler::Context, scope : Declarator::Scope, declarator : Declarator) #

[View source]
def self.declare_enum_from_u64(ctx : Compiler::Context, scope : Declarator::Scope, declarator : Declarator) #

An enum type gets a method for converting from U64.


[View source]
def self.declare_enum_member_name(ctx : Compiler::Context, scope : Declarator::Scope, declarator : Declarator) #

[View source]
def self.declare_numeric_copies(ctx : Compiler::Context, scope : Declarator::Scope, declarator : Declarator) #

[View source]
def self.finish(ctx : Compiler::Context, scope : Declarator::Scope, declarator : Declarator) #

[View source]
def self.run(ctx : Compiler::Context, scope : Declarator::Scope, declarator : Declarator, declare : AST::Declare, terms : Hash(String, AST::Term | Nil)) #

[View source]