Searched refs:eval (Results 1 - 25 of 318) sorted by relevance

1234567891011>>

/openjdk10/nashorn/test/script/basic/
H A DJDK-8026692.js25 * JDK-8026692: eval() throws NullPointerException with --compile-only
32 eval("");
H A DJDK-8047067.js25 * JDK-8047067: all eval arguments need to be copied in Lower
32 // all eval arguments were copied in Lower, we'd end up with duplicate
36 eval("23", ({})[/x/])
H A DNASHORN-175.js31 eval("/* This is a comment " + String.fromCharCode('\u0000') + " */");
H A DNASHORN-36.js37 eval("// line comment\u000A x = 1;");
40 eval("// line comment\u000D x = 2;");
43 eval("// line comment\u2028 x = 3;");
46 eval("// line comment\u2029 x = 4;");
H A DNASHORN-52.js34 eval("\vvar\vx\v=\v1\v");
H A DJDK-8047365.js35 eval("function " + longId + "(){ print('hello world'); }");
36 eval("print(typeof " + longId + ")");
37 eval("print(" + longId + ".name === longId)");
38 eval("print(/a+/.exec(" + longId + ".toString())[0] === longId)");
39 eval(longId + "()");
H A DJDK-8087211_2.js34 // indirect eval call.
35 global.eval("x = 34;");
39 // strict caller, indirect eval.
40 global.eval('public = 1;');
46 // non strict caller, indirect eval.
47 global.eval('public = 1;');
H A DJDK-8019791.js33 eval('"" ~ ""');
41 eval("function() { if (1~0) return 0; return 1 }");
H A DJDK-8066220.js38 eval('"use strict"; function e() { print(typeof this); } e.call(1); new e();');
H A DNASHORN-40.js32 eval("print(.foo)");
38 eval(".bar = 3423;");
H A DJDK-8066238.js31 eval("function f() { L: ({ set prop(){0 = null} }); }");
38 eval("function g() { do ; while({ get x()1-- }); }");
H A DJDK-8048071.js25 * JDK-8048071: eval within 'with' statement does not use correct scope if with scope expression has a copy of eval
33 with ({ eval: this.eval }) {
34 eval("var x = 23");
46 eval("eval('var x=0')");
54 with({eval: global.eval}) {
55 eval("eva
[all...]
H A DJDK-8019805.js32 eval("for each(var v=0;false;);");
H A DJDK-8134865.js32 eval("function f() { for (x : y) { } }");
H A DNASHORN-275.js25 * NASHORN-275 : strict eval receives wrong 'this' object
36 if (eval("this") === global) {
37 fail("#1 strict eval gets 'global' as 'this'");
40 if (eval ("typeof this") !== 'undefined') {
41 fail("#2 typeof this is not undefined in strict eval");
48 if (eval("\"use strict\";this") !== this) {
49 fail("#3 strict mode eval receives wrong 'this'");
54 if (eval('"use strict"; this') !== obj) {
55 fail("#4 strict mode eval receives wrong 'this'");
64 return eval('thi
[all...]
H A Devalreturn.js25 * eval return values test.
32 print(eval("for(var x = 0; x < 100 ; x++) x;"));
33 print(eval("if (x == 1) { 'hello' } else { 'world' }"));
34 print(eval("do { x = 1 } while (false);"));
35 print(eval("var x = 1"));
36 print(eval("if (x == 0) { 'hello' }"));
37 print(eval("if (x == 1) { 'hello' }"));
50 eval('for(j in this){\nstr2+=j;\n}');
64 var e = eval("function cookie() { print('sweet and crunchy!'); } function cake() { print('moist and delicious!'); }");
66 var f = eval("functio
[all...]
H A DJDK-8058422.js34 var obj = e.eval("context.getAttribute('foo')");
40 if (e.eval("context") != "bar") {
44 if (e.eval("foo") != "hello") {
48 if (e.eval("engine") != e) {
53 if (e.eval("engine") != "foobar") {
H A DNASHORN-261.js25 * NASHORN-261 : All 'eval' calls assumed to be global builtin eval calls
31 // call eval with no args
32 if (eval() !== undefined) {
33 fail("eval with no arg should return undefined");
36 // call eval with extra (ignored) args
45 eval("eval = 3", "hello", "world", "nashorn");
56 // try calling 'eval' -- but from with scope rather than builtin one
58 eval
70 eval = function() { function
[all...]
H A Deval.js25 * eval test.
31 print("eval.length " + eval.length);
42 eval("var x = 300;");
43 eval("y = x + 3000;");
50 eval("var x = 100;");
51 eval("y = x + 1000;");
69 eval("print('hello)");
/openjdk10/nashorn/test/script/nosecurity/
H A Dcontext-dependent-logging.js42 if (!testEngine.eval('$OPTIONS._loggers.time')) {
53 if (!e.eval('$OPTIONS._loggers.compiler')) {
56 if (e.eval('$OPTIONS._loggers.time')) {
61 testEngine.eval(script)
63 if (!testEngine.eval('$OPTIONS._loggers.time')) {
66 if (testEngine.eval('$OPTIONS._loggers.compiler')) {
/openjdk10/langtools/test/jdk/javadoc/tool/enum/docComments/pkg1/
H A DOperation.java37 double eval(double x, double y) { return x + y; }
40 double eval(double x, double y) { return x - y; }
43 double eval(double x, double y) { return x * y; }
46 double eval(double x, double y) { return x / y; }
52 abstract double eval(double x, double y); method in class:Operation
/openjdk10/langtools/test/tools/javadoc/enum/docComments/pkg1/
H A DOperation.java37 double eval(double x, double y) { return x + y; }
40 double eval(double x, double y) { return x - y; }
43 double eval(double x, double y) { return x * y; }
46 double eval(double x, double y) { return x / y; }
52 abstract double eval(double x, double y); method in class:Operation
/openjdk10/nashorn/samples/
H A Dthis_for_eval.js32 // how to pass arbitrary "this" object for eval'ed script?
36 // the following won't work. eval.apply is indirect eval call
39 eval.apply(obj, [ " print(this.foo)" ]);
41 obj.myEval = eval;
43 // still won't work - still indirect 'eval' call!
48 eval(code);
51 // eval called inside func and so get's func's "this" as it's "this"!
/openjdk10/nashorn/test/src/jdk/nashorn/api/javaaccess/test/
H A DMethodAccessTest.java64 e.eval("var SharedObject = Packages.jdk.nashorn.api.javaaccess.test.SharedObject;");
65 e.eval("var Person = Packages.jdk.nashorn.api.javaaccess.test.Person;");
76 e.eval("try {" +
91 e.eval("try {" +
106 e.eval("o.methodStartsThread();");
112 assertEquals(10, e.eval("java.lang.Math.abs(-10);"));
117 e.eval("var v = new java.util.Vector();" + "v.add(10);" + "v.add(20);" + "v.add(30);");
118 assertEquals(10, e.eval("v[0]"));
119 assertEquals(20, e.eval("v[1]"));
120 assertEquals(30, e.eval("
[all...]
/openjdk10/nashorn/test/script/basic/es6/
H A Dconst-empty.js33 eval('"use strict";\n' +

Completed in 209 milliseconds

1234567891011>>