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

Side by Side Diff: test/unittests/interpreter/bytecodes-unittest.cc

Issue 1703453002: [interpreter, debugger] support debug breaks via bytecode array copy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 10 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 | « test/unittests/interpreter/bytecode-array-builder-unittest.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 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 <vector> 5 #include <vector>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "test/unittests/test-utils.h" 10 #include "test/unittests/test-utils.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 REGISTER_OUTPUT_OPERAND_TYPE_LIST(IS_REGISTER_OUTPUT_OPERAND_TYPE) 148 REGISTER_OUTPUT_OPERAND_TYPE_LIST(IS_REGISTER_OUTPUT_OPERAND_TYPE)
149 #undef IS_REGISTER_OUTPUT_OPERAND_TYPE 149 #undef IS_REGISTER_OUTPUT_OPERAND_TYPE
150 150
151 #define IS_NOT_REGISTER_OUTPUT_OPERAND_TYPE(Name, _) \ 151 #define IS_NOT_REGISTER_OUTPUT_OPERAND_TYPE(Name, _) \
152 CHECK(!Bytecodes::IsRegisterOutputOperandType(OperandType::k##Name)); 152 CHECK(!Bytecodes::IsRegisterOutputOperandType(OperandType::k##Name));
153 NON_REGISTER_OPERAND_TYPE_LIST(IS_NOT_REGISTER_OUTPUT_OPERAND_TYPE) 153 NON_REGISTER_OPERAND_TYPE_LIST(IS_NOT_REGISTER_OUTPUT_OPERAND_TYPE)
154 REGISTER_INPUT_OPERAND_TYPE_LIST(IS_NOT_REGISTER_OUTPUT_OPERAND_TYPE) 154 REGISTER_INPUT_OPERAND_TYPE_LIST(IS_NOT_REGISTER_OUTPUT_OPERAND_TYPE)
155 #undef IS_NOT_REGISTER_INPUT_OPERAND_TYPE 155 #undef IS_NOT_REGISTER_INPUT_OPERAND_TYPE
156 } 156 }
157 157
158 TEST(Bytecodes, DebugBreak) {
159 for (uint32_t i = 0; i < Bytecodes::ToByte(Bytecode::kLast); i++) {
160 Bytecode bytecode = Bytecodes::FromByte(i);
161 Bytecode debugbreak = Bytecodes::GetDebugBreak(bytecode);
162 if (!Bytecodes::IsDebugBreak(debugbreak)) {
163 PrintF("Bytecode %s has no matching debug break with length %d\n",
164 Bytecodes::ToString(bytecode), Bytecodes::Size(bytecode));
165 CHECK(false);
166 }
167 }
168 }
169
158 } // namespace interpreter 170 } // namespace interpreter
159 } // namespace internal 171 } // namespace internal
160 } // namespace v8 172 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/interpreter/bytecode-array-builder-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698