Searched defs:valueOf (Results 1 - 25 of 47) sorted by relevance

12

/external/v8/test/mjsunit/regress/
H A Dregress-1327557.js28 var x = { valueOf: function() { throw "x"; } };
29 var y = { valueOf: function() { throw "y"; } };
H A Dregress-3006390.js29 X.prototype.valueOf = function () { return 7; }
H A Dregress-760-1.js28 // Check that when valueOf for a String object is overwritten it is called and
33 String.prototype.valueOf = function() { return 'y' };
H A Dregress-760-2.js28 // Check that when valueOf for a String object is overwritten it is called and
35 o.valueOf = function() { return 'y' };
42 o.valueOf = function() { return 'y' };
H A Dregress-1412.js46 Object.prototype.valueOf.apply(receiver, arguments);
H A Dregress-1233.js29 // call toString or valueOf on members of the object.
36 delicate.valueOf = function(){ throw Error("valueOf"); };
H A Dregress-1365.js36 var valueOf = Object.prototype.valueOf;
39 function callGlobalValueOf() { valueOf(); }
40 function callGlobalHasOwnProperty() { valueOf(); }
42 assertEquals(Object.prototype, Object.prototype.valueOf());
46 %OptimizeFunctionOnNextCall(Object.prototype.valueOf);
47 Object.prototype.valueOf();
49 assertEquals(Object.prototype, Object.prototype.valueOf());
54 var valueOf = Object.prototype.valueOf;
[all...]
/external/v8/test/mjsunit/
H A Dto_number_order.js33 v.valueOf = vv;
34 w.valueOf = ww;
59 var year = { valueOf: function() { x += 1; return 2007; } };
60 var month = { valueOf: function() { x += 2; return 2; } };
61 var date = { valueOf: function() { x += 3; return 4; } };
62 var hours = { valueOf: function() { x += 4; return 13; } };
63 var minutes = { valueOf: function() { x += 5; return 50; } };
64 var seconds = { valueOf: function() { x += 6; return 0; } };
65 var ms = { valueOf: function() { x += 7; return 999; } };
134 var a = { valueOf
[all...]
H A Dnegate.js43 var x = { valueOf: function() { return 2; } };
44 var y = { valueOf: function() { return 3; } };
51 var v = { valueOf: function() { z+=2; return z; } };
52 var w = { valueOf: function() { z+=3; return z; } };
H A Dvalue-of.js31 o.valueOf = function() { throw new MyException(); }
H A Darray-splice.js207 spliced = array.splice({valueOf: function() { return 1; }},
222 bad_start = { valueOf: function() { array.push(2*i); return -1; } };
223 bad_count = { valueOf: function() { array.push(2*i + 1); return 1; } };
H A Dconst.js53 const o = { valueOf: function() { valueOfCount++; return 42; } };
H A Ddouble-equals.js51 this.valueOf = function () { return this.value; };
55 // valueOf isn't a function.
58 this.valueOf = null;
195 // and valueOf second.
198 dnow.valueOf = function () { return "42"; };
217 valueOf: null,
H A Dparse-int-float.js104 var throwingRadix = { valueOf: function() { state = "throwingRadix"; throw null; } };
H A Dstack-traces-2.js33 var thrower = { valueOf: function() { FAIL; },
H A Dmath-min-max.js65 o.valueOf = function() { return 1; };
98 o.valueOf = function() { return 3; };
173 v9.valueOf = function() { return 6; }
H A Dstring-charat.js33 var slowIndex1 = { valueOf: function() { return 1; } };
35 var slowIndexOutOfRange = { valueOf: function() { return -1; } };
102 valueOf: function() { return "should not be called"; }
145 if (i == 10) o.toString = o.valueOf = badToString;
167 if (i == 10) o.toString = o.valueOf = badToString;
184 valueOf: badToString
H A Dobject-toprimitive.js29 // Does it [[Get]] and [[Call]] the object's toString and valueOf properties
33 valueOf: function() { return "37"; } };
55 get valueOf() { trace.push("gvo");
H A Djson.js55 valueOf: function() { return Infinity; },
60 valueOf: "not callable",
67 valueOf: "not callable",
73 valueOf: "not callable",
353 num37.valueOf = function() { return 37; };
356 numFoo.valueOf = "not callable";
360 numTrue.valueOf = function() { return true; }
367 str37.valueOf = function() { return 37; };
409 valueOf: function() { return true; } };
/external/v8/test/mjsunit/compiler/
H A Drecursive-deopt.js44 var one = { valueOf: function() { return 1; } };
H A Dcompare.js76 // Test non-primitive values and watch for valueOf call order.
79 var x = { valueOf: function() { result += "x"; } };
80 var y = { valueOf: function() { result += "y"; } };
H A Dassignment-deopt.js149 var g3 = { valueOf: function() { o.y = "bar"; return 42; }};
166 var g4 = { valueOf: function() { o.y = "bar"; return 42; }};
/external/webkit/LayoutTests/fast/dom/DeviceMotion/script-tests/
H A Doptional-event-properties.js4 ObjectThrowingException.prototype.valueOf = function() { throw new Error('valueOf threw exception'); }
38 testException("event.initDeviceMotionEvent('', false, false, {x: objectThrowingException, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9)", "Error: valueOf threw exception");
39 testException("event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: objectThrowingException, z: 5}, {alpha: 6, beta: 7, gamma: 8}, 9)", "Error: valueOf threw exception");
40 testException("event.initDeviceMotionEvent('', false, false, {x: 0, y: 1, z: 2}, {x: 3, y: 4, z: 5}, {alpha: 6, beta: 7, gamma: objectThrowingException}, 9)", "Error: valueOf threw exception");
/external/webkit/LayoutTests/fast/dom/Geolocation/script-tests/
H A Dargument-types.js27 ObjectThrowingException.prototype.valueOf = function() {
28 throw new Error('valueOf threw exception');
100 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {maximumAge:objectThrowingException})', true, 'Error: valueOf threw exception');
111 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {timeout:objectThrowingException})', true, 'Error: valueOf threw exception');
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/
H A Dtry-007.js27 throw EXCEPTION_STRING +": " + this.valueOf();
36 return this.valueOf();
62 this.valueOf = function () { return this.value; }

Completed in 1477 milliseconds

12