tommie
35b5e2fb53
fix: memory.grow by a negative number is an error ( #498 )
...
This is to comply with e.g. wasmtime. The spec does not make it
explicit what growing by a negative number should mean. It's likely a
mistake, so let's fail.
Closes #442 .
2024-08-07 12:28:25 +03:00
garrison hinson-hasty
139076a98b
bugfix: use gcc/clang compatible overflow builtins for integer arithmetic ( #450 )
2024-01-30 23:17:28 +02:00
YenFuChen
0e7b874529
Fix function signature ( #412 )
2023-12-18 02:48:37 +02:00
I-mikan-I
bd152c79aa
Fix operations preventing tail-call-elimination: ( #402 )
...
If the compiler cannot analyze memcpy, it must expect that pointer arguments may be stored as static data and must live for recursive calls.
In such cases, op_Store and op_Load operations will not get tail-call optimized.
By enclosing the local variables in a block before the recursive call, the storage duration does not extend far enough, allowing for TCO.
2022-11-12 10:00:06 +00:00
Volodymyr Shymanskyy
03a4652520
Use musttail attribute for Clang 13+
2022-08-31 20:15:33 +03:00
Vova
d4b94f1d98
Cleanup
2021-11-01 14:53:35 +02:00
Max Graey
7539581eb5
Use M3_ prefix for likely/unlikely. Add likely in MemCopy/MemFill functions ( #242 )
...
* use prefix for likely/unlikely. Add likely for MemCopy/MemFill
* more
2021-06-03 14:39:18 +03:00
Volodymyr Shymanskyy
af979c81fb
Fix build
2021-06-02 10:30:56 +03:00
Volodymyr Shymanskyy
54e1422767
Align main and extensions branches
2021-06-02 09:34:50 +03:00
Vova
a6bb66229f
Cleanup
2021-05-11 02:59:15 +03:00
Steven Massey
5b35a9f261
actual working mem.copy & mem.fill
2021-04-24 16:15:18 -07:00
Steven Massey
6a18412608
added memory.fill and memory.copy operations
2021-04-24 13:38:38 -07:00
Steven Massey
eeb8f87178
no message
2021-04-22 22:00:30 -07:00
Steven Massey
7608ca25e6
Merge branch 'main' into multi-value
2021-04-21 13:44:30 -07:00
Steven Massey
4ff8d4d2fc
no message
2021-04-18 16:22:10 -07:00
Volodymyr Shymanskyy
0c13c3e550
Improve backtraces
2021-04-17 23:15:34 +03:00
Steven Massey
5fca4bace0
spaces
2021-04-15 14:19:43 -07:00
Steven Massey
e1441d53fd
noco
2021-04-14 21:50:20 -07:00
Steven Massey
baf3c66fa2
no message
2021-04-14 20:31:42 -07:00
Steven Massey
207e8e7d3d
no message
2021-04-14 18:50:44 -07:00
Volodymyr Shymanskyy
79255ba1db
Restict opcodes during expression evaluation
2021-04-12 16:24:34 +03:00
Steven Massey
cfbfbbff15
patch for #218
2021-04-09 13:55:22 -07:00
Steven Massey
570854b883
prep for multi-return.
2021-04-08 17:24:08 -07:00
Steven Massey
1d412aafd2
multi-return prep
2021-04-08 16:38:54 -07:00
Steven Massey
291881dc34
no message
2021-04-08 11:52:28 -07:00
Volodymyr Shymanskyy
870dd2e767
Fix some memory management issues
2021-03-30 22:58:42 +03:00
Brenden Schumacher
dd5df82e91
Fixed typos in relation to issue #211 ( #212 )
2021-03-15 10:15:28 +02:00
Volodymyr Shymanskyy
f8ba641a71
Structured tracing ️support 🎉
2021-03-12 01:25:48 +02:00
Volodymyr Shymanskyy
8291bdb162
Remove d_m3LogStackTrace in favour of d_m3RecordBacktraces
2021-03-11 19:18:59 +02:00
Volodymyr Shymanskyy
21b3fee33d
Simplify backtrace API
2021-03-11 17:07:11 +02:00
Volodymyr Shymanskyy
0b69623b32
Fix build
2021-03-11 08:35:56 +02:00
Tyler Zhang and Volodymyr Shymanskyy
d62d408b4f
Backtraces in Wasm3 ( #195 )
...
* Add API to report backtraces when traps are encountered during
execution
* Add backtrace formatting
* Fix memory issue with not resetting code mapping page when code page is released
* Halve memory usage for code mapping pages
* Move backtrace functionality to behind a compile-time flag
* Reduce backtrace size in main
* Fix segfault in constant initialization
Co-authored-by: Volodymyr Shymanskyy <vshymanskyi@gmail.com >
2021-03-11 07:57:41 +02:00
Volodymyr Shymanskyy
ccab6a438b
Enable recursive calls: calling exported function from an imported.
2021-02-25 22:33:19 +02:00
Volodymyr Shymanskyy
7fd66ec097
Add Raw Function type introspection via M3ImportContext.
2021-02-24 13:00:50 +02:00
Volodymyr Shymanskyy
164b1e3465
Fix Arduino build
2021-02-22 01:36:36 +02:00
Anthony Drendel
b3088901e1
Support exported functions with the same name ( #199 )
...
* Support exported functions with the same name
* Fix error for shadowing local variable
* Replace function->name with GetFunctionName()
* Replace another direct i-var access of func->name
2021-02-21 00:09:14 +02:00
Volodymyr Shymanskyy
d71a204e55
Basic stack access API. Closes #41
2021-02-09 08:15:28 +02:00
Volodymyr Shymanskyy
aec7a82fc6
Cleanup
2021-01-23 19:39:17 +02:00
Volodymyr Shymanskyy
1b9eddf706
Cleanup
2020-12-26 20:57:10 +02:00
Volodymyr Shymanskyy
640bf0cc26
Cleanup
2020-05-02 02:07:31 +03:00
Volodymyr Shymanskyy
bdc5082755
d_m3HasFloat - allow disabling float ops
2020-05-01 21:22:51 +03:00
Volodymyr Shymanskyy
c1701dd056
Initial Big-Endian system support ( #125 )
2020-04-13 08:47:02 +03:00
Volodymyr Shymanskyy
fbd555c62c
Cleanup
2020-04-12 23:12:04 +03:00
Volodymyr Shymanskyy
a207a3328f
Cleanup
2020-04-12 19:59:12 +03:00
Volodymyr Shymanskyy
8bab58b7dd
More unlikely cases
2020-03-10 02:11:59 +02:00
Volodymyr Shymanskyy
aea4709987
Allow multi-byte opcodes. Implement saturated conversions.
...
Resolves #21
2020-03-10 01:04:32 +02:00
Volodymyr Shymanskyy
020c569745
Fix indents
2020-03-09 15:42:19 +02:00
Steven Massey
3c416b88cb
hmmm
2020-02-24 19:57:07 -08:00
Steven Massey
5711c2ab4b
added 32-bit slot differentiated GetGlobal & Const operations (for issue #5 )
2020-02-22 15:22:40 -08:00
Arnaud Tournier
b280147ec9
allow for dynamic callbacks ( #86 )
2020-02-16 00:38:50 +02:00