pca006132
  • Joined on 2020-04-27
pca006132 commented on issue M-Labs/nac3#269 2022-04-18 19:29:22 +08:00
review second parameter of create_enum_attribute

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.

pca006132 commented on issue M-Labs/nac3#149 2022-04-14 23:27:41 +08:00
implement numpy arrays, math functions, and matrix math

But for function implementations we might be able to implement it as a library.

pca006132 commented on issue M-Labs/nac3#149 2022-04-14 23:27:08 +08:00
implement numpy arrays, math functions, and matrix math

I guess we probably have to hardcode the array type in the compiler? Not sure how should we handle num_dims otherwise.

pca006132 commented on pull request M-Labs/nac3#265 2022-04-14 23:24:19 +08:00
no_init

See my comment on #221 and #263.

pca006132 commented on issue M-Labs/nac3#221 2022-04-14 23:21:54 +08:00
classes without __init__ should be valid

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…

pca006132 commented on pull request M-Labs/nac3#263 2022-04-13 14:46:57 +08:00
nac3core: toplevel, fix for class constructors + spelling errors

M-Labs/nac3#32 (comment)

Related: if __init__ exists and is not decorated with @kernel or @portable, attempting to create the object on the device…

pca006132 commented on pull request M-Labs/nac3#263 2022-04-13 14:29:53 +08:00
nac3core: toplevel, fix for class constructors + spelling errors

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…

pca006132 commented on issue M-Labs/artiq-zynq#76 2022-04-12 20:29:05 +08:00
figure out CSlice/&CSlice inconsistency

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…

pca006132 commented on issue M-Labs/nac3#118 2022-04-12 20:23:47 +08:00
dead code is not an error

I think we should implement something like the diagnostic class in the legacy compiler. Returning an result will only work for errors.

pca006132 commented on issue M-Labs/nac3#51 2022-04-10 22:10:56 +08:00
escape analysis

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…

pca006132 closed issue M-Labs/nac3#185 2022-04-10 21:45:33 +08:00
add bound checks for list slice and slice assignment
pca006132 commented on pull request M-Labs/nac3#261 2022-04-10 21:45:16 +08:00
Optimize Kernel Invariant on Unwrap and Tuple

I guess it would make more sense to name the function get_tuple_element instead of get_tuple_index?

pca006132 commented on issue M-Labs/nac3#51 2022-04-10 20:25:02 +08:00
escape analysis

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…

pca006132 approved M-Labs/nac3#259 2022-04-09 14:48:05 +08:00
Get llvm value with expected type (#256)

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)

pca006132 pushed to escape-analysis at M-Labs/nac3 2022-04-08 23:46:42 +08:00
830fc0f453 escape analysis: make list elements imprecise
pca006132 pushed to escape-analysis at M-Labs/nac3 2022-04-08 20:17:12 +08:00
ea5a8c95dc escape analysis: fixed some bugs regarding imprecise local
pca006132 pushed to escape-analysis at M-Labs/nac3 2022-04-08 09:18:59 +08:00
fb79b47b38 escape analysis: fixed infinite loop detection
pca006132 pushed to escape-analysis at M-Labs/nac3 2022-04-07 23:02:24 +08:00
1257a80ed1 escape analysis implementation
pca006132 commented on issue M-Labs/nac3#258 2022-04-07 15:16:23 +08:00
Dynamic attributes and typing

but if you don't know beforehand what the attribute names are, how can you implement the run function? is that generated dynamically?