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

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

Issue 1393023003: 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: avoid gcc 4.8 arm compiler bug on release and debug by moving checks to the bottom 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') | test/cctest/test-assembler-arm.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 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // one we use to specify an unknown byte. 162 // one we use to specify an unknown byte.
163 CHECK_NE(raw_operand, _); 163 CHECK_NE(raw_operand, _);
164 if (expected.bytecode[operand_index] == _) { 164 if (expected.bytecode[operand_index] == _) {
165 continue; 165 continue;
166 } 166 }
167 } 167 }
168 uint32_t expected_operand; 168 uint32_t expected_operand;
169 switch (Bytecodes::SizeOfOperand(operand_type)) { 169 switch (Bytecodes::SizeOfOperand(operand_type)) {
170 case OperandSize::kNone: 170 case OperandSize::kNone:
171 UNREACHABLE(); 171 UNREACHABLE();
172 return;
172 case OperandSize::kByte: 173 case OperandSize::kByte:
173 expected_operand = 174 expected_operand =
174 static_cast<uint32_t>(expected.bytecode[operand_index]); 175 static_cast<uint32_t>(expected.bytecode[operand_index]);
175 break; 176 break;
176 case OperandSize::kShort: 177 case OperandSize::kShort:
177 expected_operand = Bytecodes::ShortOperandFromBytes( 178 expected_operand = Bytecodes::ShortOperandFromBytes(
178 &expected.bytecode[operand_index]); 179 &expected.bytecode[operand_index]);
179 break; 180 break;
181 default:
182 UNREACHABLE();
183 return;
180 } 184 }
181 if (raw_operand != expected_operand) { 185 if (raw_operand != expected_operand) {
182 std::ostringstream stream; 186 std::ostringstream stream;
183 stream << "Check failed: expected operand [" << j << "] for bytecode [" 187 stream << "Check failed: expected operand [" << j << "] for bytecode ["
184 << bytecode_index << "] to be " 188 << bytecode_index << "] to be "
185 << static_cast<unsigned int>(expected_operand) << " but got " 189 << static_cast<unsigned int>(expected_operand) << " but got "
186 << static_cast<unsigned int>(raw_operand); 190 << static_cast<unsigned int>(raw_operand);
187 FATAL(stream.str().c_str()); 191 FATAL(stream.str().c_str());
188 } 192 }
189 } 193 }
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 Handle<BytecodeArray> bytecode_array = 1671 Handle<BytecodeArray> bytecode_array =
1668 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); 1672 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet);
1669 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 1673 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
1670 } 1674 }
1671 } 1675 }
1672 1676
1673 1677
1674 } // namespace interpreter 1678 } // namespace interpreter
1675 } // namespace internal 1679 } // namespace internal
1676 } // namespace v8 1680 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces-inl.h ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698