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
797bbce1
Commit
797bbce1
authored
Mar 19, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into conversion
parents
ad7e4912
a756dbeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
vm.go
vm/vm.go
+18
-10
No files found.
vm/vm.go
View file @
797bbce1
...
@@ -441,13 +441,16 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
...
@@ -441,13 +441,16 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
self
.
Printf
(
" => %d"
,
l
)
self
.
Printf
(
" => %d"
,
l
)
case
CALLDATACOPY
:
case
CALLDATACOPY
:
var
(
var
(
mOff
=
stack
.
pop
()
.
Uint64
()
mOff
=
stack
.
pop
()
cOff
=
stack
.
pop
()
.
Uint64
()
cOff
=
stack
.
pop
()
l
=
stack
.
pop
()
.
Uint64
()
l
=
stack
.
pop
()
)
)
data
:=
getData
(
callData
,
cOff
,
l
)
var
data
[]
byte
if
cOff
.
Cmp
(
big
.
NewInt
(
int64
(
len
(
callData
))))
<=
0
{
data
=
getData
(
callData
,
cOff
.
Uint64
(),
l
.
Uint64
())
}
mem
.
Set
(
mOff
,
l
,
data
)
mem
.
Set
(
mOff
.
Uint64
(),
l
.
Uint64
()
,
data
)
self
.
Printf
(
" => [%v, %v, %v] %x"
,
mOff
,
cOff
,
l
,
data
)
self
.
Printf
(
" => [%v, %v, %v] %x"
,
mOff
,
cOff
,
l
,
data
)
case
CODESIZE
,
EXTCODESIZE
:
case
CODESIZE
,
EXTCODESIZE
:
...
@@ -472,14 +475,19 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
...
@@ -472,14 +475,19 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
}
else
{
}
else
{
code
=
context
.
Code
code
=
context
.
Code
}
}
var
(
var
(
mOff
=
stack
.
pop
()
.
Uint64
()
mOff
=
stack
.
pop
()
cOff
=
stack
.
pop
()
.
Uint64
()
cOff
=
stack
.
pop
()
l
=
stack
.
pop
()
.
Uint64
()
l
=
stack
.
pop
()
)
)
codeCopy
:=
getData
(
code
,
cOff
,
l
)
mem
.
Set
(
mOff
,
l
,
codeCopy
)
var
codeCopy
[]
byte
if
cOff
.
Cmp
(
big
.
NewInt
(
int64
(
len
(
code
))))
<=
0
{
codeCopy
=
getData
(
code
,
cOff
.
Uint64
(),
l
.
Uint64
())
}
mem
.
Set
(
mOff
.
Uint64
(),
l
.
Uint64
(),
codeCopy
)
self
.
Printf
(
" => [%v, %v, %v] %x"
,
mOff
,
cOff
,
l
,
codeCopy
)
self
.
Printf
(
" => [%v, %v, %v] %x"
,
mOff
,
cOff
,
l
,
codeCopy
)
case
GASPRICE
:
case
GASPRICE
:
...
...
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