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

Side by Side Diff: test/cctest/compiler/test-multiple-return.cc

Issue 1506753002: [test] Test expectations in cctest should use CHECK and not DCHECK. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
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 // TODO(jochen): Remove this after the setting is turned on globally. 5 // TODO(jochen): Remove this after the setting is turned on globally.
6 #define V8_IMMINENT_DEPRECATION_WARNINGS 6 #define V8_IMMINENT_DEPRECATION_WARNINGS
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <functional> 9 #include <functional>
10 #include <limits> 10 #include <limits>
(...skipping 16 matching lines...) Expand all
27 namespace { 27 namespace {
28 28
29 CallDescriptor* GetCallDescriptor(Zone* zone, int return_count, 29 CallDescriptor* GetCallDescriptor(Zone* zone, int return_count,
30 int param_count) { 30 int param_count) {
31 MachineSignature::Builder msig(zone, return_count, param_count); 31 MachineSignature::Builder msig(zone, return_count, param_count);
32 LocationSignature::Builder locations(zone, return_count, param_count); 32 LocationSignature::Builder locations(zone, return_count, param_count);
33 const RegisterConfiguration* config = 33 const RegisterConfiguration* config =
34 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN); 34 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN);
35 35
36 // Add return location(s). 36 // Add return location(s).
37 DCHECK(return_count <= config->num_allocatable_general_registers()); 37 CHECK(return_count <= config->num_allocatable_general_registers());
38 for (int i = 0; i < return_count; i++) { 38 for (int i = 0; i < return_count; i++) {
39 msig.AddReturn(kMachInt32); 39 msig.AddReturn(kMachInt32);
40 locations.AddReturn( 40 locations.AddReturn(
41 LinkageLocation::ForRegister(config->allocatable_general_codes()[i])); 41 LinkageLocation::ForRegister(config->allocatable_general_codes()[i]));
42 } 42 }
43 43
44 // Add register and/or stack parameter(s). 44 // Add register and/or stack parameter(s).
45 DCHECK(param_count <= config->num_allocatable_general_registers()); 45 CHECK(param_count <= config->num_allocatable_general_registers());
46 for (int i = 0; i < param_count; i++) { 46 for (int i = 0; i < param_count; i++) {
47 msig.AddParam(kMachInt32); 47 msig.AddParam(kMachInt32);
48 locations.AddParam( 48 locations.AddParam(
49 LinkageLocation::ForRegister(config->allocatable_general_codes()[i])); 49 LinkageLocation::ForRegister(config->allocatable_general_codes()[i]));
50 } 50 }
51 51
52 const RegList kCalleeSaveRegisters = 0; 52 const RegList kCalleeSaveRegisters = 0;
53 const RegList kCalleeSaveFPRegisters = 0; 53 const RegList kCalleeSaveFPRegisters = 0;
54 54
55 // The target for WASM calls is always a code object. 55 // The target for WASM calls is always a code object.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 OFStream os(stdout); 112 OFStream os(stdout);
113 code2->Disassemble("three_value_call", os); 113 code2->Disassemble("three_value_call", os);
114 } 114 }
115 #endif 115 #endif
116 CHECK_EQ((123 + 456) + (123 - 456) + (123 * 456), mt.Call()); 116 CHECK_EQ((123 + 456) + (123 - 456) + (123 * 456), mt.Call());
117 } 117 }
118 118
119 } // namespace compiler 119 } // namespace compiler
120 } // namespace internal 120 } // namespace internal
121 } // namespace v8 121 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-machine-operator-reducer.cc ('k') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698