871 Commits

Author SHA1 Message Date
Gaith Hallak
90666d3f33 Remove column from DBG_LOC 2023-06-09 13:24:07 +03:00
Gaith Hallak
81da836b66 Rename DBGLOC to DBG_LOC 2023-06-09 13:24:07 +03:00
Gaith Hallak
c1bf063093 Fix dbg_undef for args 2023-06-09 13:24:07 +03:00
Gaith Hallak
6b7bc06c38 Do not use DBG_DEF and DBG_UNDEF on args 2023-06-09 13:24:07 +03:00
Gaith Hallak
04aed6670a Do not DBG_DEF vars with % prefix 2023-06-09 13:24:07 +03:00
Gaith Hallak
9619bb6071 Add DBG_DEF and DBG_UNDEF 2023-06-09 13:24:07 +03:00
Gaith Hallak
7898ab3946 Upgrade aebytecode ref in rebar.config 2023-06-09 13:24:07 +03:00
Gaith Hallak
3ed7e36d29 Wrap args of DBGLOC in immediate tuple 2023-06-09 13:24:07 +03:00
Gaith Hallak
34d363f166 Return an empty string instead of no_file atom 2023-06-09 13:24:07 +03:00
Gaith Hallak
141eea74fd Include DBGLOC instructions in the compiler output 2023-06-09 13:24:07 +03:00
Gaith Hallak
793a6829f6 Save debug locations for child contracts 2023-06-09 13:23:36 +03:00
Gaith Hallak
801231d628 Fill out empty fann() when possible 2023-06-09 13:23:36 +03:00
Gaith Hallak
a752fa5b48 Remove fann() from fsplit_pat() and fpat() 2023-06-09 13:23:36 +03:00
Gaith Hallak
9ddd29d63a Fix dialyzer warning 2023-06-09 13:23:36 +03:00
Gaith Hallak
f6beec0a7c Add file to aeso_syntax:ann() 2023-06-09 13:23:36 +03:00
Gaith Hallak
eb16d2f77b Add file to fann() 2023-06-09 13:23:36 +03:00
Gaith Hallak
db3f63529d Change attributes for DBGLOC instruction 2023-06-09 13:23:36 +03:00
Gaith Hallak
354e49c5d3 Add line to fann() 2023-06-09 13:23:36 +03:00
Gaith Hallak
5ef52c0dc3 Rname Ann to FAnn when the type is fann() 2023-06-09 13:23:36 +03:00
Gaith Hallak
683747bc38 Fix calldata tests 2023-06-09 13:23:36 +03:00
Gaith Hallak
694646fa3d Fix compiler tests 2023-06-09 13:18:42 +03:00
Gaith Hallak
363a550402 Add instructions lines to the debugging result 2023-06-09 13:18:42 +03:00
Gaith Hallak
f0d6031fd5 Add dbgloc instruction to fate 2023-06-09 13:17:04 +03:00
Gaith Hallak
116fefc244 Fix missing fann() in tuple fexpr() 2023-06-09 13:17:04 +03:00
Gaith Hallak
835b186499 Add fann() to nil 2023-06-09 13:17:04 +03:00
Gaith Hallak
7648732879 Add fann() to tuple 2023-06-09 13:17:04 +03:00
Gaith Hallak
0611bcae9d Add fann() to con 2023-06-09 13:17:04 +03:00
Gaith Hallak
9f082b1af2 Add fann() to builtin 2023-06-09 13:17:04 +03:00
Gaith Hallak
7abf93e0e0 Add fann() to lit and get_state 2023-06-09 13:17:04 +03:00
Gaith Hallak
d11f3107a4 Add fann() to switch 2023-06-09 13:17:04 +03:00
Gaith Hallak
08174e5dbf Add fann() to var 2023-06-09 13:17:04 +03:00
Gaith Hallak
431e983940 Fix the spec for compute_state_layout 2023-06-09 13:17:04 +03:00
Gaith Hallak
5046c08b9f Dead code removal 2023-06-09 13:17:04 +03:00
Gaith Hallak
81fc1de479 Add missing functions specs 2023-06-09 13:17:04 +03:00
Gaith Hallak
2d4e1d7026 Add fann() to builtin_u 2023-06-09 13:17:04 +03:00
Gaith Hallak
3f129b3b04 Add fann() to lam 2023-06-09 13:17:04 +03:00
Gaith Hallak
48136ef719 Add fann() to let 2023-06-09 13:17:04 +03:00
Gaith Hallak
a027ac4f6a Add fann() to op 2023-06-09 13:17:04 +03:00
Gaith Hallak
44ec5db132 Add fann() to def and def_u 2023-06-09 13:17:04 +03:00
Gaith Hallak
74f0b3a2db Add fann() to set_proj 2023-06-09 13:17:04 +03:00
Gaith Hallak
404bb33863 Add fann() to proj 2023-06-09 13:17:04 +03:00
Gaith Hallak
b35441c40e Add fann() to remote 2023-06-09 13:17:04 +03:00
Gaith Hallak
dd57fd9abe Add fann() to remote_u 2023-06-09 13:17:04 +03:00
Gaith Hallak
1043473696 Add fann() to set_state 2023-06-09 13:17:04 +03:00
Gaith Hallak
dc5a119bc6 Add fann() to closure 2023-06-09 13:17:04 +03:00
Gaith Hallak
2118d82745 Add fann() to funcall 2023-06-09 13:17:04 +03:00
Gaith Hallak
a4d1479cc5 Add fann type and to_fann fun 2023-06-09 13:17:04 +03:00
Hans Svensson
7bac15949c
Introduce encode/decode_value to compiler (#457) 2023-06-01 13:23:21 +02:00
Gaith Hallak
7b6eba5319
Introduce contract-level compile-time constants (#432)
* Allow compile-time constants as toplevel declarations

* Remove the test that fails on toplevel consts

* Warn when shadowing a constant

* Allow records to be used as compile time constants

* Allow data constructors in compile-time constants

* Disable some warnings for toplevel constants

Since variables and functions cannot be used in the definition of
a compile time constants, the following warnings are not going to be
reported:

* Used/Unused variable
* Used/Unused function

* Do not reverse constants declarations

* Add tests for all valid expressions

* Add test for accessing const from namespace

* Revert "Do not reverse constants declarations"

This reverts commit c4647fadacd134866e4be9c2ab4b0d54870a35fd.

* Add test for assigining constant to a constant

* Show empty map or record error when assigning to const

* Report all invalid constant expressions before fail

* Allow accessing records fields in toplevel consts

* Undo a mistake

* Add test for warning on const shadowing

* Show error message when using pattern matching for consts

* Remove unused error

* Ban toplevel constants in contract interfaces

* Varibles rename

* Change the error message for invalid_const_id

* Make constants public in namespaces and private in contracts

* Add a warning about unused constants in contracts

* Use ban_when_const for function applications

* Test for qualified access of constants in functions

* Add failing tests

* Add test for the unused const warning

* Update CHANGELOG

* Update all_syntax test file

* Treat expr and type inside bound as bound

* Allow typed ids to be used for constants

* List valid exprs in the error message for invalid exprs

* Fix tests

* Update the docs about constants

* Update syntax docs

* Check validity of const exprs in a separate functions

* Call both resolve_const and resolve_fun from resolve_var
2023-04-12 14:20:41 +03:00
Gaith Hallak
99bb3fe1fb
Mark only included files as potentially unused (#442)
* Mark only included files as potentially unused

* Update CHANGELOG

* Add test
2023-03-21 13:55:18 +03:00