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

Side by Side Diff: src/interpreter/bytecodes.h

Issue 1502243002: [Interpreter] Local flow control in the bytecode graph builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Build fix. 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 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 #ifndef V8_INTERPRETER_BYTECODES_H_ 5 #ifndef V8_INTERPRETER_BYTECODES_H_
6 #define V8_INTERPRETER_BYTECODES_H_ 6 #define V8_INTERPRETER_BYTECODES_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 // Clients of this interface shouldn't depend on lots of interpreter internals. 10 // Clients of this interface shouldn't depend on lots of interpreter internals.
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // Returns the offset of the i-th operand of |bytecode| relative to the start 325 // Returns the offset of the i-th operand of |bytecode| relative to the start
326 // of the bytecode. 326 // of the bytecode.
327 static int GetOperandOffset(Bytecode bytecode, int i); 327 static int GetOperandOffset(Bytecode bytecode, int i);
328 328
329 // Returns the size of the bytecode including its operands. 329 // Returns the size of the bytecode including its operands.
330 static int Size(Bytecode bytecode); 330 static int Size(Bytecode bytecode);
331 331
332 // Returns the size of |operand|. 332 // Returns the size of |operand|.
333 static OperandSize SizeOfOperand(OperandType operand); 333 static OperandSize SizeOfOperand(OperandType operand);
334 334
335 // Return true if the bytecode is a conditional jump taking
336 // an immediate byte operand (OperandType::kImm8).
337 static bool IsConditionalJumpImmediate(Bytecode bytecode);
338
339 // Return true if the bytecode is a conditional jump taking
340 // an immediate byte operand (OperandType::kImm8).
rmcilroy 2015/12/08 13:25:08 fix comment
oth 2015/12/09 11:26:45 Done.
341 static bool IsConditionalJumpConstant(Bytecode bytecode);
342
343 // Return true if the bytecode is a conditional jump taking
344 // any kind of operand.
345 static bool IsConditionalJump(Bytecode bytecode);
346
335 // Return true if the bytecode is a jump or a conditional jump taking 347 // Return true if the bytecode is a jump or a conditional jump taking
336 // an immediate byte operand (OperandType::kImm8). 348 // an immediate byte operand (OperandType::kImm8).
337 static bool IsJump(Bytecode bytecode); 349 static bool IsJumpImmediate(Bytecode bytecode);
338 350
339 // Return true if the bytecode is a jump or conditional jump taking a 351 // Return true if the bytecode is a jump or conditional jump taking a
340 // constant pool entry (OperandType::kIdx). 352 // constant pool entry (OperandType::kIdx).
341 static bool IsJumpConstant(Bytecode bytecode); 353 static bool IsJumpConstant(Bytecode bytecode);
342 354
355 // Return true if the bytecode is a jump or conditional jump taking
356 // any kind of operand.
357 static bool IsJump(Bytecode bytecode);
358
359 // Return true if the bytecode is a conditional jump, a jump, or a return.
360 static bool IsLocalControlFlow(Bytecode bytecode);
361
343 // Decode a single bytecode and operands to |os|. 362 // Decode a single bytecode and operands to |os|.
344 static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start, 363 static std::ostream& Decode(std::ostream& os, const uint8_t* bytecode_start,
345 int number_of_parameters); 364 int number_of_parameters);
346 365
347 private: 366 private:
348 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes); 367 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecodes);
349 }; 368 };
350 369
351 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); 370 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
352 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); 371 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type);
353 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); 372 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type);
354 373
355 } // namespace interpreter 374 } // namespace interpreter
356 } // namespace internal 375 } // namespace internal
357 } // namespace v8 376 } // namespace v8
358 377
359 #endif // V8_INTERPRETER_BYTECODES_H_ 378 #endif // V8_INTERPRETER_BYTECODES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698