| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); | 325 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); |
| 326 ReplaceWithStubCall(node, callable, flags); | 326 ReplaceWithStubCall(node, callable, flags); |
| 327 } | 327 } |
| 328 } | 328 } |
| 329 | 329 |
| 330 | 330 |
| 331 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 331 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
| 332 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 332 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 333 const StorePropertyParameters& p = StorePropertyParametersOf(node->op()); | 333 const StorePropertyParameters& p = StorePropertyParametersOf(node->op()); |
| 334 LanguageMode language_mode = p.language_mode(); | 334 LanguageMode language_mode = p.language_mode(); |
| 335 // We have a special case where we do keyed stores but don't have a type | |
| 336 // feedback vector slot allocated to support it. In this case, install | |
| 337 // the megamorphic keyed store stub which needs neither vector nor slot. | |
| 338 bool use_vector_slot = FLAG_vector_stores && p.feedback().index() != -1; | |
| 339 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode( | 335 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode( |
| 340 isolate(), language_mode, | 336 isolate(), language_mode, UNINITIALIZED); |
| 341 (use_vector_slot || !FLAG_vector_stores) ? UNINITIALIZED : MEGAMORPHIC); | 337 if (FLAG_vector_stores) { |
| 342 if (use_vector_slot) { | 338 DCHECK(p.feedback().index() != -1); |
| 343 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.feedback().index())); | 339 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.feedback().index())); |
| 344 } else { | 340 } else { |
| 345 node->RemoveInput(3); | 341 node->RemoveInput(3); |
| 346 } | 342 } |
| 347 ReplaceWithStubCall(node, callable, | 343 ReplaceWithStubCall(node, callable, |
| 348 CallDescriptor::kPatchableCallSite | flags); | 344 CallDescriptor::kPatchableCallSite | flags); |
| 349 } | 345 } |
| 350 | 346 |
| 351 | 347 |
| 352 void JSGenericLowering::LowerJSStoreNamed(Node* node) { | 348 void JSGenericLowering::LowerJSStoreNamed(Node* node) { |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 } | 850 } |
| 855 | 851 |
| 856 | 852 |
| 857 MachineOperatorBuilder* JSGenericLowering::machine() const { | 853 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 858 return jsgraph()->machine(); | 854 return jsgraph()->machine(); |
| 859 } | 855 } |
| 860 | 856 |
| 861 } // namespace compiler | 857 } // namespace compiler |
| 862 } // namespace internal | 858 } // namespace internal |
| 863 } // namespace v8 | 859 } // namespace v8 |
| OLD | NEW |