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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 Node* JSGenericLowering::LowerJSLoadNamed(Node* node) { | 415 Node* JSGenericLowering::LowerJSLoadNamed(Node* node) { |
416 LoadNamedParameters p = OpParameter<LoadNamedParameters>(node); | 416 LoadNamedParameters p = OpParameter<LoadNamedParameters>(node); |
417 LoadICStubShim stub(isolate(), p.contextual_mode); | 417 LoadICStubShim stub(isolate(), p.contextual_mode); |
418 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name)); | 418 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name)); |
419 ReplaceWithICStubCall(node, &stub); | 419 ReplaceWithICStubCall(node, &stub); |
420 return node; | 420 return node; |
421 } | 421 } |
422 | 422 |
423 | 423 |
424 Node* JSGenericLowering::LowerJSStoreProperty(Node* node) { | 424 Node* JSGenericLowering::LowerJSStoreProperty(Node* node) { |
425 // TODO(mstarzinger): The strict_mode needs to be carried along in the | 425 StrictMode strict_mode = OpParameter<StrictMode>(node); |
426 // operator so that graphs are fully compositional for inlining. | |
427 StrictMode strict_mode = info()->strict_mode(); | |
428 KeyedStoreICStubShim stub(isolate(), strict_mode); | 426 KeyedStoreICStubShim stub(isolate(), strict_mode); |
429 ReplaceWithICStubCall(node, &stub); | 427 ReplaceWithICStubCall(node, &stub); |
430 return node; | 428 return node; |
431 } | 429 } |
432 | 430 |
433 | 431 |
434 Node* JSGenericLowering::LowerJSStoreNamed(Node* node) { | 432 Node* JSGenericLowering::LowerJSStoreNamed(Node* node) { |
435 PrintableUnique<Name> key = OpParameter<PrintableUnique<Name> >(node); | 433 StoreNamedParameters params = OpParameter<StoreNamedParameters>(node); |
436 // TODO(mstarzinger): The strict_mode needs to be carried along in the | 434 StoreICStubShim stub(isolate(), params.strict_mode); |
437 // operator so that graphs are fully compositional for inlining. | 435 PatchInsertInput(node, 1, jsgraph()->HeapConstant(params.name)); |
438 StrictMode strict_mode = info()->strict_mode(); | |
439 StoreICStubShim stub(isolate(), strict_mode); | |
440 PatchInsertInput(node, 1, jsgraph()->HeapConstant(key)); | |
441 ReplaceWithICStubCall(node, &stub); | 436 ReplaceWithICStubCall(node, &stub); |
442 return node; | 437 return node; |
443 } | 438 } |
444 | 439 |
445 | 440 |
446 Node* JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 441 Node* JSGenericLowering::LowerJSDeleteProperty(Node* node) { |
447 StrictMode strict_mode = OpParameter<StrictMode>(node); | 442 StrictMode strict_mode = OpParameter<StrictMode>(node); |
448 PatchInsertInput(node, 2, SmiConstant(strict_mode)); | 443 PatchInsertInput(node, 2, SmiConstant(strict_mode)); |
449 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3); | 444 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3); |
450 return node; | 445 return node; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 | 535 |
541 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { | 536 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { |
542 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); | 537 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); |
543 int arity = OperatorProperties::GetValueInputCount(node->op()); | 538 int arity = OperatorProperties::GetValueInputCount(node->op()); |
544 ReplaceWithRuntimeCall(node, function, arity); | 539 ReplaceWithRuntimeCall(node, function, arity); |
545 return node; | 540 return node; |
546 } | 541 } |
547 } | 542 } |
548 } | 543 } |
549 } // namespace v8::internal::compiler | 544 } // namespace v8::internal::compiler |
OLD | NEW |