package
0.0.0-20250112020414-b7d121007f5a
Repository: https://github.com/tim-hardcastle/pipefish.git
Documentation: pkg.go.dev

# README

README for the "compiler" package.

  • api_serialization serializes the API for the benefit of potential client services. (TODO: this could be done once at compile time and stored in the compiler.)

  • builtin contains the code for generating builtin functions.

  • compiler knows everything needed to compile a line of code from the REPL at runtime. It does not know how to compile a script by itself, and is directed in this by the initializer package.

  • compfcall breaks out the logic for compiling a function call, which is complicated because of the multiple dispatch.

  • environment supplies data structures and their getters and setters for keeping track of where in (virtual) memory variables are stored.

  • getters is a miscellaneous collection of helper functions for extracting data conveniently from wherever its stored and converting it from one form to another. This can be quite convoluted as a result of my attempts to maintain a single source of truth.

  • typeschemes contains types, and functions for manipulating them, that represents the compiler's view of the type system. This is somewhat richer than that enjoyed by the user or the compiled code, in that it can keep track of the types of the elements of tuples.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Initializes a compiler.
No description provided by the author

# Constants

At present, the only three of these we actually switch on are CHECK_RETURN_TYPES, CHECK_GLOCBAL_ASSIGNMENTS, and CHECK_LAMBDA_PARAMETERS.
At present, the only three of these we actually switch on are CHECK_RETURN_TYPES, CHECK_GLOCBAL_ASSIGNMENTS, and CHECK_LAMBDA_PARAMETERS.
variable on the left makes it global.
At present, the only three of these we actually switch on are CHECK_RETURN_TYPES, CHECK_GLOCBAL_ASSIGNMENTS, and CHECK_LAMBDA_PARAMETERS.
At present, the only three of these we actually switch on are CHECK_RETURN_TYPES, CHECK_GLOCBAL_ASSIGNMENTS, and CHECK_LAMBDA_PARAMETERS.
Note that in the case of multiple assignment, just one global.
At present, the only three of these we actually switch on are CHECK_RETURN_TYPES, CHECK_GLOCBAL_ASSIGNMENTS, and CHECK_LAMBDA_PARAMETERS.
We're in a command.
We're in a function.
The maximum value of a `uint32`.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
We're initializing the global variables.
We're in a lambda function.
We're autologging a line.
We're still initializing the variables.
The user did a custom log statement other than an autolog.
No logging is taking place.
We're logging everything.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Call from the REPL, or an external service.
No description provided by the author
No description provided by the author
When 'this' hasn't been defined because we haven't finished compiling the lambda.
i.e.
i.e.
No description provided by the author

# Variables

Update with:.
No description provided by the author
No description provided by the author
What every compiler starts off with.
go:embed test-files/*.
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
The `Context` is passed around the compiler to keep track of what it's trying to do.
The compiler's representation of a function after the function has been compiled.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A couple of types to support thunking.
No description provided by the author
Information we need in the CpFunc struct to call an external service.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
This is the type of the access that the compiler has at any given point in the compilation.
No description provided by the author
This keeps track of what we should be logging, and is passed around the compiler in the context struct.
No description provided by the author
No description provided by the author