mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-24 12:11:50 +00:00
Move 'abort' out of builtins and make it overridable
Now defaults to 'env.abort' as imported in lib/env.ts, but can be overridden through '--use abort=someThingElseOrNothingAtAll'
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(import "env" "externalConstant" (global $declare/externalConstant i32))
|
||||
(import "env" "externalFunction" (func $declare/externalFunction))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||
(import "my" "externalFunction" (func $declare/my.externalFunction))
|
||||
(import "my" "externalConstant" (global $declare/my.externalConstant i32))
|
||||
(memory $0 1)
|
||||
@ -18,7 +18,7 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 5)
|
||||
@ -34,7 +34,7 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 13)
|
||||
|
Reference in New Issue
Block a user