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, jsgraph()->SmiConstant(p.feedback().slot())); | 278 PatchInsertInput(node, 2, |
| 279 jsgraph()->SmiConstant(p.feedback().slot().ToInt())); |
279 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); | 280 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); |
280 } | 281 } |
281 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 282 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
282 } | 283 } |
283 | 284 |
284 | 285 |
285 void JSGenericLowering::LowerJSLoadNamed(Node* node) { | 286 void JSGenericLowering::LowerJSLoadNamed(Node* node) { |
286 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); | 287 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); |
287 Callable callable = | 288 Callable callable = |
288 CodeFactory::LoadICInOptimizedCode(isolate(), p.contextual_mode()); | 289 CodeFactory::LoadICInOptimizedCode(isolate(), p.contextual_mode()); |
289 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); | 290 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); |
290 if (FLAG_vector_ics) { | 291 if (FLAG_vector_ics) { |
291 PatchInsertInput(node, 2, jsgraph()->SmiConstant(p.feedback().slot())); | 292 PatchInsertInput(node, 2, |
| 293 jsgraph()->SmiConstant(p.feedback().slot().ToInt())); |
292 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); | 294 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); |
293 } | 295 } |
294 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 296 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
295 } | 297 } |
296 | 298 |
297 | 299 |
298 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 300 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
299 StrictMode strict_mode = OpParameter<StrictMode>(node); | 301 StrictMode strict_mode = OpParameter<StrictMode>(node); |
300 Callable callable = CodeFactory::KeyedStoreIC(isolate(), strict_mode); | 302 Callable callable = CodeFactory::KeyedStoreIC(isolate(), strict_mode); |
301 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 303 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 402 |
401 | 403 |
402 void JSGenericLowering::LowerJSCallRuntime(Node* node) { | 404 void JSGenericLowering::LowerJSCallRuntime(Node* node) { |
403 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); | 405 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); |
404 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); | 406 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); |
405 } | 407 } |
406 | 408 |
407 } // namespace compiler | 409 } // namespace compiler |
408 } // namespace internal | 410 } // namespace internal |
409 } // namespace v8 | 411 } // namespace v8 |
OLD | NEW |