interp: improve error reporting

This commit improves error reporting in several ways:

  * Location information is read from the intruction that causes the
    error, as far as that's available.
  * The package that is being interpreted is included in the error
    message. This may be the most useful part of the improvements.
  * The hashmap update intrinsics now doesn't panic, instead it logs a
    clear error (with location information, as in the above two bullet
    points).

This is possible thanks to improvements in LLVM 9. This means that after
this change, TinyGo will depend on LLVM 9.
This commit is contained in:
Ayke van Laethem
2019-11-24 22:28:07 +01:00
committed by Ron Evans
parent 86f48da594
commit e74db01f82
6 changed files with 147 additions and 47 deletions
+1 -1
View File
@@ -10,5 +10,5 @@ require (
go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect
golang.org/x/tools v0.0.0-20190227180812-8dcc6e70cdef
tinygo.org/x/go-llvm v0.0.0-20191113125529-bad6d01809e8
tinygo.org/x/go-llvm v0.0.0-20191124211856-b2db3df3f257
)