Lines Matching refs:lhs

420         var lhs = is_lhs(node, parent);
421 if (lhs) return lhs;
823 function scan_declaration(tw, compressor, lhs, fixed, visit) { argument
909 lhs.walk(scanner);
1035 function walk_prop(lhs) { argument
1036 reset_flags(lhs);
1037 if (lhs instanceof AST_Dot) {
1038 walk_prop(lhs.expression);
1039 } else if (lhs instanceof AST_Sub) {
1040 walk_prop(lhs.expression);
1041 lhs.property.walk(tw);
1042 } else if (lhs instanceof AST_SymbolRef) {
1043 var d = lhs.definition();
1044 push_ref(d, lhs);
1046 lhs.fixed = d.fixed;
1047 if (lhs.fixed.assigns) {
1048 lhs.fixed.assigns.push(node);
1050 lhs.fixed.assigns = [ node ];
1054 lhs.walk(tw);
1754 function is_lhs_read_only(lhs, compressor) { argument
1755 if (lhs instanceof AST_Atom) return true;
1756 if (lhs instanceof AST_ObjectIdentity) return true;
1757 if (lhs instanceof AST_PropAccess) {
1758 if (lhs.property === "__proto__") return true;
1759 lhs = lhs.expression;
1760 if (lhs instanceof AST_SymbolRef) {
1761 if (lhs.is_immutable()) return false;
1762 lhs = lhs.fixed_value();
1764 if (!lhs) return true;
1765 if (lhs.tail_node().is_constant()) return true;
1766 return is_lhs_read_only(lhs, compressor);
1768 if (lhs instanceof AST_SymbolRef) {
1769 if (lhs.is_immutable()) return true;
1770 var def = lhs.definition();
2149 … && node instanceof AST_Assign && node.operator != "=" && node.left.equals(lhs)) {
2154 lvalues = get_lvalues(lhs);
2164 … left: lhs.fixed && lhs.definition().fixed ? lhs.fixed.to_binary(candidate) : lhs,
2188 && (scan_lhs && lhs.equals(node)
2198 if (!hit_rhs && verify_ref && node.fixed !== lhs.fixed) {
2228 … expression: lhs.fixed && lhs.definition().fixed ? lhs.fixed.to_prefix(candidate) : lhs,
2377 var lhs = get_lhs(candidate);
2378 var side_effects = lhs && lhs.has_side_effects(compressor);
2379 var scan_lhs = lhs && (!side_effects || lhs instanceof AST_SymbolRef)
2380 && !is_lhs_read_only(lhs, compressor);
2398 var lhs_local = is_lhs_local(lhs);
2429 var def = lhs.definition();
2523 return node.operator != "=" && lhs.equals(node.left);
2526 if (!(lhs instanceof AST_PropAccess)) return false;
2527 if (!lhs.equals(node.expression)) return false;
2532 if (node instanceof AST_Defun) return funarg && lhs.name === node.name.name;
2623 return side_effects || lhs instanceof AST_PropAccess || may_modify(lhs);
2813 var lhs = expr.left;
2814 if (!(lhs instanceof AST_Destructured)) candidates.push(hit_stack.slice());
2815 extract_candidates(lhs);
2817 if (lhs instanceof AST_SymbolRef && expr.operator == "=") {
2818 assignments.set(lhs.name, (assignments.get(lhs.name) || 0) + 1);
2982 … return ref instanceof AST_SymbolRef && (lhs.name == ref.name || value_def.name == ref.name);
3046 …return sym instanceof AST_SymbolDeclaration && (lhs.name == sym.name || value_def.name == sym.name…
3091 function check_assignment(lhs) { argument
3093 if (lhs !== node && lhs instanceof AST_Destructured) {
3094 return find_stop_expr(lhs, find_stop_unused, node, parent, level);
3133 var lhs = expr.left;
3134 if (!(lhs instanceof AST_SymbolRef)) return lhs;
3135 var def = lhs.definition();
3136 if (scope.uses_arguments && is_funarg(def)) return lhs;
3137 if (compressor.exposed(def)) return lhs;
3139 if (def.fixed && lhs.fixed) {
3141 return ref.fixed === lhs.fixed;
3150 return lhs;
3155 var lhs = expr.name;
3156 var def = lhs.definition();
3158 if (!member(lhs, def.orig)) return;
3166 return assign === lhs || get_rvalue(assign) === expr.value;
3168 if (declared > 1 && !(lhs instanceof AST_SymbolFunarg)) {
3170 return make_node(AST_SymbolRef, lhs);
3173 return make_node(AST_SymbolRef, lhs);
3223 if (!(lhs instanceof AST_SymbolRef)) return false;
3281 lvalues.add(expr.name.name, lhs);
3348 if (node === lhs && !(expr instanceof AST_Unary)) {
3424 function is_lhs_local(lhs) { argument
3425 var sym = root_expr(lhs);
3432 return !lvalue || lvalue[0] === lhs;
3444 if (!(lhs instanceof AST_SymbolRef)) return false;
3453 var def = lhs.definition();
3456 if (!lhs.fixed) return false;
3457 var assigns = lhs.fixed.assigns;
3463 if (fixed === lhs.fixed) {
3476 if (!lvalue || all(lvalue, function(lhs) { argument
3477 return !lhs;
3479 if (lvalue[0] !== lhs) return true;
3493 function side_effects_external(node, lhs) { argument
3497 if (lhs) {
4178 var lhs = expr.left;
4179 if (!(lhs instanceof AST_SymbolRef)) break;
4180 if (is_undeclared_ref(lhs)) break;
4181 if (lhs.scope.resolve() !== scope) break;
4182 var def = lhs.definition();
4186 var name = make_node(AST_SymbolVar, lhs);
5159 var lhs = this.left;
5161 if (!(lhs instanceof AST_SymbolRef)) return this;
5162 if (!HOP(lhs, "_eval")) {
5163 if (!lhs.fixed) return this;
5164 var def = lhs.definition();
5167 if (def.last_ref !== lhs) return this;
5174 … if (!HOP(lhs, "_eval") && lhs instanceof AST_SymbolRef && lhs.fixed && lhs.definition().fixed) {
5175 node = lhs;
5181 left: lhs,
5185 lhs.walk(scan_modified);
5188 modified(lhs);
5812 var lhs = this.left;
5813 if (!(lhs instanceof AST_PropAccess)) return true;
5814 var node = lhs.expression;
5817 || lhs instanceof AST_Sub && lhs.property.has_side_effects(compressor)
6364 var lhs = node.left;
6366 if (lhs instanceof AST_Destructured) {
6368 walk_destructured(AST_SymbolRef, mark, lhs);
6372 lhs.walk(tw);
6375 if (lhs instanceof AST_SymbolRef) mark(lhs);
6379 if (lhs instanceof AST_SymbolRef) {
6380 if (node.operator != "=") mark(lhs, true);
6382 mark(lhs);
6713 function walk_destructured(symbol_type, mark, lhs) { argument
6741 lhs.walk(marker);
7231 var lhs = node.left.drop_side_effect_free(compressor);
7233 return lhs ? make_sequence(node, [ lhs, value ]) : value;
8817 var lhs = left.drop_side_effect_free(compressor, first_in_statement);
8818 if (lhs === left) return this;
8820 node.left = lhs || make_node(AST_Number, left, { value: 0 });
8840 var lhs = left.drop_side_effect_free(compressor, first_in_statement);
8841 if (!lhs) return rhs;
8843 if (!rhs) return lhs;
8844 return make_sequence(this, [ lhs, rhs ]);
9066 var assign, cond, lhs;
9071 && (lhs = assign.left) instanceof AST_SymbolRef
9072 … && (cond = to_conditional_assignment(compressor, lhs.definition(), assign.right, last))) {
10847 var lhs = [];
10850 if (argname) lhs[index] = argname;
10853 if (rest) lhs.length = fn.argnames.length;
10854 fill_holes(fn, lhs);
10858 elements: lhs,
11659 var lhs = extract_lhs(self.left, compressor);
11663 if (lhs instanceof AST_SymbolRef
11666 && lhs.equals(right.left)) {
11667 lhs = lhs.clone();
11670 left: lhs,
11677 if (lhs.fixed) {
11678 lhs.fixed = function() {
11681 lhs.fixed.assigns = [ assign ];
11683 var def = lhs.definition();
11684 def.references.push(lhs);
11759 var lhs = extract_lhs(self.left, compressor);
11760 if (lazy_op[self.operator] && !lhs.has_side_effects(compressor)) {
11763 if (lhs.equals(self.right)) {
11766 mark_duplicate_condition(compressor, lhs);
12098 var lhs = make_binary(self.operator, self.left.left, self.right, {
12102 … self = make_binary(self.left.operator, try_evaluate(compressor, lhs), self.left.right, self);