Commit graph

61 commits

Author SHA1 Message Date
Anna Shaleva
2f6065f541 compiler, cli: introduce *.manifest.json
Add ability to generate NEO3-compatable *.manifest.json into compiler.
This file represets contract manifest and includes ABI information, so
we don't need to create separate *.abi.json file. NEO3 debugger also
needs *.manifest.json only. So, switched from *.abi.json to
*.manifest.json file.
2020-06-29 09:15:29 +03:00
Anna Shaleva
6cc3d9bcc3 compiler: remove entrypoint from debug info
part of #1088
2020-06-24 16:50:56 +03:00
Anna Shaleva
4d07d72677 compiler: add Hash to debug info
part of #1088
2020-06-24 16:50:34 +03:00
Evgenii Stratonikov
76a2f62fbd cli: use manifest during contract deployment 2020-06-11 10:45:25 +03:00
Evgenii Stratonikov
70d0ff869d compiler: refactor typeinfo functions 2020-05-19 16:40:26 +03:00
Evgenii Stratonikov
0cb6dc47e4 vm: implement slot-related opcodes
1. Slot is a new mechanism for storing variables during execution
which is more convenient than alt.stack. This commit implements
support for slot opcodes in both vm and compiler.
2. Remove old alt.stack opcodes.
3. Do not process globals at the start of every function, but instead
load them single time at main.
2020-05-12 16:23:08 +03:00
Anna Shaleva
2ec1d76320 compiler: add ability to generate .abi.json file
A part of integration with NEO Blockchain Toolkit (see #902). To be
able to deploy smart-contract compiled with neo-go compiler via NEO
Express, we have to generate additional .abi.json file. This file
contains the following information:
 - hash of the compiled contract
 - smart-contract metadata (title, description, version, author,
email, has-storage, has-dynamic-invoke, is-payable)
 - smart-contract entry point
 - functions
 - events

However, this .abi.json file is slightly different from the one,
described in manifest.go, so we have to add auxilaury stractures for
json marshalling. The .abi.json format used by NEO-Express is described
[here](https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.Compiler.MSIL/FuncExport.cs#L66).
2020-05-04 08:37:39 +03:00
Anna Shaleva
ab7f2cb4fb compiler: fix bug with missing methods parameters
Method `methodInfoFromScope(...)` always returned an empty parameters
set, so we were missing this information in both .abi.json and
.debug.json files. Fixed now.
2020-05-04 08:37:39 +03:00
Evgenii Stratonikov
457e7e006a compiler: support exporting method variables in debug info 2020-04-06 15:30:07 +03:00
Evgenii Stratonikov
5d3da26e1e compiler: support sequence points in debug info
Sequence points is a way to map a specific instruction offset
from a compiled contract to a text span in a source file.

This commit implements mapping only for `return` statements.
Further improvements are straight-forward.
2020-04-06 15:30:07 +03:00
Evgenii Stratonikov
00c40b58aa compiler: record basic debug info
Save info about method's byte-code sections.
2020-04-06 15:30:06 +03:00