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
ba225017
Commit
ba225017
authored
Jan 12, 2015
by
Paweł Bylica
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JitVm struct stub. Forwards calls to DebugVm.
parent
8a1b51c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
common.go
vm/common.go
+1
-0
vm.go
vm/vm.go
+2
-0
vm_jit.go
vm/vm_jit.go
+31
-0
No files found.
vm/common.go
View file @
ba225017
...
...
@@ -14,6 +14,7 @@ type Type int
const
(
StandardVmTy
Type
=
iota
DebugVmTy
JitVmTy
MaxVmTy
)
...
...
vm/vm.go
View file @
ba225017
...
...
@@ -15,6 +15,8 @@ func New(env Environment, typ Type) VirtualMachine {
switch
typ
{
case
DebugVmTy
:
return
NewDebugVm
(
env
)
case
JitVmTy
:
return
NewJitVm
(
env
)
default
:
return
&
Vm
{
env
:
env
}
}
...
...
vm/vm_jit.go
0 → 100644
View file @
ba225017
package
vm
import
"math/big"
type
JitVm
struct
{
env
Environment
backup
*
DebugVm
}
func
NewJitVm
(
env
Environment
)
*
JitVm
{
backupVm
:=
NewDebugVm
(
env
)
return
&
JitVm
{
env
:
env
,
backup
:
backupVm
}
}
func
(
self
*
JitVm
)
Run
(
me
,
caller
ContextRef
,
code
[]
byte
,
value
,
gas
,
price
*
big
.
Int
,
callData
[]
byte
)
(
ret
[]
byte
,
err
error
)
{
return
self
.
backup
.
Run
(
me
,
caller
,
code
,
value
,
gas
,
price
,
callData
)
}
func
(
self
*
JitVm
)
Printf
(
format
string
,
v
...
interface
{})
VirtualMachine
{
return
self
.
backup
.
Printf
(
format
,
v
)
}
func
(
self
*
JitVm
)
Endl
()
VirtualMachine
{
return
self
.
backup
.
Endl
()
}
func
(
self
*
JitVm
)
Env
()
Environment
{
return
self
.
env
}
//go is nice
\ No newline at end of file
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