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: test/compiler-unittests/instruction-selector-unittest.cc

Issue 509653003: Use TruncateFloat64ToInt32 instead of ChangeFloat64ToInt32 in lowering of simplified operators Numb… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/compiler/test-simplified-lowering.cc ('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 "test/compiler-unittests/instruction-selector-unittest.h" 5 #include "test/compiler-unittests/instruction-selector-unittest.h"
6 6
7 #include "src/flags.h" 7 #include "src/flags.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 const Instruction* i2 = s2[i]; 309 const Instruction* i2 = s2[i];
310 EXPECT_EQ(i1->arch_opcode(), i2->arch_opcode()); 310 EXPECT_EQ(i1->arch_opcode(), i2->arch_opcode());
311 EXPECT_EQ(i1->InputCount(), i2->InputCount()); 311 EXPECT_EQ(i1->InputCount(), i2->InputCount());
312 EXPECT_EQ(i1->OutputCount(), i2->OutputCount()); 312 EXPECT_EQ(i1->OutputCount(), i2->OutputCount());
313 } 313 }
314 } 314 }
315 315
316 316
317 // ----------------------------------------------------------------------------- 317 // -----------------------------------------------------------------------------
318 // Calls with deoptimization. 318 // Calls with deoptimization.
319 TEST_F(InstructionSelectorTest, CallJSFunctionWithDeopt) { 319 TARGET_TEST_F(InstructionSelectorTest, CallJSFunctionWithDeopt) {
320 StreamBuilder m(this, kMachAnyTagged, kMachAnyTagged, kMachAnyTagged); 320 StreamBuilder m(this, kMachAnyTagged, kMachAnyTagged, kMachAnyTagged);
321 321
322 BailoutId bailout_id(42); 322 BailoutId bailout_id(42);
323 323
324 Node* function_node = m.Parameter(0); 324 Node* function_node = m.Parameter(0);
325 Node* receiver = m.Parameter(1); 325 Node* receiver = m.Parameter(1);
326 StreamBuilder::Label deopt, cont; 326 StreamBuilder::Label deopt, cont;
327 327
328 // TODO(jarin) Add frame state. 328 // TODO(jarin) Add frame state.
329 Node* call = m.CallJS0(function_node, receiver, &cont, &deopt); 329 Node* call = m.CallJS0(function_node, receiver, &cont, &deopt);
(...skipping 23 matching lines...) Expand all
353 // Now we should have three instructions: call, return and deoptimize. 353 // Now we should have three instructions: call, return and deoptimize.
354 ASSERT_EQ(index + 3, s.size()); 354 ASSERT_EQ(index + 3, s.size());
355 355
356 EXPECT_EQ(kArchCallJSFunction, s[index++]->arch_opcode()); 356 EXPECT_EQ(kArchCallJSFunction, s[index++]->arch_opcode());
357 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); 357 EXPECT_EQ(kArchRet, s[index++]->arch_opcode());
358 EXPECT_EQ(kArchDeoptimize, s[index++]->arch_opcode()); 358 EXPECT_EQ(kArchDeoptimize, s[index++]->arch_opcode());
359 EXPECT_EQ(index, s.size()); 359 EXPECT_EQ(index, s.size());
360 } 360 }
361 361
362 362
363 TEST_F(InstructionSelectorTest, CallFunctionStubWithDeopt) { 363 TARGET_TEST_F(InstructionSelectorTest, CallFunctionStubWithDeopt) {
364 StreamBuilder m(this, kMachAnyTagged, kMachAnyTagged, kMachAnyTagged, 364 StreamBuilder m(this, kMachAnyTagged, kMachAnyTagged, kMachAnyTagged,
365 kMachAnyTagged); 365 kMachAnyTagged);
366 366
367 BailoutId bailout_id_before(42); 367 BailoutId bailout_id_before(42);
368 BailoutId bailout_id_after(54); 368 BailoutId bailout_id_after(54);
369 369
370 // Some arguments for the call node. 370 // Some arguments for the call node.
371 Node* function_node = m.Parameter(0); 371 Node* function_node = m.Parameter(0);
372 Node* receiver = m.Parameter(1); 372 Node* receiver = m.Parameter(1);
373 Node* context = m.Int32Constant(1); // Context is ignored. 373 Node* context = m.Int32Constant(1); // Context is ignored.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 EXPECT_EQ(43, s.ToInt32(deopt_instr->InputAt(1))); 462 EXPECT_EQ(43, s.ToInt32(deopt_instr->InputAt(1)));
463 EXPECT_EQ(44, s.ToInt32(deopt_instr->InputAt(2))); 463 EXPECT_EQ(44, s.ToInt32(deopt_instr->InputAt(2)));
464 EXPECT_EQ(55, s.ToInt32(deopt_instr->InputAt(3))); 464 EXPECT_EQ(55, s.ToInt32(deopt_instr->InputAt(3)));
465 EXPECT_EQ(call->id(), s.ToVreg(deopt_instr->InputAt(4))); 465 EXPECT_EQ(call->id(), s.ToVreg(deopt_instr->InputAt(4)));
466 EXPECT_EQ(index, s.size()); 466 EXPECT_EQ(index, s.size());
467 } 467 }
468 468
469 } // namespace compiler 469 } // namespace compiler
470 } // namespace internal 470 } // namespace internal
471 } // namespace v8 471 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-simplified-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698