Skip to content

Commit

Permalink
Address some low-hanging TODOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Oct 5, 2013
1 parent 6bb6db5 commit 0606fed
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/emit.js
Expand Up @@ -215,7 +215,7 @@ Ep.getDispatchLoop = function() {
alreadyEnded = false;
}

if (true || !alreadyEnded) {
if (!alreadyEnded) {
current.push(stmt);
if (isSwitchCaseEnder(stmt))
alreadyEnded = true;
Expand Down Expand Up @@ -670,7 +670,6 @@ Ep.popCatch = function(catchEntry) {
// now, emitting context.popCatch(null) is good for sanity checking.

this.emit(b.callExpression(
// TODO Remember to implement this runtime context method.
this.contextProperty("popCatch"),
[catchLoc]
));
Expand All @@ -695,7 +694,6 @@ Ep.popFinally = function(finallyEntry) {
// checking.

this.emit(b.callExpression(
// TODO Remember to implement this runtime context method.
this.contextProperty("popFinally"),
[finallyLoc]
));
Expand All @@ -709,6 +707,7 @@ Ep.explodeExpression = function(expr, ignoreResult) {
}

var self = this;
var result; // Used optionally by several cases below.

function finish(expr) {
n.Expression.assert(expr);
Expand Down Expand Up @@ -813,7 +812,6 @@ Ep.explodeExpression = function(expr, ignoreResult) {
case "SequenceExpression":
var children = expr.expressions;
var lastIndex = children.length - 1;
var result;

children.forEach(function(child, i) {
if (i === lastIndex) {
Expand All @@ -827,7 +825,6 @@ Ep.explodeExpression = function(expr, ignoreResult) {

case "LogicalExpression":
var after = loc();
var result;

if (!ignoreResult) {
result = self.makeTempVar();
Expand All @@ -851,12 +848,10 @@ Ep.explodeExpression = function(expr, ignoreResult) {
var elseLoc = loc();
var after = loc();
var test = self.explodeExpression(expr.test);
var result; // TODO Hoist?

self.jumpIfNot(test, elseLoc);

if (!ignoreResult) {
// TODO Maybe hoist this above the switch statement?
result = self.makeTempVar();
}

Expand Down

0 comments on commit 0606fed

Please sign in to comment.