Commit ac8318e2 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [compiler] Mark shared functions for optimization.

  port 4a31323e (r40506)

  original commit message:
  The current method of marking functions for optimization, which replaces
  the JSFunction's code object with one that triggers optimization, would
  never allow unnamed functions to be optimized. This is an issue for a
  style of programming which heavily relies on passing around closures.

  This patch sets a bit on the SharedFunctionInfo when a JSFunction is
  marked. When another JSFunction referring to the same SharedFunctionInfo
  is lazily compiled, it immediately triggers a non-concurrent optimize.

BUG=

Review-Url: https://codereview.chromium.org/2439393002
Cr-Commit-Position: refs/heads/master@{#40520}
parent a58d7907
......@@ -1163,7 +1163,7 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
__ pop(argument_count);
__ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset));
// Is the shared function marked for optimization?
__ testb(
__ test_b(
FieldOperand(entry,
SharedFunctionInfo::kWasMarkedForOptimizationByteOffset),
Immediate(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment