Lines Matching defs:eval

28 assertEquals(void 0, eval());
29 assertEquals(4, eval(4));
32 assertTrue(f === eval(f));
37 assertEquals(4, eval('2 + 2', count++));
41 eval('hest 7 &*^*&^');
48 // eval has special evaluation order for consistency with other browsers.
49 global_eval = eval;
50 assertEquals(void 0, eval(eval("var eval = function f(x) { return 'hest';}")))
51 eval = global_eval;
53 // Test eval with different number of parameters.
54 global_eval = eval;
55 eval = function(x, y) { return x + y; };
56 assertEquals(4, eval(2, 2));
57 eval = global_eval;
59 // Test that un-aliased eval reads from local context.
64 return eval('foo');
68 // Test that un-aliased eval writes to local context.
73 eval('foo = 2');
79 // Test that un-aliased eval has right receiver.
80 function MyObject() { this.self = eval('this'); }
84 // Test that aliased eval reads from global context.
85 var e = eval;
94 // Test that aliased eval writes to global context.
95 var e = eval;
100 // Test that aliased eval has right receiver.
105 // Try to cheat the 'aliased eval' detection.
112 return x.eval('foo');
121 return (1,eval)('foo');
128 var eval = function(x) { return x; };
129 var foo = eval(2);
140 with ({ eval : e }) {
141 return eval('foo');
148 var eval = function(x) { return 2 * x; };
149 return (function() { return eval(2); })();
155 eval("var eval = function(s) { return this; }");
156 return eval("42"); // Should return the global object
161 var obj = { f: function(eval) { return eval("this"); } };
162 result = obj.f(eval);
167 var obj = { f: function(eval) { arguments; return eval("this"); } };
168 result = obj.f(eval);
172 eval = function(x) { return 2 * x; };
175 return (function() { return eval(2); })();
182 // Regression test: calling a function named eval found in a context that is
186 var eval = function (x) { return this; };
187 with ({}) { return eval('ignore'); }