GithubHelp home page GithubHelp logo

monkey's Introduction

@masaxsuzu

I ❤️ C#.

monkey's People

Contributors

masaxsuzu avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

monkey's Issues

Panic when running "return 1;" on virtual machine

VM実行において、Function文以外でreturn命令を実行するとPanicが発生する。

~/go/src/github.com/masa-suzu/monkey
$ go run main.go -vm
Hello! This is the Monkey programming language!
>> return 1;
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/masa-suzu/monkey/vm.(*VirtualMachine).push(0xc0001be080, 0x515f00, 0xc00005e120, 0x0, 0x0)
        C:/Users/szk11/go/src/github.com/masa-suzu/monkey/vm/vm.go:260 +0xdf
github.com/masa-suzu/monkey/vm.(*VirtualMachine).Run(0xc0001be080, 0xc0000a4000, 0x10000)
        C:/Users/szk11/go/src/github.com/masa-suzu/monkey/vm/vm.go:188 +0xbde
github.com/masa-suzu/monkey/repl.Rep_VM(0xc00005e104, 0x9, 0x515600, 0xc000086008, 0xc00005e100, 0x5da6b8, 0x0, 0x0, 0xc0000a4000, 0x10000, ...)
        C:/Users/szk11/go/src/github.com/masa-suzu/monkey/repl/repl.go:87 +0x22e
github.com/masa-suzu/monkey/repl.Start(0x5155e0, 0xc000086000, 0x515600, 0xc000086008, 0x4fad30, 0x3, 0x1)
        C:/Users/szk11/go/src/github.com/masa-suzu/monkey/repl/repl.go:33 +0x458
main.main()
        C:/Users/szk11/go/src/github.com/masa-suzu/monkey/main.go:21 +0xbc
exit status 2

インタプリタ実行では発生しない。

~/go/src/github.com/masa-suzu/monkey
$ go run main.go
Hello! This is the Monkey programming language!
>> return 1;
1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.