You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var t = debug.assert;
t( Function.prototype.hasOwnProperty('apply') );
var a = 0;
function fun1() {
a += 10;
}
fun1();
t(a, 10);
fun1 = (function() {
var cached_function = fun1;
return function() {
// code before override goings here
a += 5;
cached_function.apply(this, __args__); // use .apply() to call origial function
// code after override goings here
};
}());
fun1(); // now fun1 is an override function
t(a, 25); // a is 25
- New: Performance improving
- New: New error handling method (#3)
- New: Handle or throw syntax errors at pre-interpret-time
- New: Handle const values at pre-interpret-time
- New: Inner function can cache its outer call-scope (#1)
- New: Inner function can be pre-interpreted (call before define is
available) (#2)
- New: Max call-stack detection added
- New: Minus operator can be used to calculate elapsed milliseconds with
two date objects
- New: IDirectory interface is available to property access and
enumeration (#4)
- New: Information about functions and variables is available after
compiling
- Fixed: Function scope and call-scope has been fixed
- Fixed: Exception caused when array resizing has been fixed
- Changed: .NET IList interface can be accessed directly (DirectAccess
mode is unnecessary)
- Changed: Reform library namespaces
Variables declared in outer function but used in inner function can not be cached so the following code does not work in ReoScript.
The result is that cached_var is null.
The text was updated successfully, but these errors were encountered: