Skip to content

Commit

Permalink
drive by lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpoindexter committed Jul 24, 2023
1 parent 2e70d1d commit f5cc0e5
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 32 deletions.
5 changes: 0 additions & 5 deletions builtin_typedarrays.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,6 @@ func (r *Runtime) dataViewProto_getByteLen(call FunctionCall) Value {
panic(r.NewTypeError("Method get DataView.prototype.byteLength called on incompatible receiver %s", r.objectproto_toString(FunctionCall{This: call.This})))
}

// (REALMC-7469: can be removed) arrayBufferProto_setByteLength is needed to satisfy otto
func (r *Runtime) dataViewProto_setByteLen(call FunctionCall) Value {
return _undefined
}

func (r *Runtime) dataViewProto_getByteOffset(call FunctionCall) Value {
if dv, ok := r.toObject(call.This).self.(*dataViewObject); ok {
dv.viewedArrayBuf.ensureNotDetached(true)
Expand Down
2 changes: 0 additions & 2 deletions func.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ func (f *arrowFuncObject) Call(call FunctionCall) Value {
return f._call(call.Context(), call.Arguments, f.newTarget, nil)
}

var printed bool

func (f *baseJsFuncObject) _call(ctx context.Context, args []Value, newTarget, this Value) Value {
vm := f.val.runtime.vm

Expand Down
1 change: 0 additions & 1 deletion object.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ type Object struct {

weakRefs map[weakMap]Value

depth int
__wrapped interface{}

mu sync.RWMutex
Expand Down
8 changes: 0 additions & 8 deletions regexp.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,14 +574,6 @@ func (r *regexpObject) test(target valueString) bool {
return match
}

func (r *regexpObject) clone() *regexpObject {
r1 := r.val.runtime.newRegexpObject(r.prototype)
r1.source = r.source
r1.pattern = r.pattern

return r1
}

func (r *regexpObject) init() {
r.baseObject.init()
r.standard = true
Expand Down
13 changes: 0 additions & 13 deletions runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -3051,11 +3051,6 @@ func (r *Runtime) setGlobal(name unistring.String, v Value, strict bool) {
// return job.callback(FunctionCall{This: this, Arguments: args})
// }

func (r *Runtime) invoke(v Value, p unistring.String, args ...Value) Value {
o := v.ToObject(r)
return r.toCallable(o.self.getStr(p, nil))(FunctionCall{ctx: r.ctx, This: v, Arguments: args})
}

func (r *Runtime) iterableToList(iterable Value, method func(FunctionCall) Value) []Value {
iter := r.getIterator(iterable, method)
var values []Value
Expand All @@ -3065,14 +3060,6 @@ func (r *Runtime) iterableToList(iterable Value, method func(FunctionCall) Value
return values
}

func (r *Runtime) putSpeciesReturnThis(o objectImpl) {
o._putSym(SymSpecies, &valueProperty{
getterFunc: r.newNativeFunc(r.returnThis, nil, "get [Symbol.species]", nil, 0),
accessor: true,
configurable: true,
})
}

func strToArrayIdx(s unistring.String) uint32 {
if s == "" {
return math.MaxUint32
Expand Down
3 changes: 0 additions & 3 deletions vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ type vmContext struct {
result Value
pc, sb int
args int

mu sync.RWMutex
}

func (vc *vmContext) MemUsage(ctx *MemUsageContext) (uint64, error) {
Expand Down Expand Up @@ -4433,7 +4431,6 @@ func (n _new) exec(vm *vm) {
sp := vm.sp - int(n)
obj := vm.stack[sp-1]

obj = vm.stack[sp-1]
if ctor := vm.r.toObject(obj).self.assertConstructor(); ctor != nil {
vm.stack[sp-1] = ctor(vm.stack[sp:vm.sp], nil)
} else if f, ok := vm.r.toObject(obj).self.(*nativeFuncObject); ok {
Expand Down

0 comments on commit f5cc0e5

Please sign in to comment.