Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
25dd4606
Commit
25dd4606
authored
Apr 11, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added push20
parent
afc92fb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
stack.go
ethchain/stack.go
+1
-1
vm_test.go
ethchain/vm_test.go
+11
-13
No files found.
ethchain/stack.go
View file @
25dd4606
...
...
@@ -251,7 +251,7 @@ func (m *Memory) Print() {
if
len
(
m
.
store
)
>
0
{
addr
:=
0
for
i
:=
0
;
i
+
32
<=
len
(
m
.
store
);
i
+=
32
{
fmt
.
Printf
(
"%03d
%v
\n
"
,
addr
,
m
.
store
[
i
:
i
+
32
])
fmt
.
Printf
(
"%03d
: % x
\n
"
,
addr
,
m
.
store
[
i
:
i
+
32
])
addr
++
}
}
else
{
...
...
ethchain/vm_test.go
View file @
25dd4606
...
...
@@ -98,24 +98,22 @@ func TestRun4(t *testing.T) {
fmt
.
Printf
(
"%x
\n
"
,
addr
)
asm
,
err
=
mutan
.
Compile
(
strings
.
NewReader
(
`
int32 a = 10
int32 b = 10
if a == b {
int32 c = 10
if c == 10 {
int32 d = 1000
int32 e = 10
}
// Check if there's any cash in the initial store
if store[1000] == 0 {
store[1000] = 10^20
}
store[0] = 20
store[a] = 20
store[b] = this.caller()
store[1001] = this.value() * 20
store[this.origin()] = store[this.origin()] + 1000
if store[1001] > 20 {
store[1001] = 10^50
}
int8 ret = 0
int8 arg = 10
addr address
= "a46df28529eb8aa8b8c025b0b413c5f4b688352f"
call(
address
, 0, 100000000, arg, ret)
store[1002]
= "a46df28529eb8aa8b8c025b0b413c5f4b688352f"
call(
store[1002]
, 0, 100000000, arg, ret)
`
),
false
)
if
err
!=
nil
{
fmt
.
Println
(
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment