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

Side by Side Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 1376113005: Revert of Reland: Introduce a V8_NORETURN macro and use it to make GCC 4.9.2 happy again. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/heap/spaces-inl.h ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/interpreter/bytecode-array-iterator.h" 8 #include "src/interpreter/bytecode-array-iterator.h"
9 #include "src/interpreter/bytecode-generator.h" 9 #include "src/interpreter/bytecode-generator.h"
10 #include "src/interpreter/interpreter.h" 10 #include "src/interpreter/interpreter.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // one we use to specify an unknown byte. 150 // one we use to specify an unknown byte.
151 CHECK_NE(raw_operand, _); 151 CHECK_NE(raw_operand, _);
152 if (expected.bytecode[operand_index] == _) { 152 if (expected.bytecode[operand_index] == _) {
153 continue; 153 continue;
154 } 154 }
155 } 155 }
156 uint32_t expected_operand; 156 uint32_t expected_operand;
157 switch (Bytecodes::SizeOfOperand(operand_type)) { 157 switch (Bytecodes::SizeOfOperand(operand_type)) {
158 case OperandSize::kNone: 158 case OperandSize::kNone:
159 UNREACHABLE(); 159 UNREACHABLE();
160 return;
161 case OperandSize::kByte: 160 case OperandSize::kByte:
162 expected_operand = 161 expected_operand =
163 static_cast<uint32_t>(expected.bytecode[operand_index]); 162 static_cast<uint32_t>(expected.bytecode[operand_index]);
164 break; 163 break;
165 case OperandSize::kShort: 164 case OperandSize::kShort:
166 expected_operand = Bytecodes::ShortOperandFromBytes( 165 expected_operand = Bytecodes::ShortOperandFromBytes(
167 &expected.bytecode[operand_index]); 166 &expected.bytecode[operand_index]);
168 break; 167 break;
169 default:
170 UNREACHABLE();
171 return;
172 } 168 }
173 if (raw_operand != expected_operand) { 169 if (raw_operand != expected_operand) {
174 std::ostringstream stream; 170 std::ostringstream stream;
175 stream << "Check failed: expected operand [" << j << "] for bytecode [" 171 stream << "Check failed: expected operand [" << j << "] for bytecode ["
176 << bytecode_index << "] to be " 172 << bytecode_index << "] to be "
177 << static_cast<unsigned int>(expected_operand) << " but got " 173 << static_cast<unsigned int>(expected_operand) << " but got "
178 << static_cast<unsigned int>(raw_operand); 174 << static_cast<unsigned int>(raw_operand);
179 FATAL(stream.str().c_str()); 175 FATAL(stream.str().c_str());
180 } 176 }
181 } 177 }
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 for (size_t i = 0; i < arraysize(snippets); i++) { 1256 for (size_t i = 0; i < arraysize(snippets); i++) {
1261 Handle<BytecodeArray> bytecode_array = 1257 Handle<BytecodeArray> bytecode_array =
1262 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); 1258 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet);
1263 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 1259 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
1264 } 1260 }
1265 } 1261 }
1266 1262
1267 } // namespace interpreter 1263 } // namespace interpreter
1268 } // namespace internal 1264 } // namespace internal
1269 } // namespace v8 1265 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698