Alexander Theißen
5e3b06de05
Fix Instruction::CallIndirect stack height metering
...
The stack height metering for functions containing
CallIndirect was wrong. The code did not take into
consideration that is pops one value from the stack.
The effect was that the stack height of functions
using this instruction was higher than its real height.
2020-10-13 11:43:59 +02:00
Alexander Theißen
409ced002a
Allow specifying the module of the imported 'gas' function ( #140 )
...
* No need for mem::replace when doing a simple assignment
* Allow specifying the module of the imported 'gas' function
This allows users to place the imported function inside a custom
module instead of the generic 'env' module.
2020-08-04 13:53:53 +03:00
Nikolay Volf
e026abe166
Export internal globals instrumentation ( #138 )
...
* export internal globals
* add test
* Update src/export_globals.rs
Co-authored-by: Sergei Shulepov <sergei@parity.io >
* address review
Co-authored-by: Sergei Shulepov <sergei@parity.io >
2020-08-03 14:58:24 +03:00
Nikolay Volf
dcf189b822
Merge pull request #135 from osolmaz/correct-spelling
...
Corrected spelling error
2020-07-29 16:05:53 +03:00
Onur Solmaz
1e8953a9cb
Corrected InstructionType's for GetGlobal and SetGlobal
2020-07-27 13:56:53 +02:00
Onur Solmaz
377684f9c7
Corrected spelling error
2020-07-23 20:08:03 +02:00
Andrew Dirksen
a881cf12bb
Bump 'parity-wasm' version to enable no_std builds on stable.
...
Bump own version in preparation for cargo publish.
Bump cli verion to match.
2019-10-31 15:52:09 -07:00
Thomas Scholtes
b4f9be733d
Preserve "deploy" when optimizing pwasm ctor module
...
When optimizing the constructor module for a PWasm contract the "deploy" symbol is preserved instead of the "call"
symbol. Before this change `build` would error for PWasm contracts because `pack_instance` would not find the "deploy"
symbol in the optimized contract.
Fixes #128
2019-08-29 16:27:48 +02:00
Sergey Pepyakin
a774a2cb29
Update parity-wasm to 0.39
2019-07-30 16:44:05 +02:00
Jim Posen
5792da28d5
Fix typo
...
Co-Authored-By: Sergei Pepyakin <s.pepyakin@gmail.com >
2019-07-25 12:37:57 +02:00
Jim Posen
f8673d5b87
Fix dev dependency crate imports.
2019-07-25 11:05:25 +02:00
Jim Posen
5180d694ce
Validate the gas metering algorithm using fuzzer.
2019-07-19 11:25:54 +02:00
NikVolf
026b0502bb
fix warnings
2019-07-17 17:01:15 +03:00
Jim Posen
82bd972333
!fixup lowest_forward_br rename and field docs.
2019-07-12 10:45:01 +02:00
Jim Posen
93abbcfe56
Add gas injection unit test for correct else behavior.
2019-07-12 10:30:11 +02:00
Jim Posen
ed7f31ec20
Use macro + WAT to make gas injection unit tests more readable.
2019-07-12 10:15:37 +02:00
Jim Posen
b5472bcd8f
!fixup Address review comments.
2019-07-11 16:45:46 +02:00
Jim Posen
0cf7daa9e5
Update high level inject_gas_counter function documentation.
2019-07-04 17:57:40 +02:00
Jim Posen
24924f59ec
Change gas metering injection code to handle branches properly.
2019-07-04 17:57:40 +02:00
Jim Posen
de60f491b4
Fix ordering of actual and expected arguments in assert_eq!.
2019-07-04 17:57:40 +02:00
Jim Posen
4c0f42c6fc
Perform gas metering injection step in linear time.
...
Previously the code was quadratic in the worst case as inserting into
the middle of a vector is a linear-time operation.
2019-07-04 17:57:40 +02:00
Jim Posen
89e13ee901
Cleanup stack height Context.
...
Removes unnecessary Options and fixes typos.
2019-06-26 12:48:51 +02:00
Jim Posen
929e0ec2c0
Documentation of gas metering instrumentation process.
2019-06-26 12:47:30 +02:00
NikVolf
0d40703c6e
fix identation
2019-04-09 19:02:07 +03:00
NikVolf
38e0f254b0
use indoc!
2019-01-27 12:15:38 +03:00
NikVolf
5b2cd9c4c6
add example
2019-01-24 16:21:52 +03:00
NikVolf
ad83ad17ee
avoid panic when generating format
2019-01-24 16:10:39 +03:00
NikVolf
91036c0aff
avoid panics when creating representation
2019-01-24 16:04:00 +03:00
NikVolf
728c935367
alter some tests to show correspondence
2019-01-24 15:36:09 +03:00
NikVolf
33785674dc
simplify code
2019-01-24 15:32:14 +03:00
NikVolf
3e635514e4
some reformatting
2019-01-24 15:26:17 +03:00
NikVolf
d8428327d5
simpler imports
2019-01-24 15:18:16 +03:00
NikVolf
d695703146
more complicated opt and delete tests
2019-01-24 15:07:57 +03:00
NikVolf
cda99e70da
add much more complicated assertion
2019-01-24 14:42:53 +03:00
NikVolf
0a78a1ab8d
complicate test
2019-01-24 14:35:05 +03:00
NikVolf
33c84edd78
Merge remote-tracking branch 'origin/master' into graph
...
# Conflicts:
# src/lib.rs
2019-01-24 12:38:35 +03:00
NikVolf
8413e562cd
more insert api and graph module logic upon
2019-01-24 12:37:03 +03:00
NikVolf
1bc4973e6e
insert api in ref_list
2019-01-24 12:05:20 +03:00
NikVolf
56464c102f
return_ -> ret
2019-01-24 11:20:31 +03:00
holygits
ec206fca64
Preserve deploy symbol on optimize for substrate target
2019-01-24 15:46:01 +13:00
holygits
4f81bbc506
Don't pack Substrate ctor module
2019-01-24 10:18:18 +13:00
NikVolf
f5890c2c7b
more complex test
2019-01-23 15:01:08 +03:00
NikVolf
7504381419
fix linking for elements
2019-01-23 14:44:32 +03:00
NikVolf
bb9832dba1
more docs and warnings
2019-01-23 13:57:26 +03:00
NikVolf
62ea903c3a
add some docs
2019-01-23 13:47:44 +03:00
holygits
c47adc1bd4
Refactor TargetRuntime as enum
...
Don't rename create symbol for substrate binaries
2019-01-23 17:03:53 +13:00
NikVolf
c3833efca7
fix for nightly
2019-01-22 20:39:51 +03:00
NikVolf
4e871c65e2
generate instructions on module generation
2019-01-22 20:37:36 +03:00
NikVolf
48c1c6e72a
code mapping
2019-01-22 20:30:50 +03:00
NikVolf
d60340762b
public api exposure and fix warnings
2019-01-22 18:28:15 +03:00