Index: src/compiler/code-generator.h |
diff --git a/src/compiler/code-generator.h b/src/compiler/code-generator.h |
index 035cd5cc1e93a29586b2b998a957cc6a2ee05796..99397eae8e40e8aca2dc413e4b3f2a1501b26880 100644 |
--- a/src/compiler/code-generator.h |
+++ b/src/compiler/code-generator.h |
@@ -69,6 +69,7 @@ class CodeGenerator FINAL : public GapResolver::Assembler { |
void AssembleArchInstruction(Instruction* instr); |
void AssembleArchJump(BasicBlock::RpoNumber target); |
+ void AssembleArchSwitch(Instruction* instr); |
void AssembleArchBranch(Instruction* instr, BranchInfo* branch); |
void AssembleArchBoolean(Instruction* instr, FlagsCondition condition); |
@@ -92,6 +93,18 @@ class CodeGenerator FINAL : public GapResolver::Assembler { |
InstructionOperand* destination) FINAL; |
// =========================================================================== |
+ // =================== Jump table construction methods. ====================== |
+ // =========================================================================== |
+ |
+ class JumpTable; |
+ // Adds a jump table that is emitted after the actual code. Returns label |
+ // pointing to the beginning of the table. {targets} is assumed to be static |
+ // or zone allocated. |
+ Label* AddJumpTable(Label** targets, size_t target_count); |
+ // Emits a jump table. |
+ void AssembleJumpTable(Label** targets, size_t target_count); |
+ |
+ // =========================================================================== |
// Deoptimization table construction |
void AddSafepointAndDeopt(Instruction* instr); |
void PopulateDeoptimizationData(Handle<Code> code); |
@@ -145,6 +158,7 @@ class CodeGenerator FINAL : public GapResolver::Assembler { |
ZoneDeque<Handle<Object> > deoptimization_literals_; |
TranslationBuffer translations_; |
int last_lazy_deopt_pc_; |
+ JumpTable* jump_tables_; |
OutOfLineCode* ools_; |
int osr_pc_offset_; |
}; |