| 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/compiler/js-generic-lowering.h" | 5 #include "src/compiler/js-generic-lowering.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/builtins/builtins-constructor.h" | 8 #include "src/builtins/builtins-constructor.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 ReplaceWithStubCall(node, callable, flags); | 197 ReplaceWithStubCall(node, callable, flags); |
| 198 } | 198 } |
| 199 | 199 |
| 200 | 200 |
| 201 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 201 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
| 202 Node* receiver = NodeProperties::GetValueInput(node, 0); | 202 Node* receiver = NodeProperties::GetValueInput(node, 0); |
| 203 Node* key = NodeProperties::GetValueInput(node, 1); | 203 Node* key = NodeProperties::GetValueInput(node, 1); |
| 204 Node* value = NodeProperties::GetValueInput(node, 2); | 204 Node* value = NodeProperties::GetValueInput(node, 2); |
| 205 CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 205 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
| 206 PropertyAccess const& p = PropertyAccessOf(node->op()); | 206 PropertyAccess const& p = PropertyAccessOf(node->op()); |
| 207 LanguageMode language_mode = p.language_mode(); | |
| 208 Callable callable = | 207 Callable callable = |
| 209 CodeFactory::KeyedStoreICInOptimizedCode(isolate(), language_mode); | 208 CodeFactory::KeyedStoreICInOptimizedCode(isolate(), p.language_mode()); |
| 210 Node* vector = jsgraph()->HeapConstant(p.feedback().vector()); | 209 Node* vector = jsgraph()->HeapConstant(p.feedback().vector()); |
| 211 typedef StoreWithVectorDescriptor Descriptor; | 210 typedef StoreWithVectorDescriptor Descriptor; |
| 212 node->InsertInputs(zone(), 0, 2); | 211 node->InsertInputs(zone(), 0, 2); |
| 213 node->ReplaceInput(Descriptor::kReceiver, receiver); | 212 node->ReplaceInput(Descriptor::kReceiver, receiver); |
| 214 node->ReplaceInput(Descriptor::kName, key); | 213 node->ReplaceInput(Descriptor::kName, key); |
| 215 node->ReplaceInput(Descriptor::kValue, value); | 214 node->ReplaceInput(Descriptor::kValue, value); |
| 216 node->ReplaceInput(Descriptor::kSlot, | 215 node->ReplaceInput(Descriptor::kSlot, |
| 217 jsgraph()->SmiConstant(p.feedback().index())); | 216 jsgraph()->SmiConstant(p.feedback().index())); |
| 218 node->ReplaceInput(Descriptor::kVector, vector); | 217 node->ReplaceInput(Descriptor::kVector, vector); |
| 219 ReplaceWithStubCall(node, callable, flags); | 218 ReplaceWithStubCall(node, callable, flags); |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 } | 685 } |
| 687 | 686 |
| 688 | 687 |
| 689 MachineOperatorBuilder* JSGenericLowering::machine() const { | 688 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 690 return jsgraph()->machine(); | 689 return jsgraph()->machine(); |
| 691 } | 690 } |
| 692 | 691 |
| 693 } // namespace compiler | 692 } // namespace compiler |
| 694 } // namespace internal | 693 } // namespace internal |
| 695 } // namespace v8 | 694 } // namespace v8 |
| OLD | NEW |