compiler: move it up from vm

It really deserves it, I think. Especially given that it doesn't have any
direct usage of `vm` package now.
This commit is contained in:
Roman Khimov 2019-12-03 18:18:14 +03:00
parent 31add423a8
commit 852e6a335b
12 changed files with 7 additions and 12 deletions

3
.gitignore vendored
View file

@ -28,9 +28,6 @@ bin/
*~ *~
TAGS TAGS
# anthdm todolists
/pkg/vm/compiler/todo.md
# leveldb # leveldb
chains/ chains/
chain/ chain/

View file

@ -11,13 +11,13 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/CityOfZion/neo-go/pkg/compiler"
"github.com/CityOfZion/neo-go/pkg/crypto/hash" "github.com/CityOfZion/neo-go/pkg/crypto/hash"
"github.com/CityOfZion/neo-go/pkg/crypto/keys" "github.com/CityOfZion/neo-go/pkg/crypto/keys"
"github.com/CityOfZion/neo-go/pkg/rpc" "github.com/CityOfZion/neo-go/pkg/rpc"
"github.com/CityOfZion/neo-go/pkg/smartcontract" "github.com/CityOfZion/neo-go/pkg/smartcontract"
"github.com/CityOfZion/neo-go/pkg/util" "github.com/CityOfZion/neo-go/pkg/util"
"github.com/CityOfZion/neo-go/pkg/vm" "github.com/CityOfZion/neo-go/pkg/vm"
"github.com/CityOfZion/neo-go/pkg/vm/compiler"
"github.com/go-yaml/yaml" "github.com/go-yaml/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/urfave/cli" "github.com/urfave/cli"

View file

@ -166,7 +166,7 @@ INDEX OPCODE DESC
``` ```
In depth documentation about the **neo-go** compiler and smart contract examples can be found inside In depth documentation about the **neo-go** compiler and smart contract examples can be found inside
the [compiler package](https://github.com/nspcc-dev/neo-go/tree/master/pkg/vm/compiler). the [compiler package](https://github.com/nspcc-dev/neo-go/tree/master/pkg/compiler).
## VM run ## VM run
To run VM use To run VM use
@ -182,8 +182,6 @@ There is a small subset of commands:
- `ops` -- show the opcodes of currently loaded contract - `ops` -- show the opcodes of currently loaded contract
- `run` -- executes currently loaded contract - `run` -- executes currently loaded contract
More details can be found in
[vm package]([compiler package](https://github.com/nspcc-dev/neo-go/tree/master/pkg/vm/compiler))
## Wallet operations ## Wallet operations
- `./bin/neo-go wallet create -p newWallet` to create new wallet in the path `newWallet` - `./bin/neo-go wallet create -p newWallet` to create new wallet in the path `newWallet`

View file

@ -6,10 +6,10 @@ import (
"path" "path"
"testing" "testing"
"github.com/CityOfZion/neo-go/pkg/vm/compiler" "github.com/CityOfZion/neo-go/pkg/compiler"
) )
const examplePath = "../../../examples" const examplePath = "../../examples"
func TestExamplesFolder(t *testing.T) { func TestExamplesFolder(t *testing.T) {
infos, err := ioutil.ReadDir(examplePath) infos, err := ioutil.ReadDir(examplePath)

View file

@ -10,8 +10,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/CityOfZion/neo-go/pkg/compiler"
"github.com/CityOfZion/neo-go/pkg/vm" "github.com/CityOfZion/neo-go/pkg/vm"
"github.com/CityOfZion/neo-go/pkg/vm/compiler"
"gopkg.in/abiosoft/ishell.v2" "gopkg.in/abiosoft/ishell.v2"
) )

View file

@ -5,8 +5,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/CityOfZion/neo-go/pkg/compiler"
"github.com/CityOfZion/neo-go/pkg/vm" "github.com/CityOfZion/neo-go/pkg/vm"
"github.com/CityOfZion/neo-go/pkg/vm/compiler"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )