mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-09-10 19:17:52 -04:00
14 lines
283 B
JavaScript
14 lines
283 B
JavaScript
function square(a) {
|
|
let result = a * a;
|
|
return result;
|
|
}
|
|
|
|
// Allocate feedback vector for the function and call it once to record type
|
|
// information.
|
|
%PrepareFunctionForOptimization(square)
|
|
square(23);
|
|
|
|
// Optimize with Turbofan.
|
|
%OptimizeFunctionOnNextCall(square);
|
|
square(71);
|