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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 ReplaceWithBuiltinCall(node, Builtins::TO_STRING, 1); | 265 ReplaceWithBuiltinCall(node, Builtins::TO_STRING, 1); |
266 } | 266 } |
267 | 267 |
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 Callable callable = CodeFactory::KeyedLoadIC(isolate()); | 275 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); |
| 276 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(isolate()); |
| 277 if (FLAG_vector_ics) { |
| 278 PatchInsertInput(node, 2, jsgraph()->SmiConstant(p.feedback().slot())); |
| 279 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); |
| 280 } |
276 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 281 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
277 } | 282 } |
278 | 283 |
279 | 284 |
280 void JSGenericLowering::LowerJSLoadNamed(Node* node) { | 285 void JSGenericLowering::LowerJSLoadNamed(Node* node) { |
281 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); | 286 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); |
282 Callable callable = CodeFactory::LoadIC(isolate(), p.contextual_mode()); | 287 Callable callable = |
| 288 CodeFactory::LoadICInOptimizedCode(isolate(), p.contextual_mode()); |
283 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); | 289 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); |
| 290 if (FLAG_vector_ics) { |
| 291 PatchInsertInput(node, 2, jsgraph()->SmiConstant(p.feedback().slot())); |
| 292 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); |
| 293 } |
284 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 294 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
285 } | 295 } |
286 | 296 |
287 | 297 |
288 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 298 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
289 StrictMode strict_mode = OpParameter<StrictMode>(node); | 299 StrictMode strict_mode = OpParameter<StrictMode>(node); |
290 Callable callable = CodeFactory::KeyedStoreIC(isolate(), strict_mode); | 300 Callable callable = CodeFactory::KeyedStoreIC(isolate(), strict_mode); |
291 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 301 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
292 } | 302 } |
293 | 303 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 400 |
391 | 401 |
392 void JSGenericLowering::LowerJSCallRuntime(Node* node) { | 402 void JSGenericLowering::LowerJSCallRuntime(Node* node) { |
393 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); | 403 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); |
394 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); | 404 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); |
395 } | 405 } |
396 | 406 |
397 } // namespace compiler | 407 } // namespace compiler |
398 } // namespace internal | 408 } // namespace internal |
399 } // namespace v8 | 409 } // namespace v8 |
OLD | NEW |