Skip to content

Instantly share code, notes, and snippets.

@gskachkov
Created July 22, 2015 20:42
Show Gist options
  • Save gskachkov/c78654184666d24ac121 to your computer and use it in GitHub Desktop.
Save gskachkov/c78654184666d24ac121 to your computer and use it in GitHub Desktop.
JSC
/Users/Developer/Projects/Webkit2/WebKitBuild/af_rebase3/Debug/jsc --useFTLJIT\=false --enableFunctionDotArguments\=true --validateGraph\=true --useFTLJIT\=true --ftlCrashesIfCantInitializeLLVM\=true --enableConcurrentJIT\=false --thresholdForJITAfterWarmUp\=100 --thresholdForJITAfterWarmUp\=10 --thresholdForJITSoon\=10 --thresholdForOptimizeAfterWarmUp\=20 --thresholdForOptimizeAfterLongWarmUp\=20 --thresholdForOptimizeSoon\=20 --thresholdForFTLOptimizeAfterWarmUp\=20 --thresholdForFTLOptimizeSoon\=20 --maximumEvalCacheableSourceLength\=150000 -i
@gskachkov
Copy link
Author

var obj = { name:'obj', method: function () {
var f = (value) => this.name + "-name-" + value;
noInline(f);
return f; }
};
var f = obj.method();
debug('1')
for(var i=0;i<10;i++) f();// OK
debug('2')
for(var i=0;i<100;i++) f();// OK
debug('3')
for(var i=0;i<1000;i++) f();// OK
debug('4')
for(var i=0;i<10000;i++) f();// OK
debug('5')
for(var i=0;i<100000;i++) f();// OK

@gskachkov
Copy link
Author

var obj = {
name:'obj',
method: function () {
var f = (value) => this.name + "-name-" + value;
return f;
}
};

noInline(obj.method);

debug('1')
for(var i=0;i<10;i++) obj.method()();
debug('2')
for(var i=0;i<100;i++) obj.method()();
debug('3')
for(var i=0;i<1000;i++) obj.method()();// Exception - Trace/BPT trap: 5
debug('4')
for(var i=0;i<10000;i++) obj.method()();
debug('5')
for(var i=0;i<100000;i++) obj.method()();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment