mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 12:33:42 +00:00
interp: fix "todo: store" panic
This is really just a simple workaround. When such an instruction is encountered, it will just fall back to marking the entire function as having side effects. Ideally it should trace all affected instructions and check if they would have any side effects, but this at least fixes a number of compile errors. This commit gets the following packages to compile: * context * database/sql/driver * image/jpeg * image/png
This commit is contained in:
committed by
Ron Evans
parent
feb2b4715b
commit
e977276044
Vendored
+6
@@ -47,6 +47,12 @@ define i64 @readDirtyGlobal() {
|
||||
|
||||
declare i64* @getDirtyPointer()
|
||||
|
||||
define void @storeToPointer() {
|
||||
%ptr = call i64* @getDirtyPointer()
|
||||
store i64 3, i64* %ptr
|
||||
ret void
|
||||
}
|
||||
|
||||
@functionPointer = global i64()* null
|
||||
define i64 @callFunctionPointer() {
|
||||
%fp = load i64()*, i64()** @functionPointer
|
||||
|
||||
Reference in New Issue
Block a user