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

Unified Diff: src/compiler/code-generator.h

Issue 892513003: [turbofan] Initial support for Switch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Wuschelstudio build. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698