Removed unneeded warning handling
This removes warning references and, more importantly, a rather encompasing try/catch block that would prohibit optimizations in engines like v8 (at least at the time of writing).perfodd
parent
dd0b632274
commit
de9cc8f66f
|
@ -25,9 +25,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var util = require( __dirname + '/util' ),
|
var util = require( __dirname + '/util' ),
|
||||||
warn = require( __dirname + '/warn' ),
|
|
||||||
Warning = warn.Warning,
|
|
||||||
|
|
||||||
hasOwn = Object.prototype.hasOwnProperty,
|
hasOwn = Object.prototype.hasOwnProperty,
|
||||||
|
|
||||||
|
|
||||||
|
@ -357,36 +354,21 @@ exports.prototype.build = function extend( _, __ )
|
||||||
|
|
||||||
// build the various class components (XXX: this is temporary; needs
|
// build the various class components (XXX: this is temporary; needs
|
||||||
// refactoring)
|
// refactoring)
|
||||||
try
|
this.buildMembers( props,
|
||||||
{
|
this._classId,
|
||||||
this.buildMembers( props,
|
base,
|
||||||
this._classId,
|
prop_init,
|
||||||
base,
|
|
||||||
prop_init,
|
|
||||||
{
|
|
||||||
all: members,
|
|
||||||
'abstract': abstract_methods,
|
|
||||||
'static': static_members,
|
|
||||||
'virtual': virtual_members,
|
|
||||||
},
|
|
||||||
function( inst )
|
|
||||||
{
|
|
||||||
return new_class.___$$svis$$;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
catch ( e )
|
|
||||||
{
|
|
||||||
// intercept warnings /only/
|
|
||||||
if ( e instanceof Warning )
|
|
||||||
{
|
{
|
||||||
warn.handle( e );
|
all: members,
|
||||||
}
|
'abstract': abstract_methods,
|
||||||
else
|
'static': static_members,
|
||||||
|
'virtual': virtual_members,
|
||||||
|
},
|
||||||
|
function( inst )
|
||||||
{
|
{
|
||||||
throw e;
|
return new_class.___$$svis$$;
|
||||||
}
|
}
|
||||||
}
|
);
|
||||||
|
|
||||||
// reference to the parent prototype (for more experienced users)
|
// reference to the parent prototype (for more experienced users)
|
||||||
prototype.___$$parent$$ = base.prototype;
|
prototype.___$$parent$$ = base.prototype;
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var util = require( __dirname + '/util' ),
|
var util = require( __dirname + '/util' ),
|
||||||
Warning = require( __dirname + '/warn' ).Warning,
|
|
||||||
visibility = [ 'public', 'protected', 'private' ]
|
visibility = [ 'public', 'protected', 'private' ]
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -76,10 +76,10 @@ exports.prototype.end = function( state )
|
||||||
/**
|
/**
|
||||||
* Enqueue warning within validation state
|
* Enqueue warning within validation state
|
||||||
*
|
*
|
||||||
* @param {Object} state validation state
|
* @param {Object} state validation state
|
||||||
* @param {string} member member name
|
* @param {string} member member name
|
||||||
* @param {string} id warning identifier
|
* @param {string} id warning identifier
|
||||||
* @param {Warning} warn warning
|
* @param {Error} warn warning
|
||||||
*
|
*
|
||||||
* @return {undefined}
|
* @return {undefined}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue