mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Backed out changeset bf800c62eeba (bug 1172641)
--HG-- extra : rebase_source : c34f5a4a4747e61e47f8367e8c66fc2ef57c2fff
This commit is contained in:
parent
dbb95a17ef
commit
704da72051
@ -1,5 +1,3 @@
|
|||||||
load(libdir + "class.js");
|
|
||||||
|
|
||||||
var JSMSG_ILLEGAL_CHARACTER = "illegal character";
|
var JSMSG_ILLEGAL_CHARACTER = "illegal character";
|
||||||
var JSMSG_UNTERMINATED_STRING = "unterminated string literal";
|
var JSMSG_UNTERMINATED_STRING = "unterminated string literal";
|
||||||
|
|
||||||
@ -27,6 +25,7 @@ function test_eval(code) {
|
|||||||
assertEq(caught, true);
|
assertEq(caught, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function test(code) {
|
function test(code) {
|
||||||
test_reflect(code);
|
test_reflect(code);
|
||||||
test_reflect("'use strict'; " + code);
|
test_reflect("'use strict'; " + code);
|
||||||
@ -469,18 +468,16 @@ test_no_fun_no_eval("export const a = 1, b = @");
|
|||||||
test_no_fun_no_eval("export const a = 1, b = 2 @");
|
test_no_fun_no_eval("export const a = 1, b = 2 @");
|
||||||
test_no_fun_no_eval("export const a = 1, b = 2; @");
|
test_no_fun_no_eval("export const a = 1, b = 2; @");
|
||||||
|
|
||||||
if (classesEnabled()) {
|
test_no_fun_no_eval("export class @");
|
||||||
test_no_fun_no_eval("export class @");
|
test_no_fun_no_eval("export class Foo @");
|
||||||
test_no_fun_no_eval("export class Foo @");
|
test_no_fun_no_eval("export class Foo { @");
|
||||||
test_no_fun_no_eval("export class Foo { @");
|
test_no_fun_no_eval("export class Foo { constructor @");
|
||||||
test_no_fun_no_eval("export class Foo { constructor @");
|
test_no_fun_no_eval("export class Foo { constructor( @");
|
||||||
test_no_fun_no_eval("export class Foo { constructor( @");
|
test_no_fun_no_eval("export class Foo { constructor() @");
|
||||||
test_no_fun_no_eval("export class Foo { constructor() @");
|
test_no_fun_no_eval("export class Foo { constructor() { @");
|
||||||
test_no_fun_no_eval("export class Foo { constructor() { @");
|
test_no_fun_no_eval("export class Foo { constructor() {} @");
|
||||||
test_no_fun_no_eval("export class Foo { constructor() {} @");
|
test_no_fun_no_eval("export class Foo { constructor() {} } @");
|
||||||
test_no_fun_no_eval("export class Foo { constructor() {} } @");
|
test_no_fun_no_eval("export class Foo { constructor() {} }; @");
|
||||||
test_no_fun_no_eval("export class Foo { constructor() {} }; @");
|
|
||||||
}
|
|
||||||
|
|
||||||
test_no_fun_no_eval("export default @");
|
test_no_fun_no_eval("export default @");
|
||||||
test_no_fun_no_eval("export default 1 @");
|
test_no_fun_no_eval("export default 1 @");
|
||||||
@ -499,27 +496,25 @@ test_no_fun_no_eval("export default function foo() { @");
|
|||||||
test_no_fun_no_eval("export default function foo() {} @");
|
test_no_fun_no_eval("export default function foo() {} @");
|
||||||
test_no_fun_no_eval("export default function foo() {}; @");
|
test_no_fun_no_eval("export default function foo() {}; @");
|
||||||
|
|
||||||
if (classesEnabled()) {
|
test_no_fun_no_eval("export default class @");
|
||||||
test_no_fun_no_eval("export default class @");
|
test_no_fun_no_eval("export default class { @");
|
||||||
test_no_fun_no_eval("export default class { @");
|
test_no_fun_no_eval("export default class { constructor @");
|
||||||
test_no_fun_no_eval("export default class { constructor @");
|
test_no_fun_no_eval("export default class { constructor( @");
|
||||||
test_no_fun_no_eval("export default class { constructor( @");
|
test_no_fun_no_eval("export default class { constructor() @");
|
||||||
test_no_fun_no_eval("export default class { constructor() @");
|
test_no_fun_no_eval("export default class { constructor() { @");
|
||||||
test_no_fun_no_eval("export default class { constructor() { @");
|
test_no_fun_no_eval("export default class { constructor() {} @");
|
||||||
test_no_fun_no_eval("export default class { constructor() {} @");
|
test_no_fun_no_eval("export default class { constructor() {} } @");
|
||||||
test_no_fun_no_eval("export default class { constructor() {} } @");
|
test_no_fun_no_eval("export default class { constructor() {} }; @");
|
||||||
test_no_fun_no_eval("export default class { constructor() {} }; @");
|
|
||||||
|
|
||||||
test_no_fun_no_eval("export default class Foo @");
|
test_no_fun_no_eval("export default class Foo @");
|
||||||
test_no_fun_no_eval("export default class Foo { @");
|
test_no_fun_no_eval("export default class Foo { @");
|
||||||
test_no_fun_no_eval("export default class Foo { constructor @");
|
test_no_fun_no_eval("export default class Foo { constructor @");
|
||||||
test_no_fun_no_eval("export default class Foo { constructor( @");
|
test_no_fun_no_eval("export default class Foo { constructor( @");
|
||||||
test_no_fun_no_eval("export default class Foo { constructor() @");
|
test_no_fun_no_eval("export default class Foo { constructor() @");
|
||||||
test_no_fun_no_eval("export default class Foo { constructor() { @");
|
test_no_fun_no_eval("export default class Foo { constructor() { @");
|
||||||
test_no_fun_no_eval("export default class Foo { constructor() {} @");
|
test_no_fun_no_eval("export default class Foo { constructor() {} @");
|
||||||
test_no_fun_no_eval("export default class Foo { constructor() {} } @");
|
test_no_fun_no_eval("export default class Foo { constructor() {} } @");
|
||||||
test_no_fun_no_eval("export default class Foo { constructor() {} }; @");
|
test_no_fun_no_eval("export default class Foo { constructor() {} }; @");
|
||||||
}
|
|
||||||
|
|
||||||
// import
|
// import
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
load(libdir + "match.js");
|
load(libdir + "match.js");
|
||||||
load(libdir + "asserts.js");
|
load(libdir + "asserts.js");
|
||||||
load(libdir + "class.js");
|
|
||||||
|
|
||||||
var { Pattern, MatchError } = Match;
|
var { Pattern, MatchError } = Match;
|
||||||
|
|
||||||
@ -203,18 +202,16 @@ program([
|
|||||||
)
|
)
|
||||||
]).assert(Reflect.parse("export function f() {}"));
|
]).assert(Reflect.parse("export function f() {}"));
|
||||||
|
|
||||||
if (classesEnabled()) {
|
program([
|
||||||
program([
|
exportDeclaration(
|
||||||
exportDeclaration(
|
classDeclaration(
|
||||||
classDeclaration(
|
ident("Foo")
|
||||||
ident("Foo")
|
),
|
||||||
),
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
false
|
||||||
false
|
)
|
||||||
)
|
]).assert(Reflect.parse("export class Foo { constructor() {} }"));
|
||||||
]).assert(Reflect.parse("export class Foo { constructor() {} }"));
|
|
||||||
}
|
|
||||||
|
|
||||||
program([
|
program([
|
||||||
exportDeclaration(
|
exportDeclaration(
|
||||||
@ -295,29 +292,27 @@ program([
|
|||||||
)
|
)
|
||||||
]).assert(Reflect.parse("export default function foo() {}"));
|
]).assert(Reflect.parse("export default function foo() {}"));
|
||||||
|
|
||||||
if (classesEnabled()) {
|
program([
|
||||||
program([
|
exportDeclaration(
|
||||||
exportDeclaration(
|
classDeclaration(
|
||||||
classDeclaration(
|
ident("*default*")
|
||||||
ident("*default*")
|
),
|
||||||
),
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
true
|
||||||
true
|
)
|
||||||
)
|
]).assert(Reflect.parse("export default class { constructor() {} }"));
|
||||||
]).assert(Reflect.parse("export default class { constructor() {} }"));
|
|
||||||
|
|
||||||
program([
|
program([
|
||||||
exportDeclaration(
|
exportDeclaration(
|
||||||
classDeclaration(
|
classDeclaration(
|
||||||
ident("Foo")
|
ident("Foo")
|
||||||
),
|
),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
]).assert(Reflect.parse("export default class Foo { constructor() {} }"));
|
]).assert(Reflect.parse("export default class Foo { constructor() {} }"));
|
||||||
}
|
|
||||||
|
|
||||||
program([
|
program([
|
||||||
exportDeclaration(
|
exportDeclaration(
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
var test = `
|
|
||||||
|
|
||||||
// Just like newTargetDirectInvoke, except to prove it works in functions
|
// Just like newTargetDirectInvoke, except to prove it works in functions
|
||||||
// defined with method syntax as well. Note that methods, getters, and setters
|
// defined with method syntax as well. Note that methods, getters, and setters
|
||||||
// are not constructible.
|
// are not constructible.
|
||||||
@ -48,10 +46,7 @@ for (let i = 0; i < TEST_ITERATIONS; i++)
|
|||||||
clInst.cl;
|
clInst.cl;
|
||||||
for (let i = 0; i < TEST_ITERATIONS; i++)
|
for (let i = 0; i < TEST_ITERATIONS; i++)
|
||||||
clInst.cl = 4;
|
clInst.cl = 4;
|
||||||
`;
|
|
||||||
|
|
||||||
if (classesEnabled())
|
|
||||||
eval(test);
|
|
||||||
|
|
||||||
if (typeof reportCompare === "function")
|
if (typeof reportCompare === "function")
|
||||||
reportCompare(0,0,"OK");
|
reportCompare(0,0,"OK");
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
var test = `
|
|
||||||
|
|
||||||
class foo {
|
class foo {
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
@ -8,10 +6,6 @@ class foo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
assertEq(new foo().method()(), Object.prototype.toString);
|
assertEq(new foo().method()(), Object.prototype.toString);
|
||||||
`;
|
|
||||||
|
|
||||||
if (classesEnabled())
|
|
||||||
eval(test);
|
|
||||||
|
|
||||||
if (typeof reportCompare === "function")
|
if (typeof reportCompare === "function")
|
||||||
reportCompare(0,0,"OK");
|
reportCompare(0,0,"OK");
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
var test = `
|
|
||||||
|
|
||||||
class foo {
|
class foo {
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
@ -9,10 +7,6 @@ class foo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assertEq(new foo().method()(), Object.prototype.toString);
|
assertEq(new foo().method()(), Object.prototype.toString);
|
||||||
`;
|
|
||||||
|
|
||||||
if (classesEnabled())
|
|
||||||
eval(test);
|
|
||||||
|
|
||||||
if (typeof reportCompare === "function")
|
if (typeof reportCompare === "function")
|
||||||
reportCompare(0,0,"OK");
|
reportCompare(0,0,"OK");
|
||||||
|
Loading…
Reference in New Issue
Block a user