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

Unified Diff: src/interpreter/bytecode-array-builder.h

Issue 1426913002: [Interpreter] Merges ToBoolean and JumpIfTrue/False bytecodes (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | src/interpreter/bytecode-array-builder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index 4ec50bb623e209637c81029a8881bfb0d081293a..e3695b559d4aed478f7a7ff8e42eeeaa3a15a8f4 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -180,11 +180,6 @@ class BytecodeArrayBuilder {
BytecodeArrayBuilder& Jump(BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label);
- // TODO(mythria) The following two functions should be merged into
- // JumpIfTrue/False. These bytecodes should be automatically chosen rather
- // than explicitly using them.
- BytecodeArrayBuilder& JumpIfToBooleanTrue(BytecodeLabel* label);
- BytecodeArrayBuilder& JumpIfToBooleanFalse(BytecodeLabel* label);
BytecodeArrayBuilder& Throw();
BytecodeArrayBuilder& Return();
@@ -218,6 +213,7 @@ class BytecodeArrayBuilder {
static bool FitsInIdx16Operand(int value);
static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand);
+ static Bytecode GetJumpWithToBoolean(Bytecode jump, bool is_cast_required);
template <size_t N>
INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N]));
@@ -238,6 +234,8 @@ class BytecodeArrayBuilder {
uint32_t operand_value) const;
bool LastBytecodeInSameBlock() const;
+ bool IsAccumulatorBoolean();
+
int BorrowTemporaryRegister();
void ReturnTemporaryRegister(int reg_index);
int PrepareForConsecutiveTemporaryRegisters(size_t count);
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | src/interpreter/bytecode-array-builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698