https://codereview.chromium.org/23201016/diff/1/src/runtime.cc
File src/runtime.cc (right):

https://codereview.chromium.org/23201016/diff/1/src/runtime.cc#newcode8341
src/runtime.cc:8341: Handle<Code>
optimized_code(deoptimizer->compiled_code());
Could we also rename compiled_code() in the deoptimizer to
optimized_code() to make it obvious?

https://codereview.chromium.org/23201016/diff/1/src/runtime.cc#newcode8361
src/runtime.cc:8361: // the code to be reused a few times before
unlinking it from the function.
I'm not fully sure how this would work yet. Is it worthwhile putting
this comment in?

https://codereview.chromium.org/23201016/diff/1/src/runtime.cc#newcode8382
src/runtime.cc:8382: }
Can't we just unconditionally do

Deoptimizer::DeoptimizeFunction(*function);
if (function->code() == *optimized_code) {
  function->ReplaceCode(function->shared()->code());
}

It seems inconsistent that we globally DeoptimizeFunction if there are
activations; but if there are no activations, we just unlink the
function's optimized code (if it's there). What's wrong with just always
unlinking it; and notifying existing stackframes using
DeoptimizeFunction?

(I'd probably replace the last 3 lines in my example with something like
function->DeoptimizeFrom(optimized_code); that internally checks what
code it's using, and replaces it with shared()->code() if it matches).

https://codereview.chromium.org/23201016/diff/1/test/mjsunit/compiler/regress-shared-deopt.js
File test/mjsunit/compiler/regress-shared-deopt.js (right):

https://codereview.chromium.org/23201016/diff/1/test/mjsunit/compiler/regress-shared-deopt.js#newcode38
test/mjsunit/compiler/regress-shared-deopt.js:38: function test() {
2-space indent.

https://codereview.chromium.org/23201016/

--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to