mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
core/vm: removed jit prefix from functions
This commit is contained in:
parent
98322c0d00
commit
af2eb0de97
3 changed files with 6 additions and 6 deletions
|
|
@ -96,9 +96,9 @@ func calcQuadMemGas(mem *Memory, newMemSize uint64) (uint64, bool) {
|
||||||
return 0, false
|
return 0, false
|
||||||
}
|
}
|
||||||
|
|
||||||
// jitBaseCalc is the same as baseCheck except it doesn't do the look up in the
|
// baseCalc is the same as baseCheck except it doesn't do the look up in the
|
||||||
// gas table. This is done during compilation instead.
|
// gas table. This is done during compilation instead.
|
||||||
func jitBaseCalc(instr instruction, stack *Stack) (uint64, error) {
|
func baseCalc(instr instruction, stack *Stack) (uint64, error) {
|
||||||
err := stack.require(instr.spop)
|
err := stack.require(instr.spop)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ func jump(mapping map[uint64]uint64, destinations map[uint64]struct{}, contract
|
||||||
|
|
||||||
func (instr instruction) do(vm *EVM, program *Program, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
|
func (instr instruction) do(vm *EVM, program *Program, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
|
||||||
// calculate the new memory size and gas price for the current executing opcode
|
// calculate the new memory size and gas price for the current executing opcode
|
||||||
newMemSize, cost, err := jitCalculateGasAndSize(vm.gasTable, env, contract, instr, env.Db(), memory, stack)
|
newMemSize, cost, err := calculateGasAndSize(vm.gasTable, env, contract, instr, env.Db(), memory, stack)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -308,15 +308,15 @@ func validDest(dests map[uint64]struct{}, dest *big.Int) bool {
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
|
||||||
// jitCalculateGasAndSize calculates the required given the opcode and stack items calculates the new memorysize for
|
// calculateGasAndSize calculates the required given the opcode and stack items calculates the new memorysize for
|
||||||
// the operation. This does not reduce gas or resizes the memory.
|
// the operation. This does not reduce gas or resizes the memory.
|
||||||
func jitCalculateGasAndSize(gasTable params.GasTable, env Environment, contract *Contract, instr instruction, statedb Database, mem *Memory, stack *Stack) (uint64, uint64, error) {
|
func calculateGasAndSize(gasTable params.GasTable, env Environment, contract *Contract, instr instruction, statedb Database, mem *Memory, stack *Stack) (uint64, uint64, error) {
|
||||||
var (
|
var (
|
||||||
newMemSize, memGas uint64
|
newMemSize, memGas uint64
|
||||||
sizeFault bool
|
sizeFault bool
|
||||||
)
|
)
|
||||||
|
|
||||||
gas, err := jitBaseCalc(instr, stack)
|
gas, err := baseCalc(instr, stack)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, 0, err
|
return 0, 0, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue