mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
289b30715d
This commit converts the dependency management from Godeps to the vendor folder, also switching the tool from godep to trash. Since the upstream tool lacks a few features proposed via a few PRs, until those PRs are merged in (if), use github.com/karalabe/trash. You can update dependencies via trash --update. All dependencies have been updated to their latest version. Parts of the build system are reworked to drop old notions of Godeps and invocation of the go vet command so that it doesn't run against the vendor folder, as that will just blow up during vetting. The conversion drops OpenCL (and hence GPU mining support) from ethash and our codebase. The short reasoning is that there's noone to maintain and having opencl libs in our deps messes up builds as go install ./... tries to build them, failing with unsatisfied link errors for the C OpenCL deps. golang.org/x/net/context is not vendored in. We expect it to be fetched by the user (i.e. using go get). To keep ci.go builds reproducible the package is "vendored" in build/_vendor.
29 lines
719 B
Go
29 lines
719 B
Go
package otto
|
|
|
|
// Boolean
|
|
|
|
func builtinBoolean(call FunctionCall) Value {
|
|
return toValue_bool(call.Argument(0).bool())
|
|
}
|
|
|
|
func builtinNewBoolean(self *_object, argumentList []Value) Value {
|
|
return toValue_object(self.runtime.newBoolean(valueOfArrayIndex(argumentList, 0)))
|
|
}
|
|
|
|
func builtinBoolean_toString(call FunctionCall) Value {
|
|
value := call.This
|
|
if !value.IsBoolean() {
|
|
// Will throw a TypeError if ThisObject is not a Boolean
|
|
value = call.thisClassObject("Boolean").primitiveValue()
|
|
}
|
|
return toValue_string(value.string())
|
|
}
|
|
|
|
func builtinBoolean_valueOf(call FunctionCall) Value {
|
|
value := call.This
|
|
if !value.IsBoolean() {
|
|
value = call.thisClassObject("Boolean").primitiveValue()
|
|
}
|
|
return value
|
|
}
|