Lines Matching refs:alternative
342 if (node.alternative) node.alternative = node.alternative.transform(tt);
1156 mark_refs(node.alternative, drop);
1220 this.alternative.walk(tw);
1303 if (this.alternative) {
1305 this.alternative.walk(tw);
2218 alternative: node,
2222 alternative: candidate.right.right,
2842 extract_candidates(expr.alternative, unused);
2871 if (expr.alternative && !(expr.alternative instanceof AST_Block)) {
2872 extract_candidates(expr.alternative);
3196 return invariant(expr.consequent) && invariant(expr.alternative);
3583 stat.alternative = make_node(AST_BlockStatement, stat, {
3584 … body: as_statement_array(stat.alternative).concat(extract_functions(merge_jump, jump)),
3592 if (ab && !stat.alternative && next instanceof AST_Jump) {
3614 var alt = aborts(stat.alternative);
3623 stat.alternative = make_node(AST_BlockStatement, stat.alternative, {
3624 body: as_statement_array_with_return(stat.alternative, alt),
3647 if (!stat.alternative && next instanceof AST_Return
3651 stat.alternative = make_node(AST_BlockStatement, next, {
3661 if (in_lambda && declare_only && !next && !stat.alternative && (in_bool
3664 || is_undefined(value.alternative, compressor)))) {
3667 stat.alternative = make_node(AST_Return, stat, { value: null });
3678 if (chain_if_returns && !stat.alternative
3688 stat.alternative = make_node(AST_BlockStatement, self, {
3892 … if (stat.alternative) stat.alternative = eliminate_returns(stat.alternative, keep_throws);
4067 var alt = to_simple_statement(stat.alternative, decls);
4073 alternative: alt, property
4576 … return this.consequent._dot_throw(compressor) || this.alternative._dot_throw(compressor);
4651 … return this.consequent.is_defined(compressor) && this.alternative.is_defined(compressor);
4703 … return this.consequent.is_boolean(compressor) && this.alternative.is_boolean(compressor);
4789 return this.consequent.is_number(compressor) && this.alternative.is_number(compressor);
4851 return this.consequent.is_string(compressor) && this.alternative.is_string(compressor);
5381 var node = condition ? this.consequent : this.alternative;
5681 self.alternative = self.alternative.negate(compressor);
5854 || this.alternative.has_side_effects(compressor);
5878 || this.alternative && this.alternative.has_side_effects(compressor);
5997 || this.alternative.may_throw(compressor);
6021 || this.alternative && this.alternative.may_throw(compressor);
6172 return this.alternative && aborts(this.body) && aborts(this.alternative) && this;
6429 walk_cond(node.condition, node.consequent, node.alternative);
6470 walk_cond(node.condition, node.body, node.alternative);
6618 function walk_cond(condition, consequent, alternative) { argument
6633 walk_cond(condition.condition, condition.consequent, condition.alternative);
6644 if (alternative) {
6646 alternative.walk(tw);
8212 clear_write_only(node.alternative);
8985 var alternative = this.alternative.drop_side_effect_free(compressor);
8986 if (consequent === this.consequent && alternative === this.alternative) return this;
8994 if (alternative instanceof AST_Function) {
8995 exprs.push(alternative);
8996 alternative = null;
9001 node = alternative ? make_node(AST_Binary, this, {
9004 right: alternative,
9006 } else if (!alternative) {
9015 node.alternative = alternative;
9189 && !stat.alternative
9252 alternative: null, property
9274 var body = as_statement_array(first.alternative);
9278 ab = first_statement(first.alternative);
9290 extract_declarations_from_unreachable_code(compressor, first.alternative, body);
9365 function mark_locally_defined(condition, consequent, alternative) { argument
9375 mark_locally_defined(negate(condition.left), alternative);
9376 mark_locally_defined(negate(condition.right), alternative);
9389 body = undef ? alternative : consequent;
9392 body = undef ? consequent : alternative;
9524 case parent.alternative:
9549 case parent.alternative:
9568 if (is_empty(self.alternative)) self.alternative = null;
9586 if (self.alternative) body.push(self.alternative);
9594 …if (self.alternative) extract_declarations_from_unreachable_code(compressor, self.alternative, bod…
9602 if (self.alternative && negated_is_best) {
9608 self.body = self.alternative;
9609 self.alternative = is_empty(tmp) ? null : tmp;
9618 var alt_exprs = sequencesize(self.alternative, alt_defuns, alt_var_defs, alt_refs);
9639 self.alternative = alt_exprs;
9641 self.alternative = null;
9643 self.alternative = make_node(AST_SimpleStatement, self.alternative, {
9644 body: make_sequence(self.alternative, alt_exprs),
9664 right: make_sequence(self.alternative, alt_exprs),
9687 alternative: make_sequence(self.alternative, alt_exprs),
9697 body: self.alternative,
9698 alternative: null, property
9700 if (self.alternative instanceof AST_Exit && self.body.TYPE == self.alternative.TYPE) {
9702 var alt_value = self.alternative.value;
9714 … alternative: alt_value || make_node(AST_Undefined, self.alternative).transform(compressor),
9717 … if (exit instanceof AST_Return) exit.in_bool = self.body.in_bool || self.alternative.in_bool;
9721 if (self.body instanceof AST_If && !self.body.alternative && !self.alternative) {
9729 alternative: null, property
9732 if (aborts(self.body) && self.alternative) {
9733 var alt = self.alternative;
9734 self.alternative = null;
9737 if (aborts(self.alternative)) {
9739 self.body = self.alternative;
9741 self.alternative = null;
9744 if (self.alternative) {
9747 var alt_stats = as_array(self.alternative);
9771 self.alternative = alt_stats.length > 0 ? make_node(AST_BlockStatement, self, {
9778 …f (compressor.option("typeofs")) mark_locally_defined(self.condition, self.body, self.alternative);
10002 alternative: null, property
10013 var alternative = body[1].body.length && make_node(AST_BlockStatement, body[1]);
10025 alternative: exclusive && alternative || null, property
10027 …if (!exclusive && alternative) node = make_node(AST_BlockStatement, self, { body: [ node, alternat…
11280 alternative: value, property
11284 alternative: node.right.right, property
11590 …turn needs_enqueuing(compressor, node.consequent) && needs_enqueuing(compressor, node.alternative);
11892 alternative: self.left.right, property
11932 alternative: self.right, property