aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/jump_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/jump_table.go')
-rw-r--r--core/vm/jump_table.go54
1 files changed, 28 insertions, 26 deletions
diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go
index 7fb11021f..2d238f7a1 100644
--- a/core/vm/jump_table.go
+++ b/core/vm/jump_table.go
@@ -53,8 +53,8 @@ type operation struct {
valid bool
// reverts determined whether the operation reverts state
reverts bool
- // clearsReturndata determines whether the opertions clears the return data
- clearsReturndata bool
+ // returns determines whether the opertions sets the return data
+ returns bool
}
var (
@@ -74,6 +74,7 @@ func NewMetropolisInstructionSet() [256]operation {
validateStack: makeStackFunc(6, 1),
memorySize: memoryStaticCall,
valid: true,
+ returns: true,
}
instructionSet[RETURNDATASIZE] = operation{
execute: opReturnDataSize,
@@ -101,6 +102,7 @@ func NewHomesteadInstructionSet() [256]operation {
validateStack: makeStackFunc(6, 1),
memorySize: memoryDelegateCall,
valid: true,
+ returns: true,
}
return instructionSet
}
@@ -286,22 +288,22 @@ func NewFrontierInstructionSet() [256]operation {
valid: true,
},
CALLDATALOAD: {
- execute: opCalldataLoad,
+ execute: opCallDataLoad,
gasCost: constGasFunc(GasFastestStep),
validateStack: makeStackFunc(1, 1),
valid: true,
},
CALLDATASIZE: {
- execute: opCalldataSize,
+ execute: opCallDataSize,
gasCost: constGasFunc(GasQuickStep),
validateStack: makeStackFunc(0, 1),
valid: true,
},
CALLDATACOPY: {
- execute: opCalldataCopy,
- gasCost: gasCalldataCopy,
+ execute: opCallDataCopy,
+ gasCost: gasCallDataCopy,
validateStack: makeStackFunc(3, 0),
- memorySize: memoryCalldataCopy,
+ memorySize: memoryCallDataCopy,
valid: true,
},
CODESIZE: {
@@ -876,29 +878,29 @@ func NewFrontierInstructionSet() [256]operation {
writes: true,
},
CREATE: {
- execute: opCreate,
- gasCost: gasCreate,
- validateStack: makeStackFunc(3, 1),
- memorySize: memoryCreate,
- valid: true,
- writes: true,
- clearsReturndata: true,
+ execute: opCreate,
+ gasCost: gasCreate,
+ validateStack: makeStackFunc(3, 1),
+ memorySize: memoryCreate,
+ valid: true,
+ writes: true,
+ returns: true,
},
CALL: {
- execute: opCall,
- gasCost: gasCall,
- validateStack: makeStackFunc(7, 1),
- memorySize: memoryCall,
- valid: true,
- clearsReturndata: true,
+ execute: opCall,
+ gasCost: gasCall,
+ validateStack: makeStackFunc(7, 1),
+ memorySize: memoryCall,
+ valid: true,
+ returns: true,
},
CALLCODE: {
- execute: opCallCode,
- gasCost: gasCallCode,
- validateStack: makeStackFunc(7, 1),
- memorySize: memoryCall,
- valid: true,
- clearsReturndata: true,
+ execute: opCallCode,
+ gasCost: gasCallCode,
+ validateStack: makeStackFunc(7, 1),
+ memorySize: memoryCall,
+ valid: true,
+ returns: true,
},
RETURN: {
execute: opReturn,