reducing the number of symbol construction; we were making a symbol per structure instance, which isn't smart.

This commit is contained in:
Danny Yoo 2012-01-19 15:26:22 -05:00
parent 9ed5898c1f
commit f6b2132973

View File

@ -179,7 +179,8 @@
}; };
RawConstructor.prototype = baselib.heir(parentType.type.prototype); RawConstructor.prototype = baselib.heir(parentType.type.prototype);
var theNameSymbol =
baselib.symbols.Symbol.makeInstance(theName);
// Set type, necessary for equality checking // Set type, necessary for equality checking
RawConstructor.prototype.type = RawConstructor; RawConstructor.prototype.type = RawConstructor;
@ -214,7 +215,7 @@
function (args) { function (args) {
return newType.applyGuard( return newType.applyGuard(
args, args,
baselib.symbols.Symbol.makeInstance(theName), theNameSymbol,
constructAfterGuard); constructAfterGuard);
}, },