Commit 0edfe5b10a3a58691d782ae18e443689a66cf95d
sget => sload
wanderer committed on 7/15/2016, 1:24:47 AMParent: f8c9ead18a27b0962868bf70b4fa256cb3fb1606
Files changed
interface.js | changed |
tests/sstore.wast | changed |
interface.js | ||
---|---|---|
@@ -332,9 +332,9 @@ | ||
332 | 332 | * reterives a value at a given path in long term storage |
333 | 333 | * @param {interger} pathOffest the memory offset to load the the path from |
334 | 334 | * @param {interger} resultOffset the memory offset to load the value from |
335 | 335 | */ |
336 | - sget (pathOffest, resultOffset) { | |
336 | + sload (pathOffest, resultOffset) { | |
337 | 337 | const path = new Uint8Array(MOD.exports.memory, pathOffest, pathOffest + 32) |
338 | 338 | const result = ENV.state.getValue(path) |
339 | 339 | const memory = new Uint8Array(MOD.exports.memory, resultOffset, resultOffset + 32) |
340 | 340 | memory.set(result) |
tests/sstore.wast | ||
---|---|---|
@@ -1,9 +1,9 @@ | ||
1 | 1 | ;; starts with an caller of 5d48c1018904a172886829bbbd9c6f4a2d06c47b |
2 | 2 | (module |
3 | 3 | (memory 1) |
4 | 4 | (import $sstore "ethereum" "sstore" (param i32 i32)) |
5 | - (import $sget "ethereum" "sget" (param i32 i32)) | |
5 | + (import $sload "ethereum" "sload" (param i32 i32)) | |
6 | 6 | |
7 | 7 | (export "test" 0) |
8 | 8 | (export "a" memory) |
9 | 9 | (func |
@@ -11,9 +11,9 @@ | ||
11 | 11 | (block |
12 | 12 | ;; should roundtrip store and load a value from storage |
13 | 13 | (i64.store (i32.const 0) (i64.const 173553719826446289)) |
14 | 14 | (call_import $sstore (i32.const 64) (i32.const 0)) |
15 | - (call_import $sget (i32.const 64) (i32.const 64)) | |
15 | + (call_import $sload (i32.const 64) (i32.const 64)) | |
16 | 16 | (set_local $temp |
17 | 17 | (i64.load (i32.const 64))) |
18 | 18 | |
19 | 19 | (if (i64.eq (i64.load (i32.const 0)) (i64.const 173553719826446289)) |
Built with git-ssb-web