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

Side by Side Diff: test/unittests/compiler/change-lowering-unittest.cc

Issue 714613002: Fix bugs in simplified lowering relating to int32/uint32 signs. (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
« no previous file with comments | « test/mjsunit/mod-range.js ('k') | test/unittests/compiler/js-builtin-reducer-unittest.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 // 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/change-lowering.h" 6 #include "src/compiler/change-lowering.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/node-properties-inl.h" 8 #include "src/compiler/node-properties-inl.h"
9 #include "src/compiler/simplified-operator.h" 9 #include "src/compiler/simplified-operator.h"
10 #include "test/unittests/compiler/compiler-test-utils.h" 10 #include "test/unittests/compiler/compiler-test-utils.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 int SmiValueSize() const { 59 int SmiValueSize() const {
60 return Is32() ? SmiTagging<4>::SmiValueSize() 60 return Is32() ? SmiTagging<4>::SmiValueSize()
61 : SmiTagging<8>::SmiValueSize(); 61 : SmiTagging<8>::SmiValueSize();
62 } 62 }
63 63
64 Node* Parameter(int32_t index = 0) { 64 Node* Parameter(int32_t index = 0) {
65 return graph()->NewNode(common()->Parameter(index), graph()->start()); 65 return graph()->NewNode(common()->Parameter(index), graph()->start());
66 } 66 }
67 67
68 Reduction Reduce(Node* node) { 68 Reduction Reduce(Node* node) {
69 MachineOperatorBuilder machine(WordRepresentation()); 69 MachineOperatorBuilder machine(zone(), WordRepresentation());
70 JSOperatorBuilder javascript(zone()); 70 JSOperatorBuilder javascript(zone());
71 JSGraph jsgraph(graph(), common(), &javascript, &machine); 71 JSGraph jsgraph(graph(), common(), &javascript, &machine);
72 CompilationInfo info(isolate(), zone()); 72 CompilationInfo info(isolate(), zone());
73 Linkage linkage(zone(), &info); 73 Linkage linkage(zone(), &info);
74 ChangeLowering reducer(&jsgraph, &linkage); 74 ChangeLowering reducer(&jsgraph, &linkage);
75 return reducer.Reduce(node); 75 return reducer.Reduce(node);
76 } 76 }
77 77
78 SimplifiedOperatorBuilder* simplified() { return &simplified_; } 78 SimplifiedOperatorBuilder* simplified() { return &simplified_; }
79 79
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 IsIfTrue(AllOf(CaptureEq(&branch), 447 IsIfTrue(AllOf(CaptureEq(&branch),
448 IsBranch(IsUint32LessThanOrEqual( 448 IsBranch(IsUint32LessThanOrEqual(
449 val, IsInt32Constant(SmiMaxValue())), 449 val, IsInt32Constant(SmiMaxValue())),
450 graph()->start()))), 450 graph()->start()))),
451 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); 451 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch))))));
452 } 452 }
453 453
454 } // namespace compiler 454 } // namespace compiler
455 } // namespace internal 455 } // namespace internal
456 } // namespace v8 456 } // namespace v8
OLDNEW
« no previous file with comments | « test/mjsunit/mod-range.js ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698