ah I thought this is something like a bool... idk what its value should be. IIRC there are other some other attributes which may also need to change.
But for function implementations we might be able to implement it as a library.
I guess we probably have to hardcode the array type in the compiler? Not sure how should we handle num_dims
otherwise.
Actually we won't be able to differentiate between the case which the constructor exists but does not have @kernel
/@portable
from the case which the constructor does not exist at all. This is due…
Related: if
__init__
exists and is not decorated with@kernel
or@portable
, attempting to create the object on the device…
register_top_level
will return Result<(StrRef, DefinitionId, Option<Type>), String>
, where the third element of the tuple is the type of the function or constructor of the class (if there is…
Some platform ABI will require passing structs by register under certain condition (size of the composite type, available registers, etc.). This is done by the frontend and requires platform specific…
I think we should implement something like the diagnostic class in the legacy compiler. Returning an result will only work for errors.
Plan: Support optional lifetime annotation for functions and object fields, and will be enforced by the escape analyzer. Functions will be treated as transfer functions that transform input parameter…
I guess it would make more sense to name the function get_tuple_element
instead of get_tuple_index
?
Approach: We are doing a field-sensitive intraprocedural dataflow analysis on each function to determine the lifetime of each values, and whether certain assignment/return operations are illegal…
It might be better to split the last commit into the symbol resolver change (get_obj_value
now accepts an expected_ty
param) and the refactoring (adding expected type to all to_basic_value_enum
calls)
but if you don't know beforehand what the attribute names are, how can you implement the run
function? is that generated dynamically?