Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 1124813005: WIP Atomics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix AtomicsLoad type in typer.cc Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/simplified-lowering.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compiler/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 } 848 }
849 case IrOpcode::kLoadElement: { 849 case IrOpcode::kLoadElement: {
850 ElementAccess access = ElementAccessOf(node->op()); 850 ElementAccess access = ElementAccessOf(node->op());
851 ProcessInput(node, 0, changer_->TypeForBasePointer(access)); // base 851 ProcessInput(node, 0, changer_->TypeForBasePointer(access)); // base
852 ProcessInput(node, 1, kMachInt32); // index 852 ProcessInput(node, 1, kMachInt32); // index
853 ProcessRemainingInputs(node, 2); 853 ProcessRemainingInputs(node, 2);
854 SetOutput(node, access.machine_type); 854 SetOutput(node, access.machine_type);
855 if (lower()) lowering->DoLoadElement(node); 855 if (lower()) lowering->DoLoadElement(node);
856 break; 856 break;
857 } 857 }
858 case IrOpcode::kLoadElementAtomic: {
859 ElementAccess access = ElementAccessOf(node->op());
860 ProcessInput(node, 0, changer_->TypeForBasePointer(access)); // base
861 ProcessInput(node, 1, kMachInt32); // index
862 ProcessRemainingInputs(node, 2);
863 SetOutput(node, access.machine_type);
864 if (lower()) lowering->DoLoadElementAtomic(node);
865 break;
866 }
858 case IrOpcode::kStoreElement: { 867 case IrOpcode::kStoreElement: {
859 ElementAccess access = ElementAccessOf(node->op()); 868 ElementAccess access = ElementAccessOf(node->op());
860 ProcessInput(node, 0, changer_->TypeForBasePointer(access)); // base 869 ProcessInput(node, 0, changer_->TypeForBasePointer(access)); // base
861 ProcessInput(node, 1, kMachInt32); // index 870 ProcessInput(node, 1, kMachInt32); // index
862 ProcessInput(node, 2, access.machine_type); // value 871 ProcessInput(node, 2, access.machine_type); // value
863 ProcessRemainingInputs(node, 3); 872 ProcessRemainingInputs(node, 3);
864 SetOutput(node, 0); 873 SetOutput(node, 0);
865 if (lower()) lowering->DoStoreElement(node); 874 if (lower()) lowering->DoStoreElement(node);
866 break; 875 break;
867 } 876 }
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 } 1302 }
1294 1303
1295 1304
1296 void SimplifiedLowering::DoLoadElement(Node* node) { 1305 void SimplifiedLowering::DoLoadElement(Node* node) {
1297 const ElementAccess& access = ElementAccessOf(node->op()); 1306 const ElementAccess& access = ElementAccessOf(node->op());
1298 node->set_op(machine()->Load(access.machine_type)); 1307 node->set_op(machine()->Load(access.machine_type));
1299 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1))); 1308 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1)));
1300 } 1309 }
1301 1310
1302 1311
1312 void SimplifiedLowering::DoLoadElementAtomic(Node* node) {
1313 const ElementAccess& access = ElementAccessOf(node->op());
1314 node->set_op(machine()->LoadAtomic(access.machine_type));
1315 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1)));
1316 }
1317
1318
1303 void SimplifiedLowering::DoStoreElement(Node* node) { 1319 void SimplifiedLowering::DoStoreElement(Node* node) {
1304 const ElementAccess& access = ElementAccessOf(node->op()); 1320 const ElementAccess& access = ElementAccessOf(node->op());
1305 Type* type = NodeProperties::GetBounds(node->InputAt(2)).upper; 1321 Type* type = NodeProperties::GetBounds(node->InputAt(2)).upper;
1306 node->set_op(machine()->Store( 1322 node->set_op(machine()->Store(
1307 StoreRepresentation(access.machine_type, 1323 StoreRepresentation(access.machine_type,
1308 ComputeWriteBarrierKind(access.base_is_tagged, 1324 ComputeWriteBarrierKind(access.base_is_tagged,
1309 access.machine_type, type)))); 1325 access.machine_type, type))));
1310 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1))); 1326 node->ReplaceInput(1, ComputeIndex(access, node->InputAt(1)));
1311 } 1327 }
1312 1328
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 1627
1612 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1628 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1613 node->set_op(machine()->IntLessThanOrEqual()); 1629 node->set_op(machine()->IntLessThanOrEqual());
1614 node->ReplaceInput(0, StringComparison(node, true)); 1630 node->ReplaceInput(0, StringComparison(node, true));
1615 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1631 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1616 } 1632 }
1617 1633
1618 } // namespace compiler 1634 } // namespace compiler
1619 } // namespace internal 1635 } // namespace internal
1620 } // namespace v8 1636 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698