mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
optimizing comprehensions source references
This commit is contained in:
parent
5605ba32e3
commit
d4dac214ab
11 changed files with 70 additions and 86 deletions
|
@ -1,12 +1,12 @@
|
|||
var Animal, Horse, Snake, sam, tom;
|
||||
var __extends = function(child, parent) {
|
||||
var ctor = function(){};
|
||||
ctor.prototype = parent.prototype;
|
||||
child.prototype = new ctor();
|
||||
child.prototype.constructor = child;
|
||||
if (typeof parent.extended === "function") parent.extended(child);
|
||||
child.__super__ = parent.prototype;
|
||||
};
|
||||
var ctor = function() {};
|
||||
ctor.prototype = parent.prototype;
|
||||
child.prototype = new ctor();
|
||||
child.prototype.constructor = child;
|
||||
if (typeof parent.extended === "function") parent.extended(child);
|
||||
child.__super__ = parent.prototype;
|
||||
};
|
||||
Animal = (function() {
|
||||
return function Animal(_arg) {
|
||||
this.name = _arg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue