aboutsummaryrefslogtreecommitdiff
path: root/test/reduce.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/reduce.js')
-rw-r--r--test/reduce.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/test/reduce.js b/test/reduce.js
index 4d628aa2..25dc14ae 100644
--- a/test/reduce.js
+++ b/test/reduce.js
@@ -181,7 +181,7 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
}
else if (node instanceof U.AST_Call) {
var expr = [
- node.expression,
+ !(node.expression instanceof U.AST_Super) && node.expression,
node.args[0],
null, // intentional
][ ((node.start._permute += step) * steps | 0) % 3 ];
@@ -202,7 +202,7 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
var seq = [];
body.forEach(function(node) {
var expr = expr instanceof U.AST_Exit ? node.value : node.body;
- if (expr instanceof U.AST_Node && !is_statement(expr)) {
+ if (expr instanceof U.AST_Node && !U.is_statement(expr)) {
// collect expressions from each statements' body
seq.push(expr);
}
@@ -358,7 +358,7 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
}
else if (node instanceof U.AST_PropAccess) {
var expr = [
- node.expression,
+ !(node.expression instanceof U.AST_Super) && node.expression,
node.property instanceof U.AST_Node && !(parent instanceof U.AST_Destructured) && node.property,
][ node.start._permute++ % 2 ];
if (expr) {
@@ -468,7 +468,7 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
}
// replace this node
- var newNode = is_statement(node) ? new U.AST_EmptyStatement({
+ var newNode = U.is_statement(node) ? new U.AST_EmptyStatement({
start: {},
}) : U.parse(REPLACEMENTS[node.start._permute % REPLACEMENTS.length | 0], {
expression: true,
@@ -666,10 +666,6 @@ function is_timed_out(result) {
return sandbox.is_error(result) && /timed out/.test(result.message);
}
-function is_statement(node) {
- return node instanceof U.AST_Statement && !(node instanceof U.AST_LambdaExpression);
-}
-
function merge_sequence(array, node) {
if (node instanceof U.AST_Sequence) {
array.push.apply(array, node.expressions);
@@ -689,7 +685,7 @@ function to_sequence(expressions) {
}
function to_statement(node) {
- return is_statement(node) ? node : new U.AST_SimpleStatement({
+ return U.is_statement(node) ? node : new U.AST_SimpleStatement({
body: node,
start: {},
});
ges/vulkan.scm?id=ba10e0b8e1726d8be18ffcebd11572750f8bb7e8'>gnu: spirv-tools: Update to fe2fbee....Rutger Helling 2018-06-11gnu: spirv-headers: Update to 3ce3e49....Rutger Helling 2018-06-07gnu: Add deprecated-package vulkan-icd-loader....Rutger Helling 2018-06-06gnu: vulkan-loader: Update URL and change name....Rutger Helling 2018-04-25gnu: vulkan-icd-loader: Update to 1.1.73.0....Rutger Helling 2018-03-17gnu: shaderc: Clean up package arguments....Efraim Flashner 2018-03-17Revert "gnu: shaderc: Use more standard keys."...Rutger Helling 2018-03-17gnu: Fix common unquote typos....Tobias Geerinckx-Rice 2018-03-17gnu: shaderc: Use more standard keys....Tobias Geerinckx-Rice 2018-03-17gnu: shaderc: Use standard versioning scheme....Tobias Geerinckx-Rice 2018-03-17gnu: shaderc: Fix formatting....Tobias Geerinckx-Rice 2018-03-08gnu: vulkan-icd-loader: Update to 1.1.70.0....Rutger Helling 2018-02-23gnu: vulkan-icd-loader: Update to 1.0.68.0....Rutger Helling 2018-02-14gnu: Add shaderc....Rutger Helling 2018-01-31gnu: glslang: Update to commit b5b08462442239e6537315ea1405b6afcd53043e....Rutger Helling 2018-01-31gnu: spirv-tools: Update to commit 90862fe4b1c6763b32ce683d2d32c2f281f577cf....Rutger Helling 2018-01-31gnu: spirv-headers: Update to commit 061097878467b8e040fbf153a837d844ef9f9f96....Rutger Helling 2018-01-30gnu: vulkan-icd-loader: Update to 1.0.65.2....Rutger Helling 2017-12-18gnu: vulkan: Add vulkan-icd-loader....Rutger Helling 2017-12-18gnu: vulkan: Add glslang....Rutger Helling 2017-12-18gnu: vulkan: Add spirv-tools....Rutger Helling 2017-12-18gnu: vulkan: Add spirv-headers....Rutger Helling