| 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/graph-inl.h" | 8 #include "src/compiler/graph-inl.h" |
| 9 #include "src/compiler/js-generic-lowering.h" | 9 #include "src/compiler/js-generic-lowering.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 | 268 |
| 269 void JSGenericLowering::LowerJSToObject(Node* node) { | 269 void JSGenericLowering::LowerJSToObject(Node* node) { |
| 270 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); | 270 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); |
| 271 } | 271 } |
| 272 | 272 |
| 273 | 273 |
| 274 void JSGenericLowering::LowerJSLoadProperty(Node* node) { | 274 void JSGenericLowering::LowerJSLoadProperty(Node* node) { |
| 275 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); | 275 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); |
| 276 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(isolate()); | 276 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(isolate()); |
| 277 if (FLAG_vector_ics) { | 277 if (FLAG_vector_ics) { |
| 278 PatchInsertInput(node, 2, | 278 PatchInsertInput(node, 2, jsgraph()->SmiConstant(p.feedback().index())); |
| 279 jsgraph()->SmiConstant(p.feedback().slot().ToInt())); | |
| 280 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); | 279 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); |
| 281 } | 280 } |
| 282 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 281 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
| 283 } | 282 } |
| 284 | 283 |
| 285 | 284 |
| 286 void JSGenericLowering::LowerJSLoadNamed(Node* node) { | 285 void JSGenericLowering::LowerJSLoadNamed(Node* node) { |
| 287 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); | 286 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); |
| 288 Callable callable = | 287 Callable callable = |
| 289 CodeFactory::LoadICInOptimizedCode(isolate(), p.contextual_mode()); | 288 CodeFactory::LoadICInOptimizedCode(isolate(), p.contextual_mode()); |
| 290 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); | 289 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); |
| 291 if (FLAG_vector_ics) { | 290 if (FLAG_vector_ics) { |
| 292 PatchInsertInput(node, 2, | 291 PatchInsertInput(node, 2, jsgraph()->SmiConstant(p.feedback().index())); |
| 293 jsgraph()->SmiConstant(p.feedback().slot().ToInt())); | |
| 294 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); | 292 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); |
| 295 } | 293 } |
| 296 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 294 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
| 297 } | 295 } |
| 298 | 296 |
| 299 | 297 |
| 300 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 298 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
| 301 StrictMode strict_mode = OpParameter<StrictMode>(node); | 299 StrictMode strict_mode = OpParameter<StrictMode>(node); |
| 302 Callable callable = CodeFactory::KeyedStoreIC(isolate(), strict_mode); | 300 Callable callable = CodeFactory::KeyedStoreIC(isolate(), strict_mode); |
| 303 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 301 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 | 400 |
| 403 | 401 |
| 404 void JSGenericLowering::LowerJSCallRuntime(Node* node) { | 402 void JSGenericLowering::LowerJSCallRuntime(Node* node) { |
| 405 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); | 403 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); |
| 406 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); | 404 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); |
| 407 } | 405 } |
| 408 | 406 |
| 409 } // namespace compiler | 407 } // namespace compiler |
| 410 } // namespace internal | 408 } // namespace internal |
| 411 } // namespace v8 | 409 } // namespace v8 |
| OLD | NEW |