Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 89e26f042e
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (12 sloc) 625 Bytes
package otto
func (runtime *_runtime) newArgumentsObject(argumentList []Value) *_object {
self := runtime.newClassObject("Arguments")
self.Prototype = runtime.Global.ObjectPrototype
for index, value := range argumentList {
// TODO Write test for runtime.GetValue(value)
// The problem here is possible reference nesting, is this the right place to GetValue?
self.WriteValue(arrayIndexToString(uint(index)), runtime.GetValue(value), false)
self.DefineOwnProperty("length", _property{Value: toValue(len(argumentList)), Mode: propertyModeWrite | propertyModeConfigure}.toDefineProperty(), false)
return self
Jump to Line
Something went wrong with that request. Please try again.