mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
core/vm: removed jit prefix from functions
This commit is contained in:
parent
a41adb9bda
commit
4e25441a8f
3 changed files with 6 additions and 6 deletions
|
|
@ -82,9 +82,9 @@ func calcQuadMemGas(mem *Memory, newMemSize uint64) (uint64, bool) {
|
|||
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.
|
||||
func jitBaseCalc(instr instruction, stack *Stack) (uint64, error) {
|
||||
func baseCalc(instr instruction, stack *Stack) (uint64, error) {
|
||||
err := stack.require(instr.spop)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ func jump(mapping map[uint64]uint64, destinations map[uint64]struct{}, contract
|
|||
|
||||
func (instr instruction) do(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
|
||||
newMemSize, cost, err := jitCalculateGasAndSize(env, contract, instr, env.Db(), memory, stack)
|
||||
newMemSize, cost, err := calculateGasAndSize(env, contract, instr, env.Db(), memory, stack)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,15 +308,15 @@ func validDest(dests map[uint64]struct{}, dest *big.Int) bool {
|
|||
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.
|
||||
func jitCalculateGasAndSize(env Environment, contract *Contract, instr instruction, statedb Database, mem *Memory, stack *Stack) (uint64, uint64, error) {
|
||||
func calculateGasAndSize(env Environment, contract *Contract, instr instruction, statedb Database, mem *Memory, stack *Stack) (uint64, uint64, error) {
|
||||
var (
|
||||
newMemSize uint64
|
||||
sizeFault bool
|
||||
)
|
||||
|
||||
gas, err := jitBaseCalc(instr, stack)
|
||||
gas, err := baseCalc(instr, stack)
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue