* Implement parsing and storing of all sway files on sway-server start.
Support go-to definition between files.
* handle remove document on file deletion
* use tesst features from forc
* extract forc utils to sway-server
* add forc to sway-server
* remove Option wrapper around handle_open_file
* Custom span type implementation.
* Change instances of eval2! to check
* Pass &BuildConfig instead of BuildConfig
* Move Span import to the correct place---inside the test module.
Code generation for contract calls and associated fixes.
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MBP.localdomain>
Co-authored-by: Brandon Kite <brandonkite92@gmail.com>
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* Implement LE/GE ops
* Update test suite to new interpreter API
* code review feedback
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
The CompileResult was a bit redundant in that both the arms for Ok and
Err had `warnings` and `errors` vectors. Frequently when matching a
CompileResult the `warnings` and `errors` would be copied redundantly,
regardless of the actual result value.
By replacing the enum with a struct which has one copy of warnings and
errors and an Option<T> for the value instead we can reduce boilerplate
considerably. This commit has a net change of -400 lines of code from
the Sway codebase.
* remove typescript ignores
* traverse all possible sway file types
* handle case when a file is not part of the build
* handle use and dep statements
* improve use/dep format logic
* added use/dep tests in isolation
* make functions pub in Impl Declerations
* traverse ImplTrait and ImplSelf
* newline
* added extract_keyword
* extract use/dep and format them correctly
* revert code_builde to previous state
* handle new line pattern case
* added already formatted line logic
* remove isolated test case
* rename functions
* sketch out asm for the contract switch statement
* sketch out contract abi compilation
* finish ABI generation
* add Contract type keyword
* remove println
* use byte indicies in parse_bytecode
* update offset constants for new spec
* swap RVRT for RET, temporarily
* Update core_lang/src/asm_generation/mod.rs
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* PR feedback
* document selector word format
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* remove typescript ignores
* install tokio and fuel-core
* use ContractId instead of ContractAddress
* use async syntax and tokio for runtime
* attach client and send tx
* add newline
* added PK for fuel-core in git-workflows
* set toolchain to stable
* fix type rename
* update cargo and remove fuel-core branch
* remove port option
* added Network config to manifest with url of the node
* format code
* remove typescript ignores
* handle equal sign with ! correctly
* handle more whitespace cases
* handle multiline comments and inline comments
* add newline
* add space after quote
* added tests
* fixed multiline */
* fix adding inline comment
* add "}" before moving to new line or new comment
* improve comments tests
* add more multiline checks
* update tests
* check for None option when checking whitespace
* check that last char is not None
* add comma to ignore list
* added more extensive testcase dealing with keywords on multiple lines
* handle keywords on different lines case
* added code type
* added custom type to handle enum,struct commas
* added custom types test
* added more tests to handle custom types and comments
* handle adding line of custom type
* improved multiline comment logic
* refactored, and added correct multiline comment and custom types formatting
* improve adding comma logic to struct or enum
* use ropey and parser in formatter
* make public
* handle custom types in traversal
* remove custom types logic
* use traversal
* traverse ast before formatting
* use updated formatter
* use updated formatter
* move functions to helpers
* added forc deploy
* return list of errors
* print errors
* install prettydiff
* print diffs for Sway files
* remove pub
* use correct fuel project commits from master
* build before formatting, output diffs correctly
* reuse color print helpers
* added stdout and stderr color prints
* Implement trait constraints in generic code
implement fully qualified method invocations
For this, I did introduce a bit of special syntax. We can remove it later if we are able to make the parser smarter, but it was the shortest path forward for now. If you are referring to a a method via its type, like (Rust) T::clone(), then you must flag that it is a type with a ~. So, in Sway, ~T::clone(). You can see this is used in the implementation of vectors.
This means there are two ways to refer to methods, just like Rust: a.b.foo() and TypeName::foo(a.b), assuming the first argument is self.
Fix some parsing bugs in method invocations
Implement inner struct field reassignments
* remove dbg print
* remove infinite recursive dependency
* fix up sway-server for new reassignment type
* fix warnings
* cargo fmt
* sketch out asm for struct subfield reassignment
* middle of airport progress...
* add struct memory descriptor abstraction for use in code generation
* clean up todos; finish struct inner field reassignment assembly
* add struct inner field reassignment to test suite
* add test for struct memory layout
* fix warnings
* fix tests
* remove dead comment and fix formatting
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MBP.localdomain>
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
* Enable GitHub-based remote dependencies
These changes enable users to specify dependencies that are
hosted on GitHub by defining the property `git = ":url"`
in the dependency, e.g:
```
std = { git = ":url"}
```
For now the GitHub repo must be public.
It also enables users to specify either a branch or a versioned tag
along with the git repo, e.g:
```
std = { git = ":url", branch = "my-branch"}
```
and:
```
std = { git = ":url", version = "0.0.1"}
```
As of now, version takes precedence over branch references.
These remote dependencies will be installed under `~/forc/`.
If no version/branch is specified, it will download the default
branch at the latest commit.
Future work includes:
- A command to check if there are remote changes to the dependency
- A command to download updates to the dependencies
* Move comments to docstring and use constant for Forc directory
* Enable offline mode
* Fix Forc.toml formatting
* Add offline_mode flag to harness test
* Readability improvements
* Readability improvements
* Improve some error messages for better debuggability
* remove typescript ignores
* handle equal sign with ! correctly
* handle more whitespace cases
* handle multiline comments and inline comments
* add newline
* add space after quote
* added tests
* fixed multiline */
* fix adding inline comment
* add "}" before moving to new line or new comment
* improve comments tests
* add more multiline checks
* update tests
* check for None option when checking whitespace
* check that last char is not None
* add comma to ignore list
* added more extensive testcase dealing with keywords on multiple lines
* handle keywords on different lines case
* added code type
* added custom type to handle enum,struct commas
* added custom types test
* added more tests to handle custom types and comments
* handle adding line of custom type
* improved multiline comment logic
* refactored, and added correct multiline comment and custom types formatting
* improve adding comma logic to struct or enum
* use ropey and parser in formatter
* make public
* handle custom types in traversal
* remove custom types logic
* use traversal
* traverse ast before formatting
* use updated formatter
* use updated formatter
* move functions to helpers
* added forc deploy
* added src constant
* added todo comment
* added manifest not found message
* added more constants
* use forc_build and add more detailed error messages
* remove pub from fn
* remove typescript ignores
* handle equal sign with ! correctly
* handle more whitespace cases
* handle multiline comments and inline comments
* add newline
* add space after quote
* added tests
* fixed multiline */
* fix adding inline comment
* add "}" before moving to new line or new comment
* improve comments tests
* add more multiline checks
* update tests
* check for None option when checking whitespace
* check that last char is not None
* add comma to ignore list
* added more extensive testcase dealing with keywords on multiple lines
* handle keywords on different lines case
* added code type
* added custom type to handle enum,struct commas
* added custom types test
* added more tests to handle custom types and comments
* handle adding line of custom type
* improved multiline comment logic
* refactored, and added correct multiline comment and custom types formatting
* improve adding comma logic to struct or enum
* use ropey and parser in formatter
* make public
* handle custom types in traversal
* remove custom types logic
* use traversal
* traverse ast before formatting
* use updated formatter
* use updated formatter
* add space after '='
* add more tests
* use correct span
* handle if expression and code blocks
* handle open brace correctly
* added more tests with if statements
* remove typescript ignores
* move formatter to separate lib
* created forc fmt command
* refactor to use path
* move find_manifest_dir to helpers file
* handle --check flag for forc fmt
* use crate formatter
* update logic for fmt --check
* add newline
* added alpha tag
* Update Cargo.toml
Remove version alpha suffix.
* Update Cargo.lock
Remove version alpha suffix.
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* begin register allocator
* begin reg alloc
* mutable virtual registers; basic allocation algorithm skeleton
* mutable registers in allocation
* pull in fuel-asm official ops
* switching laptops
* begin work on virtual registers and ops
* daily checkpoint
* add AllocatedOp abstraction
* template for parsing ops
* allocation algorithm progress
* change op parsing logic
* WIP parsing inline asm to new ops
* more op parsing
* finish parsing virtual ops from asm
* start registers method
* register allocation method
* convert virtual registers to allocated ones
* switch back to organizational labels for jumps
* realized ops
* fully allocate registers and resolve labels
* print allocated registers
* fill in todo!() errors in asm parsing
* resolve all todosudo apt-get install vlc in core_lang
* switch to ssh for fuel-asm
* resolve warnings
* fix git url
* rustfmt
* small self-code-review
* resolve module
* map the virtual opcodes to fuel_asm ops
* code review feedback
* factor finalized asm out into its own file
* realize data section and instructions to bits
* data section offset label
* initial bytecode generation
* add forc --asm command
* print out the loading of the data section op
* resolve warnings
* fix register allocater bug
* cleanup
* fix bad error message
* code review feedback
* fix doctest
* fix typo
* reference fuel_core for register constants
* add stdlib stuff
* allow use of interface surface functions in the methods section of trait declarations
* comment
* basic math stdlib
* begin work on include statements
* checkpoint while i get breakfast
* parse include statements
* tiny expect fixes
* introduce BuildConfig
* build_config module
* do plumbing for new files
* render warnings and errors on the right text
* use interior library name for module name; support aliasing
* sketch out include compilation and dead code analysis
* perform dead code analysis on imported files
* TDD: broken test cases
* nested dep example
* remove todo
* importing absolutely from the root of the project
* tests of multi-level dependencies
* fix namespace catastrophic short-circuiting when hitting import errors
* use constants for message contents; update error message wording
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
* begin register allocator
* begin reg alloc
* mutable virtual registers; basic allocation algorithm skeleton
* mutable registers in allocation
* pull in fuel-asm official ops
* switching laptops
* begin work on virtual registers and ops
* daily checkpoint
* add AllocatedOp abstraction
* template for parsing ops
* allocation algorithm progress
* change op parsing logic
* WIP parsing inline asm to new ops
* more op parsing
* finish parsing virtual ops from asm
* start registers method
* register allocation method
* convert virtual registers to allocated ones
* switch back to organizational labels for jumps
* realized ops
* fully allocate registers and resolve labels
* print allocated registers
* fill in todo!() errors in asm parsing
* resolve all todosudo apt-get install vlc in core_lang
* switch to ssh for fuel-asm
* resolve warnings
* fix git url
* rustfmt
* small self-code-review
* resolve module
* map the virtual opcodes to fuel_asm ops
* code review feedback
* factor finalized asm out into its own file
* realize data section and instructions to bits
* data section offset label
* remove typescript ignores
* initial bytecode generation
* add forc --asm command
* print out the loading of the data section op
* resolve warnings
* fix register allocater bug
* cleanup
* fix bad error message
* add fuel-tx and fuel-vm-rust as deps
* add mvp logic
* update builds
* added mvp
* rename to fuel-core
* use fuel_core
* format files
* use optional input data
* frormat
* added default value for path
* use fuel-core
* Rename fuel-core to fuel-vm.
* Use new build command format.
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
Co-authored-by: Alex <alex@42layers.io>
Co-authored-by: John Adler <john.adler@protonmail.ch>
* begin register allocator
* begin reg alloc
* mutable virtual registers; basic allocation algorithm skeleton
* mutable registers in allocation
* pull in fuel-asm official ops
* switching laptops
* begin work on virtual registers and ops
* daily checkpoint
* add AllocatedOp abstraction
* template for parsing ops
* allocation algorithm progress
* change op parsing logic
* WIP parsing inline asm to new ops
* more op parsing
* finish parsing virtual ops from asm
* start registers method
* register allocation method
* convert virtual registers to allocated ones
* switch back to organizational labels for jumps
* realized ops
* fully allocate registers and resolve labels
* print allocated registers
* fill in todo!() errors in asm parsing
* resolve all todosudo apt-get install vlc in core_lang
* switch to ssh for fuel-asm
* resolve warnings
* fix git url
* rustfmt
* small self-code-review
* resolve module
* map the virtual opcodes to fuel_asm ops
* code review feedback
* factor finalized asm out into its own file
* realize data section and instructions to bits
* data section offset label
* initial bytecode generation
* add forc --asm command
* print out the loading of the data section op
* resolve warnings
* fix register allocater bug
* cleanup
* fix bad error message
* code review feedback
* fix doctest
* fix typo
* reference fuel_core for register constants
* add stdlib stuff
* allow use of interface surface functions in the methods section of trait declarations
* comment
* basic math stdlib
* formatting
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
* harness for bytecode debugging
* forgotten add
* fix data section; add forc commands for bin out and parsing bytecode
* fix test harness for new forc command
* Update example_project/fuel_project/src/main.sw
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* swap bits for bytes
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* begin register allocator
* begin reg alloc
* mutable virtual registers; basic allocation algorithm skeleton
* mutable registers in allocation
* pull in fuel-asm official ops
* switching laptops
* begin work on virtual registers and ops
* daily checkpoint
* add AllocatedOp abstraction
* template for parsing ops
* allocation algorithm progress
* change op parsing logic
* WIP parsing inline asm to new ops
* more op parsing
* finish parsing virtual ops from asm
* start registers method
* register allocation method
* convert virtual registers to allocated ones
* switch back to organizational labels for jumps
* realized ops
* fully allocate registers and resolve labels
* print allocated registers
* fill in todo!() errors in asm parsing
* resolve all todosudo apt-get install vlc in core_lang
* switch to ssh for fuel-asm
* resolve warnings
* fix git url
* rustfmt
* small self-code-review
* resolve module
* map the virtual opcodes to fuel_asm ops
* code review feedback
* factor finalized asm out into its own file
* realize data section and instructions to bits
* data section offset label
* initial bytecode generation
* add forc --asm command
* print out the loading of the data section op
* resolve warnings
* begin VM tests
* fix register allocater bug
* cleanup
* fix bad error message
* some tiny tweaks
* fix opcode encoding bug
* fix off-by-one error
* change all tests to run in the vm
* proper allocation size for structs
* code review feedback
* use ssh for deps
* undo rename
* fix doctest
* fix typo
* reference fuel_core for register constants
* new ssh key
* git change rust version
* wrong rust version
* update lockfile
* fix jump and enum instantiation bugs
* fix toml
* lockfile
* code review feedback
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
* begin register allocator
* begin reg alloc
* mutable virtual registers; basic allocation algorithm skeleton
* mutable registers in allocation
* pull in fuel-asm official ops
* switching laptops
* begin work on virtual registers and ops
* daily checkpoint
* add AllocatedOp abstraction
* template for parsing ops
* allocation algorithm progress
* change op parsing logic
* WIP parsing inline asm to new ops
* more op parsing
* finish parsing virtual ops from asm
* start registers method
* register allocation method
* convert virtual registers to allocated ones
* switch back to organizational labels for jumps
* realized ops
* fully allocate registers and resolve labels
* print allocated registers
* fill in todo!() errors in asm parsing
* resolve all todosudo apt-get install vlc in core_lang
* switch to ssh for fuel-asm
* resolve warnings
* fix git url
* rustfmt
* small self-code-review
* resolve module
* map the virtual opcodes to fuel_asm ops
* code review feedback
* factor finalized asm out into its own file
* realize data section and instructions to bits
* data section offset label
* initial bytecode generation
* add forc --asm command
* print out the loading of the data section op
* resolve warnings
* fix register allocater bug
* cleanup
* fix bad error message
* code review feedback
* fix doctest
* fix typo
* reference fuel_core for register constants
* new ssh key
* git change rust version
* wrong rust version
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
* initial parsing work
* parse trait declarations
* import statements
* clean lexer tree; support method calls
* basic ast skeleton beginnings
* begin ast work
* checkpoint while i swap computers
* more ast parsing
* more ast parsing
* ast: function appl, func decl, var exp
* ast: literals
* add compiler binary with nice error messages
* ast: return statements, use statements
* fix error message
* ast: traits
* more friendly parse error messages
* old email
* semicolons!
* byte literals; fix tests
* parse binary and hex literals for byte and bytes32
* refactor expression parsing
* parse array exprs
* parse operator expressions
* type ascriptions
* parser: polymorphism and trait bounds
* default to u64 instead of u32
* begin work on match statements
* parse structs
* refactor
* a few program examples; parse match statements
* lex struct expressions
* parse to AST struct expressions
* compile warnings!
* assert_or_warn macro
* generic struct parameters
* parse contract/script/predicate
* improve top level failure error message
* s/ast/parse_tree
* enums
* begin semantic analysis
* begin work on type checking, inferencing, and semantics checking (#11)
* begin work on type checking, inferencing, and semantics checking
* fmt
* WIP; laptop dying
* match branch types
* wip type code blocks
* build failure
* operator parsing; no precedence
* compile fn
* run compile instead of parse from hllc
* begin trait declarations in ast
* return statements in AST
* allow code blocks
* handle implicit returns in code blocks
* type checking is taking shape
* generic type checking
* return multiple errors
* proper operator precedence
* add fn params to namespace when typechecking
* contextual error messages
* remove todo panics
* toml update
* small error msg tweak
* Refactor error and warning handling (#12)
* begin refactor of error/warnings
* finish refactor
* type check predicates
* limit number of script main functions
* parse generic types for traits
* grammar for reassignments and while loops
* variable reassignments; while loops
* check generic type params in function declarations
* fix tests
* grammar for inline asm
* Asm expressions (#13)
* begin implementing asm expressions
* WIP asm parsing
* fix up spans; unused value warning
* progress on trait impl
* impl traits
* big refactor
* fix asm op parsing error
* parsing for method applications
* struct expressions and declarations: type inference
* WIP subfield exprs
* subfield expressions
* baaasic method invocations
* impl self; better struct declarations
* begin package manager work
* begin work on package manager
* WIP checkpoint
* forc build MVP implemenation
* dependency resolution v1
* Namespace refactor (#22)
* begin namespace refactor
* move all hashmaps to namespace type
* compiles imported dependencies
* method not found error
* resolve some warnings
* fix Self type in trait implementations
* fix all warnings
* fix todo error messages
* introduce differentiation between generic and struct types
* refactor struct expression typing to use declarations
* fix lack of self type in trait implementation
* refactor typed expressions
* fix impl self namespace bug
* fix implicit return typechecking bug
* re-introduce function applications
* type check function return statements
* remove hllc
* fix only last expr having type annotation; if branch enforcement of having an else
* Control flow analysis + more (#28)
* begin documentation of control flow analysis algorithm
* begin graph construction
* begin graph construction
* generate graphs; further control flow work
* some improvements in control flow; still need to wire up imports into the control flow graph
* control flow graph improvements
* fix up implicit return printing in control flow graph
* organize graph code
* find dead code
* unreachable code warnings
* parse unit type as type info
* start enum expressions
* fix enum lookup bug
* type check all enum instantiations
* Resolved types (#29)
* begin swappnig over to resolved types
* progress in refactore
* progress on converting types
* progress in switching to resolved types
* progress in switching to resolved types
* finalize refactor to resolved types
* remove unused type variants
* fix tests
* enum variant construction code analysis
* resolve warnings
* missing enum instantiator error
* trait declarations control flow
* fix trait type mismatch error message
* individual method dead code warnings
* fix method call bug
* respect public visibility modifiers; control flow analysis on libraries
* add public traits
* move ident file
* begin analysis on return paths
* refactor of files
* begin work on analyzing return paths
* basic return path graph construction done
* documentation
* Return path analysis (#30)
* begin analysis on return paths
* refactor of files
* begin work on analyzing return paths
* basic return path graph construction done
* documentation
* fix code block type parsing
* control flow analysis on if and code blocks
* struct fields in graph
* individual struct field warnings
* added ignore vscode local settings
* added forc commands and restructured files
* format code
* ignore node modules
* added syntax highlighting in vscode-forc
* rename to snippets
* change to fume
* added fume-server as a member
* updated .gitignore with ts files
* added vscode client
* update package.json
* added initial fume-server
* add line_col method for errors and warnings
* adding capabilities
* installed ropey
* update to new structure
* perform diagnostic
* added text_document
* remove unused
* cargo fmt
* clean up
* introduce better document state managment
* added hover and completion
* fixed ranges
* added semantic tokens, go to defnition
* remove other go_tos
* clean up
* update merging with master
* added clear names
* move to token references
* rename to get_diagnostics
* fix master conflicts
* make public fields
* use core_lang instead of parser
* adjust to new parse result
* update plugin start instructions
* fix typo
* clear both lines and values hashmaps
* remove unused enum fields
* move settings.json ignore to git/info/exclude
* re-added appache license
* added MANIFEST_FILE_NAME
* formatted toml files
* fromatted launch.json
* add static values for token types
* format
* fix typo
Co-authored-by: Alex <alex@42layers.io>
Co-authored-by: Alex Hansen <alex@alex-hansen.com>
* syntax: use keyword for ast type
* fix up unit tests
* only allow one ast type per file
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
* rename semantics module to semantic_analysis
* move return_statements module to the correct module
* begin work on testing harness
* fix enum type bug
* allow typed returns from asm expressions
* removal of self type from resolved type
* WIP refactor types to use delayed resolution
* forgotten add
* use partial resolution to allow generic and numeric types
* switching computers checkpoint
* don't show missing function errors if there was an error within the function
* fix warnings
* allow implementing traits from outside your project
* almost fixed self bug...
* fix method applications
* canonicalize file path for test harness
* fix formatting
* Update .github/workflows/cargo_test.yml
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* initial parsing work
* parse trait declarations
* import statements
* clean lexer tree; support method calls
* basic ast skeleton beginnings
* begin ast work
* checkpoint while i swap computers
* more ast parsing
* more ast parsing
* ast: function appl, func decl, var exp
* ast: literals
* add compiler binary with nice error messages
* ast: return statements, use statements
* fix error message
* ast: traits
* more friendly parse error messages
* old email
* semicolons!
* byte literals; fix tests
* parse binary and hex literals for byte and bytes32
* refactor expression parsing
* parse array exprs
* parse operator expressions
* type ascriptions
* parser: polymorphism and trait bounds
* default to u64 instead of u32
* begin work on match statements
* parse structs
* refactor
* a few program examples; parse match statements
* lex struct expressions
* parse to AST struct expressions
* compile warnings!
* assert_or_warn macro
* generic struct parameters
* parse contract/script/predicate
* improve top level failure error message
* s/ast/parse_tree
* enums
* begin semantic analysis
* begin work on type checking, inferencing, and semantics checking (#11)
* begin work on type checking, inferencing, and semantics checking
* fmt
* WIP; laptop dying
* match branch types
* wip type code blocks
* build failure
* operator parsing; no precedence
* compile fn
* run compile instead of parse from hllc
* begin trait declarations in ast
* return statements in AST
* allow code blocks
* handle implicit returns in code blocks
* type checking is taking shape
* generic type checking
* return multiple errors
* proper operator precedence
* add fn params to namespace when typechecking
* contextual error messages
* remove todo panics
* toml update
* small error msg tweak
* Refactor error and warning handling (#12)
* begin refactor of error/warnings
* finish refactor
* type check predicates
* limit number of script main functions
* parse generic types for traits
* grammar for reassignments and while loops
* variable reassignments; while loops
* check generic type params in function declarations
* fix tests
* grammar for inline asm
* Asm expressions (#13)
* begin implementing asm expressions
* WIP asm parsing
* fix up spans; unused value warning
* progress on trait impl
* impl traits
* big refactor
* fix asm op parsing error
* parsing for method applications
* struct expressions and declarations: type inference
* WIP subfield exprs
* subfield expressions
* baaasic method invocations
* impl self; better struct declarations
* begin package manager work
* begin work on package manager
* WIP checkpoint
* forc build MVP implemenation
* dependency resolution v1
* Namespace refactor (#22)
* begin namespace refactor
* move all hashmaps to namespace type
* compiles imported dependencies
* method not found error
* resolve some warnings
* fix Self type in trait implementations
* fix all warnings
* fix todo error messages
* introduce differentiation between generic and struct types
* refactor struct expression typing to use declarations
* fix lack of self type in trait implementation
* refactor typed expressions
* fix impl self namespace bug
* fix implicit return typechecking bug
* re-introduce function applications
* type check function return statements
* remove hllc
* fix only last expr having type annotation; if branch enforcement of having an else
* Control flow analysis + more (#28)
* begin documentation of control flow analysis algorithm
* begin graph construction
* begin graph construction
* generate graphs; further control flow work
* some improvements in control flow; still need to wire up imports into the control flow graph
* control flow graph improvements
* fix up implicit return printing in control flow graph
* organize graph code
* find dead code
* unreachable code warnings
* parse unit type as type info
* start enum expressions
* fix enum lookup bug
* type check all enum instantiations
* Resolved types (#29)
* begin swappnig over to resolved types
* progress in refactore
* progress on converting types
* progress in switching to resolved types
* progress in switching to resolved types
* finalize refactor to resolved types
* remove unused type variants
* fix tests
* enum variant construction code analysis
* resolve warnings
* missing enum instantiator error
* trait declarations control flow
* fix trait type mismatch error message
* individual method dead code warnings
* fix method call bug
* respect public visibility modifiers; control flow analysis on libraries
* add public traits
* move ident file
* begin analysis on return paths
* refactor of files
* begin work on analyzing return paths
* basic return path graph construction done
* documentation
* Return path analysis (#30)
* begin analysis on return paths
* refactor of files
* begin work on analyzing return paths
* basic return path graph construction done
* documentation
* fix code block type parsing
* control flow analysis on if and code blocks
* struct fields in graph
* individual struct field warnings
* add line_col method for errors and warnings
* Generate Assembly (#31)
* begin generating assembly
* add unique registers counter to asm expressions
* sketch out asm generation with todo! macros everywhere
* begin while loop assembly
* rework compile fn for asm
* have to commit to save my progress as i boot into windows for fortnite
* make progress in expression generation
* WIP: return statements
* asm expressions and asm refactor
* very basic bytecode compilation
* first asm!
* ASM: While loops and reassignments
* remove subsequent jumps
* reuse data section values for duplicate literals
* struct expressions
* fix SW order
* stashing checkpoint
* forgotten add
* asm for enum instantiations
* if expression assembly generation
* code block asm generation
* remove TODO in code analysis
* remove some panics
* remove a bunch of todo panics
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
* move license; clean warnings
* Update forc/src/cli/build.rs
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* Update forc/src/cli/build.rs
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* code review feedback
* Update forc/src/manifest.rs
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* Update parser/src/control_flow_analysis/analyze_return_paths.rs
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* more PR feedback
* rename parser to core_lang
* add minimum supported version
* Update README.md
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>
* check that struct size in words fits in a u32 gracefully
* forgotten import
Co-authored-by: Alexander Hansen <alexanderhansen@Alexanders-MacBook-Pro.local>
Co-authored-by: John Adler <adlerjohn@users.noreply.github.com>