5258785c81
* cmd, core, eth/tracers: support fancier js tracing * eth, internal/web3ext: rework trace API, concurrency, chain tracing * eth/tracers: add three more JavaScript tracers * eth/tracers, vendor: swap ottovm to duktape for tracing * core, eth, internal: finalize call tracer and needed extras * eth, tests: prestate tracer, call test suite, rewinding * vendor: fix windows builds for tracer js engine * vendor: temporary duktape fix * eth/tracers: fix up 4byte and evmdis tracer * vendor: pull in latest duktape with my upstream fixes * eth: fix some review comments * eth: rename rewind to reexec to make it more obvious * core/vm: terminate tracing using defers
122 lines
1.7 KiB
Go
122 lines
1.7 KiB
Go
package duktape
|
|
|
|
const (
|
|
CompileEval uint = 1 << iota
|
|
CompileFunction
|
|
CompileStrict
|
|
CompileSafe
|
|
CompileNoResult
|
|
CompileNoSource
|
|
CompileStrlen
|
|
)
|
|
|
|
const (
|
|
TypeNone Type = iota
|
|
TypeUndefined
|
|
TypeNull
|
|
TypeBoolean
|
|
TypeNumber
|
|
TypeString
|
|
TypeObject
|
|
TypeBuffer
|
|
TypePointer
|
|
TypeLightFunc
|
|
)
|
|
|
|
const (
|
|
TypeMaskNone uint = 1 << iota
|
|
TypeMaskUndefined
|
|
TypeMaskNull
|
|
TypeMaskBoolean
|
|
TypeMaskNumber
|
|
TypeMaskString
|
|
TypeMaskObject
|
|
TypeMaskBuffer
|
|
TypeMaskPointer
|
|
TypeMaskLightFunc
|
|
)
|
|
|
|
const (
|
|
EnumIncludeNonenumerable uint = 1 << iota
|
|
EnumIncludeInternal
|
|
EnumOwnPropertiesOnly
|
|
EnumArrayIndicesOnly
|
|
EnumSortArrayIndices
|
|
NoProxyBehavior
|
|
)
|
|
|
|
const (
|
|
ErrNone int = 0
|
|
|
|
// Internal to Duktape
|
|
ErrUnimplemented int = 50 + iota
|
|
ErrUnsupported
|
|
ErrInternal
|
|
ErrAlloc
|
|
ErrAssertion
|
|
ErrAPI
|
|
ErrUncaughtError
|
|
)
|
|
|
|
const (
|
|
// Common prototypes
|
|
ErrError int = 1 + iota
|
|
ErrEval
|
|
ErrRange
|
|
ErrReference
|
|
ErrSyntax
|
|
ErrType
|
|
ErrURI
|
|
)
|
|
|
|
const (
|
|
// Returned error values
|
|
ErrRetUnimplemented int = -(ErrUnimplemented + iota)
|
|
ErrRetUnsupported
|
|
ErrRetInternal
|
|
ErrRetAlloc
|
|
ErrRetAssertion
|
|
ErrRetAPI
|
|
ErrRetUncaughtError
|
|
)
|
|
|
|
const (
|
|
ErrRetError int = -(ErrError + iota)
|
|
ErrRetEval
|
|
ErrRetRange
|
|
ErrRetReference
|
|
ErrRetSyntax
|
|
ErrRetType
|
|
ErrRetURI
|
|
)
|
|
|
|
const (
|
|
ExecSuccess = iota
|
|
ExecError
|
|
)
|
|
|
|
const (
|
|
LogTrace int = iota
|
|
LogDebug
|
|
LogInfo
|
|
LogWarn
|
|
LogError
|
|
LogFatal
|
|
)
|
|
|
|
const (
|
|
BufobjDuktapeAuffer = 0
|
|
BufobjNodejsAuffer = 1
|
|
BufobjArraybuffer = 2
|
|
BufobjDataview = 3
|
|
BufobjInt8array = 4
|
|
BufobjUint8array = 5
|
|
BufobjUint8clampedarray = 6
|
|
BufobjInt16array = 7
|
|
BufobjUint16array = 8
|
|
BufobjInt32array = 9
|
|
BufobjUint32array = 10
|
|
BufobjFloat32array = 11
|
|
BufobjFloat64array = 12
|
|
)
|