Index: src/compiler/js-generic-lowering.cc |
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc |
index de167226ee5217847ff946f749c3841e066457bc..f39d8cda0a6713a8fef097cdb9b1219499bade17 100644 |
--- a/src/compiler/js-generic-lowering.cc |
+++ b/src/compiler/js-generic-lowering.cc |
@@ -159,14 +159,13 @@ void JSGenericLowering::LowerJSLoadProperty(Node* node) { |
Callable callable = |
CodeFactory::KeyedLoadICInOptimizedCode(isolate(), UNINITIALIZED); |
// Load the type feedback vector from the closure. |
- Node* shared_info = effect = graph()->NewNode( |
+ Node* literals = effect = graph()->NewNode( |
machine()->Load(MachineType::AnyTagged()), closure, |
- jsgraph()->IntPtrConstant(JSFunction::kSharedFunctionInfoOffset - |
- kHeapObjectTag), |
+ jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), |
effect, control); |
Node* vector = effect = graph()->NewNode( |
- machine()->Load(MachineType::AnyTagged()), shared_info, |
- jsgraph()->IntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - |
+ machine()->Load(MachineType::AnyTagged()), literals, |
+ jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - |
kHeapObjectTag), |
effect, control); |
node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); |
@@ -185,14 +184,13 @@ void JSGenericLowering::LowerJSLoadNamed(Node* node) { |
Callable callable = CodeFactory::LoadICInOptimizedCode( |
isolate(), NOT_INSIDE_TYPEOF, UNINITIALIZED); |
// Load the type feedback vector from the closure. |
- Node* shared_info = effect = graph()->NewNode( |
+ Node* literals = effect = graph()->NewNode( |
machine()->Load(MachineType::AnyTagged()), closure, |
- jsgraph()->IntPtrConstant(JSFunction::kSharedFunctionInfoOffset - |
- kHeapObjectTag), |
+ jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), |
effect, control); |
Node* vector = effect = graph()->NewNode( |
- machine()->Load(MachineType::AnyTagged()), shared_info, |
- jsgraph()->IntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - |
+ machine()->Load(MachineType::AnyTagged()), literals, |
+ jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - |
kHeapObjectTag), |
effect, control); |
node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); |
@@ -213,14 +211,13 @@ void JSGenericLowering::LowerJSLoadGlobal(Node* node) { |
Callable callable = CodeFactory::LoadICInOptimizedCode( |
isolate(), p.typeof_mode(), UNINITIALIZED); |
// Load the type feedback vector from the closure. |
- Node* shared_info = effect = graph()->NewNode( |
+ Node* literals = effect = graph()->NewNode( |
machine()->Load(MachineType::AnyTagged()), closure, |
- jsgraph()->IntPtrConstant(JSFunction::kSharedFunctionInfoOffset - |
- kHeapObjectTag), |
+ jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), |
effect, control); |
Node* vector = effect = graph()->NewNode( |
- machine()->Load(MachineType::AnyTagged()), shared_info, |
- jsgraph()->IntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - |
+ machine()->Load(MachineType::AnyTagged()), literals, |
+ jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - |
kHeapObjectTag), |
effect, control); |
// Load global object from the context. |
@@ -252,14 +249,13 @@ void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
Callable callable = CodeFactory::KeyedStoreICInOptimizedCode( |
isolate(), language_mode, UNINITIALIZED); |
// Load the type feedback vector from the closure. |
- Node* shared_info = effect = graph()->NewNode( |
+ Node* literals = effect = graph()->NewNode( |
machine()->Load(MachineType::AnyTagged()), closure, |
- jsgraph()->IntPtrConstant(JSFunction::kSharedFunctionInfoOffset - |
- kHeapObjectTag), |
+ jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), |
effect, control); |
Node* vector = effect = graph()->NewNode( |
- machine()->Load(MachineType::AnyTagged()), shared_info, |
- jsgraph()->IntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - |
+ machine()->Load(MachineType::AnyTagged()), literals, |
+ jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - |
kHeapObjectTag), |
effect, control); |
node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.feedback().index())); |
@@ -278,14 +274,13 @@ void JSGenericLowering::LowerJSStoreNamed(Node* node) { |
Callable callable = CodeFactory::StoreICInOptimizedCode( |
isolate(), p.language_mode(), UNINITIALIZED); |
// Load the type feedback vector from the closure. |
- Node* shared_info = effect = graph()->NewNode( |
+ Node* literals = effect = graph()->NewNode( |
machine()->Load(MachineType::AnyTagged()), closure, |
- jsgraph()->IntPtrConstant(JSFunction::kSharedFunctionInfoOffset - |
- kHeapObjectTag), |
+ jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), |
effect, control); |
Node* vector = effect = graph()->NewNode( |
- machine()->Load(MachineType::AnyTagged()), shared_info, |
- jsgraph()->IntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - |
+ machine()->Load(MachineType::AnyTagged()), literals, |
+ jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - |
kHeapObjectTag), |
effect, control); |
node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); |
@@ -306,14 +301,13 @@ void JSGenericLowering::LowerJSStoreGlobal(Node* node) { |
Callable callable = CodeFactory::StoreICInOptimizedCode( |
isolate(), p.language_mode(), UNINITIALIZED); |
// Load the type feedback vector from the closure. |
- Node* shared_info = effect = graph()->NewNode( |
+ Node* literals = effect = graph()->NewNode( |
machine()->Load(MachineType::AnyTagged()), closure, |
- jsgraph()->IntPtrConstant(JSFunction::kSharedFunctionInfoOffset - |
- kHeapObjectTag), |
+ jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), |
effect, control); |
Node* vector = effect = graph()->NewNode( |
- machine()->Load(MachineType::AnyTagged()), shared_info, |
- jsgraph()->IntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - |
+ machine()->Load(MachineType::AnyTagged()), literals, |
+ jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - |
kHeapObjectTag), |
effect, control); |
// Load global object from the context. |
@@ -487,7 +481,7 @@ void JSGenericLowering::LowerJSCreateClosure(Node* node) { |
// Use the FastNewClosureStub that allocates in new space only for nested |
// functions that don't need literals cloning. |
Michael Starzinger
2016/05/10 13:47:20
nit: Last part of the comment is outdated. Better
mvstanton
2016/05/24 16:31:49
Done.
|
- if (p.pretenure() == NOT_TENURED && shared_info->num_literals() == 0) { |
+ if (p.pretenure() == NOT_TENURED) { |
Callable callable = CodeFactory::FastNewClosure( |
isolate(), shared_info->language_mode(), shared_info->kind()); |
ReplaceWithStubCall(node, callable, flags); |