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

Side by Side Diff: test/unittests/compiler/js-builtin-reducer-unittest.cc

Issue 1013853009: Version 4.2.77.13 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.2
Patch Set: Created 5 years, 9 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 | « test/mjsunit/compiler/regress-468162.js ('k') | no next file » | 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/js-builtin-reducer.h" 5 #include "src/compiler/js-builtin-reducer.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 #include "src/compiler/typer.h" 8 #include "src/compiler/typer.h"
9 #include "test/unittests/compiler/graph-unittest.h" 9 #include "test/unittests/compiler/graph-unittest.h"
10 #include "test/unittests/compiler/node-test-utils.h" 10 #include "test/unittests/compiler/node-test-utils.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 Node* p1 = Parameter(t1, 1); 157 Node* p1 = Parameter(t1, 1);
158 Node* fun = HeapConstant(Unique<HeapObject>::CreateUninitialized(f)); 158 Node* fun = HeapConstant(Unique<HeapObject>::CreateUninitialized(f));
159 Node* call = graph()->NewNode( 159 Node* call = graph()->NewNode(
160 javascript()->CallFunction(4, NO_CALL_FUNCTION_FLAGS), fun, 160 javascript()->CallFunction(4, NO_CALL_FUNCTION_FLAGS), fun,
161 UndefinedConstant(), p0, p1); 161 UndefinedConstant(), p0, p1);
162 Reduction r = Reduce(call); 162 Reduction r = Reduce(call);
163 163
164 if (t0->Is(Type::Integral32()) && t1->Is(Type::Integral32())) { 164 if (t0->Is(Type::Integral32()) && t1->Is(Type::Integral32())) {
165 ASSERT_TRUE(r.Changed()); 165 ASSERT_TRUE(r.Changed());
166 EXPECT_THAT(r.replacement(), 166 EXPECT_THAT(r.replacement(),
167 IsSelect(kMachNone, IsNumberLessThan(p1, p0), p1, p0)); 167 IsSelect(kMachNone, IsNumberLessThan(p1, p0), p0, p1));
168 } else { 168 } else {
169 ASSERT_FALSE(r.Changed()); 169 ASSERT_FALSE(r.Changed());
170 EXPECT_EQ(IrOpcode::kJSCallFunction, call->opcode()); 170 EXPECT_EQ(IrOpcode::kJSCallFunction, call->opcode());
171 } 171 }
172 } 172 }
173 } 173 }
174 } 174 }
175 175
176 176
177 // ----------------------------------------------------------------------------- 177 // -----------------------------------------------------------------------------
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 graph()->NewNode(javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS), 292 graph()->NewNode(javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS),
293 fun, UndefinedConstant(), p0); 293 fun, UndefinedConstant(), p0);
294 Reduction r = Reduce(call, MachineOperatorBuilder::Flag::kNoFlags); 294 Reduction r = Reduce(call, MachineOperatorBuilder::Flag::kNoFlags);
295 295
296 ASSERT_FALSE(r.Changed()); 296 ASSERT_FALSE(r.Changed());
297 } 297 }
298 } 298 }
299 } // namespace compiler 299 } // namespace compiler
300 } // namespace internal 300 } // namespace internal
301 } // namespace v8 301 } // namespace v8
OLDNEW
« no previous file with comments | « test/mjsunit/compiler/regress-468162.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698