Chromium Code Reviews| Index: src/compiler/js-create-lowering.cc |
| diff --git a/src/compiler/js-create-lowering.cc b/src/compiler/js-create-lowering.cc |
| index 6874f301f7b74b947211e38fd72d40b905c64cac..82ef5fed7c80f5ca4e375187c375cab26d888eb6 100644 |
| --- a/src/compiler/js-create-lowering.cc |
| +++ b/src/compiler/js-create-lowering.cc |
| @@ -762,12 +762,17 @@ Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) { |
| Node* function_map = jsgraph()->HeapConstant( |
| handle(Map::cast(native_context()->get(function_map_index)), isolate())); |
| + FeedbackVectorSlot slot = p.feedback().slot(); |
| + Node* literals = jsgraph()->HeapConstant( |
| + handle(LiteralsArray::cast(p.feedback().vector()->Get(slot)), isolate())); |
| + |
| // Note that it is only safe to embed the raw entry point of the compile |
| // lazy stub into the code, because that stub is immortal and immovable. |
| Node* compile_entry = jsgraph()->PointerConstant( |
| jsgraph()->isolate()->builtins()->CompileLazy()->entry()); |
| Node* empty_fixed_array = jsgraph()->EmptyFixedArrayConstant(); |
| - Node* empty_literals_array = jsgraph()->EmptyLiteralsArrayConstant(); |
| + // TODO(mvstanton): With literals retrieved from the vector, we can |
| + // remove EmptyLiteralsArrayConstant() from jsgraph(). |
|
Benedikt Meurer
2017/01/11 05:11:21
Nit: Address this TODO in this CL.
mvstanton
2017/01/11 06:47:44
Done.
|
| Node* the_hole = jsgraph()->TheHoleConstant(); |
| Node* undefined = jsgraph()->UndefinedConstant(); |
| AllocationBuilder a(jsgraph(), effect, control); |
| @@ -776,7 +781,7 @@ Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) { |
| a.Store(AccessBuilder::ForMap(), function_map); |
| a.Store(AccessBuilder::ForJSObjectProperties(), empty_fixed_array); |
| a.Store(AccessBuilder::ForJSObjectElements(), empty_fixed_array); |
| - a.Store(AccessBuilder::ForJSFunctionLiterals(), empty_literals_array); |
| + a.Store(AccessBuilder::ForJSFunctionLiterals(), literals); |
| a.Store(AccessBuilder::ForJSFunctionPrototypeOrInitialMap(), the_hole); |
| a.Store(AccessBuilder::ForJSFunctionSharedFunctionInfo(), shared); |
| a.Store(AccessBuilder::ForJSFunctionContext(), context); |