Commit graph

13 commits

Author SHA1 Message Date
Anna Shaleva
2200f7ff71 compiler: lowercase the first letter of methods in manifest
In order to be compatable with NEP5 standards and C# node we have to
keep the first letter of each manifest method lowercased.
2020-07-07 13:44:47 +03:00
Anna Shaleva
7d8a3a7065 compiler: exclude unexported methods from manifest
We should be able to invoke exported methods only.
2020-07-07 13:23:01 +03:00
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
c7746da023 cli, compiler: switch from .avm to .nef
We don't generate clear .avm instructions anymore. Instead, use .nef
files with additional metadata.
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
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
24fef35ead compiler: split Compile info sub-functions
Also add tests for basic debug info.
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