Looking good. The only two issues are handlification in deoptimizer.cc and a
different choke-point in the compiler.cc file.


https://codereview.chromium.org/23444029/diff/1/src/compiler.cc
File src/compiler.cc (right):

https://codereview.chromium.org/23444029/diff/1/src/compiler.cc#newcode883
src/compiler.cc:883:
info->context()->native_context()->AddOptimizedCode(*code);
This is a bad choking point to add code to the weak list for two
reasons:
1) The name of this function implies that it only deals with the
optimized code map, and nothing else.
2) One of the two call-sites (i.e. Compiler::InstallOptimizedCode)
actually only calls it if there is not yet another optimized code object
for the same native context in the optimize code map.

Can we hoist this out to the two call-sites and leave this method
untouched?

https://codereview.chromium.org/23444029/diff/1/src/deoptimizer.cc
File src/deoptimizer.cc (right):

https://codereview.chromium.org/23444029/diff/1/src/deoptimizer.cc#newcode419
src/deoptimizer.cc:419: DeoptimizeMarkedCodeForContext(native_context);
Since DeoptimizeMarkedCodeForContext() might cause a GC, all raw pointer
here (i.e. native_context) might actually be stale. Better handlify this
function and the "context" argument to DeoptimizeMarkedCodeForContext()
as well.

https://codereview.chromium.org/23444029/diff/1/src/deoptimizer.cc#newcode434
src/deoptimizer.cc:434: DeoptimizeMarkedCodeForContext(native_context);
Likewise.

https://codereview.chromium.org/23444029/diff/1/src/deoptimizer.cc#newcode450
src/deoptimizer.cc:450: DeoptimizeMarkedCodeForContext(native_context);
Likewise.

https://codereview.chromium.org/23444029/diff/1/src/deoptimizer.cc#newcode477
src/deoptimizer.cc:477:
DeoptimizeMarkedCodeForContext(function->context()->native_context());
Likewise.

https://codereview.chromium.org/23444029/diff/1/src/deoptimizer.cc#newcode702
src/deoptimizer.cc:702: // count all entries in the deoptimizing code
list of every context.
nit: Capitalize sentence.

https://codereview.chromium.org/23444029/diff/1/src/mark-compact.cc
File src/mark-compact.cc (right):

https://codereview.chromium.org/23444029/diff/1/src/mark-compact.cc#newcode3454
src/mark-compact.cc:3454: // Update the heads of the native contexts
list the code to deoptimize list.
nit: Comment is outdated.

https://codereview.chromium.org/23444029/diff/1/src/objects.h
File src/objects.h (right):

https://codereview.chromium.org/23444029/diff/1/src/objects.h#newcode7131
src/objects.h:7131: // uses this link to chain together flushing
candidates. Treatly weakly
nit: s/Treatly/Treated/

https://codereview.chromium.org/23444029/

--
--
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