mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
Restoring garbage collection.
This commit is contained in:
18
lib/nodes.js
18
lib/nodes.js
@@ -781,7 +781,7 @@
|
||||
__extends(ObjectLiteral, Base);
|
||||
ObjectLiteral.prototype.children = ['properties'];
|
||||
ObjectLiteral.prototype.compileNode = function(o) {
|
||||
var _i, _len, _len2, _ref2, _ref3, _result, _result2, i, indent, join, lastNoncom, nonComments, obj, prop, props, top;
|
||||
var _i, _len, _ref2, _result, i, indent, join, lastNoncom, nonComments, obj, prop, props, top;
|
||||
top = del(o, 'top');
|
||||
o.indent = this.idt(1);
|
||||
nonComments = (function() {
|
||||
@@ -796,10 +796,10 @@
|
||||
}).call(this);
|
||||
lastNoncom = last(nonComments);
|
||||
props = (function() {
|
||||
_result2 = [];
|
||||
for (i = 0, _len2 = (_ref3 = this.properties).length; i < _len2; i++) {
|
||||
prop = _ref3[i];
|
||||
_result2.push((function() {
|
||||
_result = [];
|
||||
for (i = 0, _len = (_ref2 = this.properties).length; i < _len; i++) {
|
||||
prop = _ref2[i];
|
||||
_result.push((function() {
|
||||
join = i === this.properties.length - 1 ? '' : (prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n');
|
||||
indent = prop instanceof Comment ? '' : this.idt(1);
|
||||
if (prop instanceof Value && prop.tags["this"]) {
|
||||
@@ -810,7 +810,7 @@
|
||||
return indent + prop.compile(o) + join;
|
||||
}).call(this));
|
||||
}
|
||||
return _result2;
|
||||
return _result;
|
||||
}).call(this);
|
||||
props = props.join('');
|
||||
obj = ("{" + (props ? '\n' + props + '\n' + this.idt() : '') + "}");
|
||||
@@ -1123,7 +1123,7 @@
|
||||
__extends(Code, Base);
|
||||
Code.prototype.children = ['params', 'body'];
|
||||
Code.prototype.compileNode = function(o) {
|
||||
var _i, _j, _len, _len2, _len3, _ref2, _ref3, _result, close, code, comm, empty, func, i, open, param, params, sharedScope, splat, top, value;
|
||||
var _i, _len, _len2, _ref2, _ref3, _result, close, code, comm, empty, func, i, open, param, params, sharedScope, splat, top, value;
|
||||
sharedScope = del(o, 'sharedScope');
|
||||
top = del(o, 'top');
|
||||
o.scope = sharedScope || new Scope(o.scope, this.body, this);
|
||||
@@ -1171,8 +1171,8 @@
|
||||
if (!(empty || this.noReturn)) {
|
||||
this.body.makeReturn();
|
||||
}
|
||||
for (_j = 0, _len3 = params.length; _j < _len3; _j++) {
|
||||
param = params[_j];
|
||||
for (_i = 0, _len2 = params.length; _i < _len2; _i++) {
|
||||
param = params[_i];
|
||||
(o.scope.parameter(param));
|
||||
}
|
||||
comm = this.comment ? this.comment.compile(o) + '\n' : '';
|
||||
|
||||
Reference in New Issue
Block a user