1
0
Fork 0

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
Mike Gerwitz 2014-03-28 23:46:35 -04:00
parent dd0b632274
commit de9cc8f66f
3 changed files with 16 additions and 35 deletions

View File

@ -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,8 +354,6 @@ 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.buildMembers( props,
this._classId, this._classId,
base, base,
@ -374,19 +369,6 @@ exports.prototype.build = function extend( _, __ )
return new_class.___$$svis$$; return new_class.___$$svis$$;
} }
); );
}
catch ( e )
{
// intercept warnings /only/
if ( e instanceof Warning )
{
warn.handle( e );
}
else
{
throw e;
}
}
// 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;

View File

@ -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' ]
; ;

View File

@ -79,7 +79,7 @@ exports.prototype.end = function( 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}
*/ */