(call FunctionCall)
| 226 | } |
| 227 | |
| 228 | func (r *Runtime) arrayproto_toString(call FunctionCall) Value { |
| 229 | array := call.This.ToObject(r) |
| 230 | var toString func() Value |
| 231 | switch a := array.self.(type) { |
| 232 | case *objectGoSliceReflect: |
| 233 | toString = a.toString |
| 234 | case *objectGoArrayReflect: |
| 235 | toString = a.toString |
| 236 | } |
| 237 | if toString != nil { |
| 238 | return toString() |
| 239 | } |
| 240 | f := array.self.getStr("join", nil) |
| 241 | if fObj, ok := f.(*Object); ok { |
| 242 | if fcall, ok := fObj.self.assertCallable(); ok { |
| 243 | return fcall(FunctionCall{ |
| 244 | This: array, |
| 245 | }) |
| 246 | } |
| 247 | } |
| 248 | return r.objectproto_toString(FunctionCall{ |
| 249 | This: array, |
| 250 | }) |
| 251 | } |
| 252 | |
| 253 | func (r *Runtime) writeItemLocaleString(item Value, buf *StringBuilder) { |
| 254 | if item != nil && item != _undefined && item != _null { |
nothing calls this directly
no test coverage detected