Skip to content

Instantly share code, notes, and snippets.

@icflorescu
Last active December 15, 2015 03:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icflorescu/5198453 to your computer and use it in GitHub Desktop.
Save icflorescu/5198453 to your computer and use it in GitHub Desktop.
IcedCoffeeScript window-scoped runtime, generated with `iced -I window -F -p -e '' > iced-runtime.js`.
(function() {
var __slice = [].slice;
window.iced = {
Deferrals: (function() {
function _Class(_arg) {
this.continuation = _arg;
this.count = 1;
this.ret = null;
}
_Class.prototype._fulfill = function() {
if (!--this.count) {
return this.continuation(this.ret);
}
};
_Class.prototype.defer = function(defer_params) {
var _this = this;
++this.count;
return function() {
var inner_params, _ref;
inner_params = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
if (defer_params != null) {
if ((_ref = defer_params.assign_fn) != null) {
_ref.apply(null, inner_params);
}
}
return _this._fulfill();
};
};
return _Class;
})(),
findDeferral: function() {
return null;
},
trampoline: function(_fn) {
return _fn();
}
};
}).call(this);
@icflorescu
Copy link
Author

iced -I window -F -p -e '' > iced-runtime.js no longer works for IcedCoffeeScript > 1.4.0c.

@icflorescu
Copy link
Author

Thanks to Max's quick fix, iced -I window -F -p -e '' > iced-runtime.js works again in IcedCoffeeScript > 1.6.2d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment