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-stubs.h" | 5 #include "src/code-stubs.h" |
6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/graph-inl.h" | 7 #include "src/compiler/graph-inl.h" |
8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "src/compiler/node-aux-data-inl.h" | 10 #include "src/compiler/node-aux-data-inl.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 | 422 |
423 | 423 |
424 Node* JSGenericLowering::LowerJSLoadProperty(Node* node) { | 424 Node* JSGenericLowering::LowerJSLoadProperty(Node* node) { |
425 KeyedLoadICStubShim stub(isolate()); | 425 KeyedLoadICStubShim stub(isolate()); |
426 ReplaceWithICStubCall(node, &stub); | 426 ReplaceWithICStubCall(node, &stub); |
427 return node; | 427 return node; |
428 } | 428 } |
429 | 429 |
430 | 430 |
431 Node* JSGenericLowering::LowerJSLoadNamed(Node* node) { | 431 Node* JSGenericLowering::LowerJSLoadNamed(Node* node) { |
432 PrintableUnique<Name> key = OpParameter<PrintableUnique<Name> >(node); | 432 LoadNamedParameters p = OpParameter<LoadNamedParameters>(node); |
433 // TODO(mstarzinger): The ContextualMode needs to be carried along in the | 433 LoadICStubShim stub(isolate(), p.contextual_mode); |
434 // operator to use JSLoadNamed for global variable loads. | 434 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name)); |
435 LoadICStubShim stub(isolate(), NOT_CONTEXTUAL); | |
436 PatchInsertInput(node, 1, jsgraph()->HeapConstant(key)); | |
437 ReplaceWithICStubCall(node, &stub); | 435 ReplaceWithICStubCall(node, &stub); |
438 return node; | 436 return node; |
439 } | 437 } |
440 | 438 |
441 | 439 |
442 Node* JSGenericLowering::LowerJSStoreProperty(Node* node) { | 440 Node* JSGenericLowering::LowerJSStoreProperty(Node* node) { |
443 // TODO(mstarzinger): The strict_mode needs to be carried along in the | 441 // TODO(mstarzinger): The strict_mode needs to be carried along in the |
444 // operator so that graphs are fully compositional for inlining. | 442 // operator so that graphs are fully compositional for inlining. |
445 StrictMode strict_mode = info()->strict_mode(); | 443 StrictMode strict_mode = info()->strict_mode(); |
446 KeyedStoreICStubShim stub(isolate(), strict_mode); | 444 KeyedStoreICStubShim stub(isolate(), strict_mode); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 | 554 |
557 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { | 555 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { |
558 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); | 556 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); |
559 int arity = NodeProperties::GetValueInputCount(node); | 557 int arity = NodeProperties::GetValueInputCount(node); |
560 ReplaceWithRuntimeCall(node, function, arity); | 558 ReplaceWithRuntimeCall(node, function, arity); |
561 return node; | 559 return node; |
562 } | 560 } |
563 } | 561 } |
564 } | 562 } |
565 } // namespace v8::internal::compiler | 563 } // namespace v8::internal::compiler |
OLD | NEW |