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

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

Issue 652363006: [turbofan] First step towards correctified 64-bit addressing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 const int element_size = ElementSizeOf(access.machine_type); 1140 const int element_size = ElementSizeOf(access.machine_type);
1141 if (element_size != 1) { 1141 if (element_size != 1) {
1142 index = graph()->NewNode(machine()->Int32Mul(), index, 1142 index = graph()->NewNode(machine()->Int32Mul(), index,
1143 jsgraph()->Int32Constant(element_size)); 1143 jsgraph()->Int32Constant(element_size));
1144 } 1144 }
1145 const int fixed_offset = access.header_size - access.tag(); 1145 const int fixed_offset = access.header_size - access.tag();
1146 if (fixed_offset != 0) { 1146 if (fixed_offset != 0) {
1147 index = graph()->NewNode(machine()->Int32Add(), index, 1147 index = graph()->NewNode(machine()->Int32Add(), index,
1148 jsgraph()->Int32Constant(fixed_offset)); 1148 jsgraph()->Int32Constant(fixed_offset));
1149 } 1149 }
1150 // TODO(bmeurer): 64-Bit 1150 if (machine()->Is64()) {
1151 // if (machine()->Is64()) { 1151 // TODO(turbofan): This is probably only correct for typed arrays, and only
1152 // index = graph()->NewNode(machine()->ChangeInt32ToInt64(), index); 1152 // if the typed arrays are at most 2GiB in size, which happens to match
1153 // } 1153 // exactly our current situation.
1154 index = graph()->NewNode(machine()->ChangeUint32ToUint64(), index);
1155 }
1154 return index; 1156 return index;
1155 } 1157 }
1156 1158
1157 1159
1158 namespace { 1160 namespace {
1159 1161
1160 intptr_t AddressForOutOfBoundsLoad(MachineType type) { 1162 intptr_t AddressForOutOfBoundsLoad(MachineType type) {
1161 switch (RepresentationOf(type)) { 1163 switch (RepresentationOf(type)) {
1162 case kRepFloat32: { 1164 case kRepFloat32: {
1163 static const float dummy = std::numeric_limits<float>::quiet_NaN(); 1165 static const float dummy = std::numeric_limits<float>::quiet_NaN();
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 1520
1519 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1521 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1520 node->set_op(machine()->IntLessThanOrEqual()); 1522 node->set_op(machine()->IntLessThanOrEqual());
1521 node->ReplaceInput(0, StringComparison(node, true)); 1523 node->ReplaceInput(0, StringComparison(node, true));
1522 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1524 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1523 } 1525 }
1524 1526
1525 } // namespace compiler 1527 } // namespace compiler
1526 } // namespace internal 1528 } // namespace internal
1527 } // namespace v8 1529 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698