Skip to content

Commit

Permalink
Remove guard and guardedHandlers properties from try/catch nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Oct 9, 2015
1 parent d956017 commit 1ecae1a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/loose/statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ lp.parseStatement = function() {
this.expect(tt.parenL)
clause.param = this.toAssignable(this.parseExprAtom(), true)
this.expect(tt.parenR)
clause.guard = null
clause.body = this.parseBlock()
node.handler = this.finishNode(clause, "CatchClause")
}
Expand Down
2 changes: 0 additions & 2 deletions src/statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,9 @@ pp.parseTryStatement = function(node) {
clause.param = this.parseBindingAtom()
this.checkLVal(clause.param, true)
this.expect(tt.parenR)
clause.guard = null
clause.body = this.parseBlock()
node.handler = this.finishNode(clause, "CatchClause")
}
node.guardedHandlers = empty
node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
if (!node.handler && !node.finalizer)
this.raise(node.start, "Missing catch or finally clause")
Expand Down
1 change: 0 additions & 1 deletion test/compare/esprima.js
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,6 @@
finishTryStatement: function (block, handler, finalizer) {
this.type = Syntax.TryStatement;
this.block = block;
this.guardedHandlers = [];
this.handlers = handler ? [ handler ] : [];
this.handler = handler;
this.finalizer = finalizer;
Expand Down
1 change: 0 additions & 1 deletion test/tests-harmony.js
Original file line number Diff line number Diff line change
Expand Up @@ -14769,7 +14769,6 @@ test("try {} catch ({message}) {}", {
}
}]
},
guard: null,
body: {
type: "BlockStatement",
range: [25, 27],
Expand Down
6 changes: 0 additions & 6 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -22066,7 +22066,6 @@ test("try { } catch (e) { }", {
}
}
},
guard: null,
body: {
type: "BlockStatement",
body: [],
Expand Down Expand Up @@ -22154,7 +22153,6 @@ test("try { } catch (eval) { }", {
}
}
},
guard: null,
body: {
type: "BlockStatement",
body: [],
Expand Down Expand Up @@ -22242,7 +22240,6 @@ test("try { } catch (arguments) { }", {
}
}
},
guard: null,
body: {
type: "BlockStatement",
body: [],
Expand Down Expand Up @@ -22330,7 +22327,6 @@ test("try { } catch (e) { say(e) }", {
}
}
},
guard: null,
body: {
type: "BlockStatement",
body: [
Expand Down Expand Up @@ -22632,7 +22628,6 @@ test("try { doThat(); } catch (e) { say(e) }", {
}
}
},
guard: null,
body: {
type: "BlockStatement",
body: [
Expand Down Expand Up @@ -22819,7 +22814,6 @@ test("try { doThat(); } catch (e) { say(e) } finally { cleanup(stuff) }", {
}
}
},
guard: null,
body: {
type: "BlockStatement",
body: [
Expand Down

0 comments on commit 1ecae1a

Please sign in to comment.