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

Side by Side Diff: src/compiler/js-intrinsic-lowering.cc

Issue 1057813002: Fixed the range information for string lengths. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/access-builder.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright 2015 the V8 project authors. All rights reserved. 2 // Copyright 2015 the V8 project authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/compiler/js-intrinsic-lowering.h" 6 #include "src/compiler/js-intrinsic-lowering.h"
7 7
8 #include <stack> 8 #include <stack>
9 9
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 NodeProperties::RemoveBounds(node); 287 NodeProperties::RemoveBounds(node);
288 NodeProperties::ReplaceWithValue(node, string, node); 288 NodeProperties::ReplaceWithValue(node, string, node);
289 return Changed(node); 289 return Changed(node);
290 } 290 }
291 291
292 292
293 Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) { 293 Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) {
294 Node* value = NodeProperties::GetValueInput(node, 0); 294 Node* value = NodeProperties::GetValueInput(node, 0);
295 Node* effect = NodeProperties::GetEffectInput(node); 295 Node* effect = NodeProperties::GetEffectInput(node);
296 Node* control = NodeProperties::GetControlInput(node); 296 Node* control = NodeProperties::GetControlInput(node);
297 return Change(node, simplified()->LoadField(AccessBuilder::ForStringLength()), 297 return Change(node, simplified()->LoadField(
298 AccessBuilder::ForStringLength(graph()->zone())),
298 value, effect, control); 299 value, effect, control);
299 } 300 }
300 301
301 302
302 Reduction JSIntrinsicLowering::ReduceUnLikely(Node* node, BranchHint hint) { 303 Reduction JSIntrinsicLowering::ReduceUnLikely(Node* node, BranchHint hint) {
303 std::stack<Node*> nodes_to_visit; 304 std::stack<Node*> nodes_to_visit;
304 nodes_to_visit.push(node); 305 nodes_to_visit.push(node);
305 while (!nodes_to_visit.empty()) { 306 while (!nodes_to_visit.empty()) {
306 Node* current = nodes_to_visit.top(); 307 Node* current = nodes_to_visit.top();
307 nodes_to_visit.pop(); 308 nodes_to_visit.pop();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 424 }
424 425
425 426
426 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { 427 MachineOperatorBuilder* JSIntrinsicLowering::machine() const {
427 return jsgraph()->machine(); 428 return jsgraph()->machine();
428 } 429 }
429 430
430 } // namespace compiler 431 } // namespace compiler
431 } // namespace internal 432 } // namespace internal
432 } // namespace v8 433 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698