|
[TypeFeedbackVector] Root literal arrays in function literals slots
Literal arrays and feedback vectors for a function can be garbage
collected if we don't have a rooted closure for the function, which
happens often. It's expensive to come back from this (recreating
boilerplates and gathering feedback again), and the cost is
disproportionate if the function was inlined into optimized code.
To guard against losing these arrays when we need them, we'll now
create literal arrays when creating the feedback vector for the outer
closure, and root them strongly in that vector.
BUG= v8:5456
Review-Url: https://codereview.chromium.org/2504153002
Cr-Commit-Position: refs/heads/master@{#41893}
Committed: https://chromium.googlesource.com/v8/v8/+/93df094081f04c629c3df2e40318de90ce5e0fb9
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+737 lines, -664 lines) |
Patch |
|
M |
src/arm/interface-descriptors-arm.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/arm64/interface-descriptors-arm64.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/ast/ast.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
4 chunks |
+27 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ast/ast-numbering.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/builtins/arm/builtins-arm.cc
|
View
|
1
2
3
4
5
|
4 chunks |
+2 lines, -17 lines |
0 comments
|
Download
|
|
M |
src/builtins/arm64/builtins-arm64.cc
|
View
|
1
2
3
4
5
|
4 chunks |
+2 lines, -14 lines |
0 comments
|
Download
|
|
M |
src/builtins/ia32/builtins-ia32.cc
|
View
|
1
2
3
4
|
4 chunks |
+2 lines, -17 lines |
0 comments
|
Download
|
|
M |
src/builtins/mips/builtins-mips.cc
|
View
|
1
2
3
4
5
|
4 chunks |
+2 lines, -17 lines |
0 comments
|
Download
|
|
M |
src/builtins/mips64/builtins-mips64.cc
|
View
|
1
2
3
4
5
|
4 chunks |
+2 lines, -17 lines |
0 comments
|
Download
|
|
M |
src/builtins/x64/builtins-x64.cc
|
View
|
1
2
3
4
|
4 chunks |
+2 lines, -14 lines |
0 comments
|
Download
|
|
M |
src/code-stubs.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/code-stubs.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/compiler.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
4 chunks |
+12 lines, -19 lines |
0 comments
|
Download
|
|
M |
src/compiler/ast-graph-builder.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/bytecode-graph-builder.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-create-lowering.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-generic-lowering.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-operator.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/js-operator.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/contexts.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/contexts.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
6 chunks |
+8 lines, -27 lines |
0 comments
|
Download
|
|
M |
src/crankshaft/hydrogen.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+9 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/debug/liveedit.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+75 lines, -31 lines |
0 comments
|
Download
|
|
M |
src/factory.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/factory.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+31 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/flag-definitions.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/full-codegen.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/full-codegen/full-codegen.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+14 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/heap/object-stats.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+0 lines, -20 lines |
0 comments
|
Download
|
|
M |
src/ia32/interface-descriptors-ia32.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/interface-descriptors.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-builder.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-array-builder.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecode-generator.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/interpreter/bytecodes.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/interpreter/interpreter.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+13 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/mips/interface-descriptors-mips.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/mips64/interface-descriptors-mips64.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
7 chunks |
+7 lines, -18 lines |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
8 chunks |
+49 lines, -57 lines |
0 comments
|
Download
|
|
M |
src/objects-inl.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+13 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/objects-printer.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+12 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime-interpreter.cc
|
View
|
1
2
3
4
|
1 chunk |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime-scopes.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+20 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/type-feedback-vector.h
|
View
|
1
2
3
4
5
6
7
8
|
10 chunks |
+44 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/type-feedback-vector.cc
|
View
|
1
2
3
4
5
6
7
|
12 chunks |
+81 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/type-feedback-vector-inl.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+27 lines, -1 line |
0 comments
|
Download
|
|
M |
src/x64/interface-descriptors-x64.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
test/cctest/heap/test-heap.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+3 lines, -208 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
|
View
|
1
2
3
4
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
|
View
|
1
2
3
4
5
6
7
8
9
10
|
18 chunks |
+23 lines, -23 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden
|
View
|
1
2
3
4
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ContextParameters.golden
|
View
|
1
2
3
4
|
5 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
|
View
|
1
2
3
4
|
7 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/CountOperators.golden
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/Delete.golden
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
|
View
|
1
2
3
4
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden
|
View
|
1
2
3
4
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/Modules.golden
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
|
View
|
1
2
3
4
5
6
7
8
9
10
|
9 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
|
M |
test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-feedback-vector.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-heap-profiler.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
A |
test/mjsunit/strong-rooted-literals.js
|
View
|
1
2
3
4
|
1 chunk |
+40 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/unittests/compiler/js-create-lowering-unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+14 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/unittests/interpreter/bytecode-array-builder-unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 67 (53 generated)
|