Hi, 
https://chromium.googlesource.com/v8/v8.git/+/refs/tags/12.0.52/src/compiler/js-typed-lowering.cc#565
How to enter this optimaization path: JSAdd(x:string, y) => JSAdd(x, 
JSToString(y)) or 
JSAdd(x, y:string) => JSAdd(JSToString(x), y)  ?  The code below cannot 
enter this optimazation path, for input type is unknow.

function add2(a, b) {
  return a + b;
}
// should create feedback vector at first, or type info can not collect.
%PrepareFunctionForOptimization(add2);
console.log(add2(1, "hello"));
%OptimizeFunctionOnNextCall(add2);
console.log(add2(2, "world"));

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/ba5e9972-14ce-414b-95c3-55e915b508b9n%40googlegroups.com.

Reply via email to