diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/jit-test/modules | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/jit-test/modules')
-rw-r--r-- | js/src/jit-test/modules/ambiguous.js | 2 | ||||
-rw-r--r-- | js/src/jit-test/modules/cyclicImport1.js | 4 | ||||
-rw-r--r-- | js/src/jit-test/modules/cyclicImport2.js | 4 | ||||
-rw-r--r-- | js/src/jit-test/modules/defaultClass.js | 5 | ||||
-rw-r--r-- | js/src/jit-test/modules/defaultFunction.js | 3 | ||||
-rw-r--r-- | js/src/jit-test/modules/isEven.js | 12 | ||||
-rw-r--r-- | js/src/jit-test/modules/isOdd.js | 12 | ||||
-rw-r--r-- | js/src/jit-test/modules/module1.js | 1 | ||||
-rw-r--r-- | js/src/jit-test/modules/module1a.js | 1 | ||||
-rw-r--r-- | js/src/jit-test/modules/module2.js | 1 | ||||
-rw-r--r-- | js/src/jit-test/modules/module3.js | 1 | ||||
-rw-r--r-- | js/src/jit-test/modules/module4.js | 1 | ||||
-rw-r--r-- | js/src/jit-test/modules/recursiveStarExport.js | 1 |
13 files changed, 48 insertions, 0 deletions
diff --git a/js/src/jit-test/modules/ambiguous.js b/js/src/jit-test/modules/ambiguous.js new file mode 100644 index 000000000..3e0d31e3e --- /dev/null +++ b/js/src/jit-test/modules/ambiguous.js @@ -0,0 +1,2 @@ +export * from 'module1.js'; +export * from 'module1a.js'; diff --git a/js/src/jit-test/modules/cyclicImport1.js b/js/src/jit-test/modules/cyclicImport1.js new file mode 100644 index 000000000..d64803a00 --- /dev/null +++ b/js/src/jit-test/modules/cyclicImport1.js @@ -0,0 +1,4 @@ +import { b } from "cyclicImport2.js"; + +export let a = 1; +assertEq(b, 2); diff --git a/js/src/jit-test/modules/cyclicImport2.js b/js/src/jit-test/modules/cyclicImport2.js new file mode 100644 index 000000000..e7c3cd924 --- /dev/null +++ b/js/src/jit-test/modules/cyclicImport2.js @@ -0,0 +1,4 @@ +import { a } from "cyclicImport1.js"; + +export let b = 2; +assertEq(a, 1); diff --git a/js/src/jit-test/modules/defaultClass.js b/js/src/jit-test/modules/defaultClass.js new file mode 100644 index 000000000..c05d5ff5a --- /dev/null +++ b/js/src/jit-test/modules/defaultClass.js @@ -0,0 +1,5 @@ +export default class { + triple(x) { + return x * 3; + } +} diff --git a/js/src/jit-test/modules/defaultFunction.js b/js/src/jit-test/modules/defaultFunction.js new file mode 100644 index 000000000..1c6e75d45 --- /dev/null +++ b/js/src/jit-test/modules/defaultFunction.js @@ -0,0 +1,3 @@ +export default function(x) { + return x * 2; +} diff --git a/js/src/jit-test/modules/isEven.js b/js/src/jit-test/modules/isEven.js new file mode 100644 index 000000000..242cddf40 --- /dev/null +++ b/js/src/jit-test/modules/isEven.js @@ -0,0 +1,12 @@ +import { isOdd } from "isOdd.js" + +export function isEven(x) { + if (x < 0) + throw "negative"; + if (x == 0) + return true; + return isOdd(x - 1); +} + +assertEq(isEven(4), true); +assertEq(isOdd(5), true); diff --git a/js/src/jit-test/modules/isOdd.js b/js/src/jit-test/modules/isOdd.js new file mode 100644 index 000000000..2cada0cf9 --- /dev/null +++ b/js/src/jit-test/modules/isOdd.js @@ -0,0 +1,12 @@ +import { isEven } from "isEven.js" + +export function isOdd(x) { + if (x < 0) + throw "negative"; + if (x == 0) + return false; + return isEven(x - 1); +} + +assertEq(isEven(4), true); +assertEq(isOdd(5), true); diff --git a/js/src/jit-test/modules/module1.js b/js/src/jit-test/modules/module1.js new file mode 100644 index 000000000..cc798ff50 --- /dev/null +++ b/js/src/jit-test/modules/module1.js @@ -0,0 +1 @@ +export const a = 1; diff --git a/js/src/jit-test/modules/module1a.js b/js/src/jit-test/modules/module1a.js new file mode 100644 index 000000000..66d48fc1e --- /dev/null +++ b/js/src/jit-test/modules/module1a.js @@ -0,0 +1 @@ +export const a = 2; diff --git a/js/src/jit-test/modules/module2.js b/js/src/jit-test/modules/module2.js new file mode 100644 index 000000000..6287b0f71 --- /dev/null +++ b/js/src/jit-test/modules/module2.js @@ -0,0 +1 @@ +export let b = 2; diff --git a/js/src/jit-test/modules/module3.js b/js/src/jit-test/modules/module3.js new file mode 100644 index 000000000..df4cdade5 --- /dev/null +++ b/js/src/jit-test/modules/module3.js @@ -0,0 +1 @@ +export var c = 3; diff --git a/js/src/jit-test/modules/module4.js b/js/src/jit-test/modules/module4.js new file mode 100644 index 000000000..456ffaafa --- /dev/null +++ b/js/src/jit-test/modules/module4.js @@ -0,0 +1 @@ +export default 4; diff --git a/js/src/jit-test/modules/recursiveStarExport.js b/js/src/jit-test/modules/recursiveStarExport.js new file mode 100644 index 000000000..681c7be91 --- /dev/null +++ b/js/src/jit-test/modules/recursiveStarExport.js @@ -0,0 +1 @@ +export * from 'recursiveStarExport.js'; |