Skip to content

Instantly share code, notes, and snippets.

@P0lip
Created May 2, 2017 07:06
Show Gist options
  • Save P0lip/13fb3cf7c7cba5a383245bb2891c5f71 to your computer and use it in GitHub Desktop.
Save P0lip/13fb3cf7c7cba5a383245bb2891c5f71 to your computer and use it in GitHub Desktop.
function add(a, b) {
return a + b;
}
// 1. IC feedback unitialized
add(23, 44);
// 2. now it's pre-monomorphic
add(2, 88);
// let’s optimize 'add' on its next call
%OptimizeFunctionOnNextCall(add);
add(2, 7); // now we call our optimized function, feedback has been collected, let's see whether we can retrieve some deopts reason.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment