Lines Matching full:if

39     THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
67 if (this.mangled_name) return;
69 if (cache && cache.has(this.name)) {
71 } else if (this.unmangleable(options)) {
75 if (def) {
80 if (cache) cache.set(this.name, this.mangled_name);
86 if (!scope) return;
93 if (def && def !== self) return def.redefined() || def;
96 if (this.exported) return true;
97 if (this.undeclared) return true;
98 if (!options.eval && this.scope.pinned()) return true;
99 if (options.keep_fargs && is_funarg(this)) return true;
100 if (options.keep_fnames) {
102 if (sym instanceof AST_SymbolClass) return true;
103 if (sym instanceof AST_SymbolDefClass) return true;
104 if (sym instanceof AST_SymbolDefun) return true;
105 if (sym instanceof AST_SymbolLambda) return true;
107 if (!options.toplevel && this.global) return true;
128 if (parent instanceof AST_Assign) return parent.left === node && node;
129 if (parent instanceof AST_DefaultValue) return parent.name === node && node;
130 if (parent instanceof AST_Destructured) return node;
131 if (parent instanceof AST_DestructuredKeyVal) return node;
132 if (parent instanceof AST_ForEnumeration) return parent.init === node && node;
133if (parent instanceof AST_Unary) return unary_side_effects[parent.operator] && parent.expression;
149 if (node instanceof AST_DefClass) {
155 if (node.extends) node.extends.walk(tw);
162 if (node instanceof AST_Definitions) {
169 if (node instanceof AST_LambdaDefinition) {
178 if (node.rest) node.rest.walk(tw);
183 if (node instanceof AST_SwitchBranch) {
188 if (node instanceof AST_Try) {
192 if (node.bcatch) node.bcatch.walk(tw);
193 if (node.bfinally) node.bfinally.walk(tw);
196 if (node instanceof AST_With) {
200 if (s.uses_with) break;
206 if (node instanceof AST_BlockScope) {
210 if (node instanceof AST_Symbol) {
213 if (node instanceof AST_Label) {
217 if (node instanceof AST_SymbolCatch) {
219 } else if (node instanceof AST_SymbolConst) {
222 if (exported) def.exported = true;
223 } else if (node instanceof AST_SymbolDefun) {
225 if (exported) def.exported = true;
226 } else if (node instanceof AST_SymbolFunarg) {
228 } else if (node instanceof AST_SymbolLambda) {
230 if (options.ie && node.name != "arguments") def.defun = defun.parent_scope.resolve();
231 } else if (node instanceof AST_SymbolLet) {
233 if (exported) def.exported = true;
234 } else if (node instanceof AST_SymbolVar) {
236 if (exported) def.exported = true;
243 if (node instanceof AST_Scope) defun = node;
259 if (node instanceof AST_Catch) {
260 if (!(node.argname instanceof AST_Destructured)) return;
267 if (node instanceof AST_Lambda) {
269 if (node.name) node.name.walk(tw);
273 if (node.rest) node.rest.walk(tw);
278 if (node instanceof AST_LoopControl) {
279 if (node.label) node.label.thedef.references.push(node);
282 if (node instanceof AST_SymbolDeclaration) {
285 if (node instanceof AST_SymbolCatch) {
286 // ensure mangling works if `catch` reuses a scope variable
288 if (redef) for (var s = node.scope; s; s = s.parent_scope) {
289 if (!push_uniq(s.enclosed, redef)) break;
290 if (s === redef.scope) break;
292 } else if (node instanceof AST_SymbolConst) {
293 // ensure compression works if `const` reuses a scope variable
295 if (redef) redef.const_redefs = true;
296 } else if (def.scope !== node.scope && (node instanceof AST_SymbolDefun
301 if (node.thedef !== redef) {
307 if (node.name != "arguments") return true;
309 if (parent instanceof AST_VarDef && !parent.value) return true;
311 if (sym && is_arguments(sym)) sym.scope.uses_arguments = 3;
314 if (node instanceof AST_SymbolRef) {
319 if (i < 0) break;
321 if (decl instanceof AST_SymbolCatch
329 if (!sym) {
331 } else if (name == "arguments" && is_arguments(sym)) {
333 if (is_lhs(node, parent)) {
335 } else if (sym.scope.uses_arguments < 2
338 } else if (!sym.scope.uses_arguments) {
342 if (name == "eval") {
344 if (parent.TYPE == "Call" && parent.expression === node) {
348 if (s.uses_eval) break;
351 } else if (sym.undeclared) {
355 if (sym.init instanceof AST_LambdaDefinition && sym.scope !== sym.init.name.scope) {
358 if (scope === sym.init.name.scope) break;
360 if (!scope) sym.init = undefined;
370 if (options.ie) self.walk(new TreeWalker(function(node) {
371 if (node instanceof AST_SymbolCatch) {
374if (def.name != "arguments" && scope.name instanceof AST_SymbolLambda && scope.name.name == def.na…
380 if (node instanceof AST_SymbolLambda) {
382 if (!redefine(node, node.scope.parent_scope.resolve())) {
384 } else if (typeof node.thedef.init !== "undefined") {
386 } else if (def.init) {
402 if (!all(old_def.orig, function(sym) {
406 if (new_def) {
408 if (redef) new_def = redef;
412 if (new_def) {
417 if (new_def.undeclared) self.variables.set(name, new_def);
418if (name == "arguments" && is_arguments(old_def) && node instanceof AST_SymbolLambda) return true;
431 if (globals.has(name)) {
444 …scope.parent_scope = parent; // the parent scope (null if this is the top level)
447 if (parent) scope.make_def = parent.make_def; // top-level tracking of SymbolDef instances
452 …scope.uses_eval = false; // will be set to true if this or nested scope use…
453 …scope.uses_with = false; // will be set to true if this or some nested scop…
484 if (!push_uniq(s.enclosed, def)) break;
485 if (!options) {
488 if (options.keep_fargs && s instanceof AST_Lambda) s.each_argname(function(arg) {
491 if (options.keep_fnames) s.functions.each(function(d) {
495 if (s === def.scope) break;
511 if (!def.init || def.init instanceof AST_LambdaDefinition) def.init = init;
518 if (def) {
520 if (def.init instanceof AST_LambdaExpression) def.init = init;
531 if (!names) {
537 if (def.unmangleable(options)) names.set(def.name, true);
538 if (def.global && cache && cache.has(def.name)) {
555 if (member(scope, scopes)) break;
565 if (names.has(name)) continue;
572 if (in_use.has(name) || RESERVED_WORDS[name] || options.reserved.has[name]) continue;
573 if (!names.has(name)) break;
603 if (!Array.isArray(options.reserved)) options.reserved = [];
611 // generator will display the mangled name if it is present (and for
616 if (options.cache && options.cache.props) {
627 if (node instanceof AST_BlockScope) {
629 if (node instanceof AST_LabeledStatement) save_nesting = lname;
630if (options.webkit && node instanceof AST_IterationStatement && node.init instanceof AST_Let) {
633 if (!(sym instanceof AST_SymbolLet)) return;
647 if (!defer_redef(def)) to_mangle.push(def);
650 if (options.cache && node instanceof AST_Toplevel) {
653 if (node instanceof AST_Defun && tw.has_directive("use asm")) {
658 if (to_mangle.length > cutoff) {
675if (node instanceof AST_LabeledStatement && !(options.v8 && in_label(tw))) lname = save_nesting;
678 if (node instanceof AST_Label) {
691 if (options.reserved.has[def.name]) return;
698 if (!redef) {
699 if (!(sym instanceof AST_SymbolConst)) return false;
701 if (def.scope === scope) return false;
702 if (def.scope.parent_scope.find_variable(sym.name)) return false;
708 if (sym instanceof AST_SymbolCatch || sym instanceof AST_SymbolConst) {
726if (parent instanceof AST_Block) return parent instanceof AST_Toplevel && !options.toplevel;
727 if (parent instanceof AST_LabeledStatement) return true;
738 if (node instanceof AST_BlockScope) node.variables.each(add_def);
748 if (def.global && cache && cache.has(name)) name = cache.get(name);
749 else if (!def.unmangleable(options)) return;
762 if (node instanceof AST_BlockScope) node.variables.each(rename);
774 if (def.global && options.cache) return;
775 if (def.unmangleable(options)) return;
776 if (options.reserved.has[def.name]) return;
781 if (sym.definition() === def) sym.name = name;
797 if (!this.unmangleable(options)) base54.consider(this.name, -1);
799 if (options.properties) {
816 if (node instanceof AST_String) {
818 } else if (node instanceof AST_Conditional) {
821 } else if (node instanceof AST_Sequence) {