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

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

Issue 1384873002: 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: fix unintialized variable 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;
160 case OperandSize::kByte: 161 case OperandSize::kByte:
161 expected_operand = 162 expected_operand =
162 static_cast<uint32_t>(expected.bytecode[operand_index]); 163 static_cast<uint32_t>(expected.bytecode[operand_index]);
163 break; 164 break;
164 case OperandSize::kShort: 165 case OperandSize::kShort:
165 expected_operand = Bytecodes::ShortOperandFromBytes( 166 expected_operand = Bytecodes::ShortOperandFromBytes(
166 &expected.bytecode[operand_index]); 167 &expected.bytecode[operand_index]);
167 break; 168 break;
169 default:
170 UNREACHABLE();
171 return;
168 } 172 }
169 if (raw_operand != expected_operand) { 173 if (raw_operand != expected_operand) {
170 std::ostringstream stream; 174 std::ostringstream stream;
171 stream << "Check failed: expected operand [" << j << "] for bytecode [" 175 stream << "Check failed: expected operand [" << j << "] for bytecode ["
172 << bytecode_index << "] to be " 176 << bytecode_index << "] to be "
173 << static_cast<unsigned int>(expected_operand) << " but got " 177 << static_cast<unsigned int>(expected_operand) << " but got "
174 << static_cast<unsigned int>(raw_operand); 178 << static_cast<unsigned int>(raw_operand);
175 FATAL(stream.str().c_str()); 179 FATAL(stream.str().c_str());
176 } 180 }
177 } 181 }
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 for (size_t i = 0; i < arraysize(snippets); i++) { 1260 for (size_t i = 0; i < arraysize(snippets); i++) {
1257 Handle<BytecodeArray> bytecode_array = 1261 Handle<BytecodeArray> bytecode_array =
1258 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); 1262 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet);
1259 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 1263 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
1260 } 1264 }
1261 } 1265 }
1262 1266
1263 } // namespace interpreter 1267 } // namespace interpreter
1264 } // namespace internal 1268 } // namespace internal
1265 } // namespace v8 1269 } // 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