diff options
| author | 2014-12-04 23:59:55 +0000 | |
|---|---|---|
| committer | 2014-12-04 23:59:56 +0000 | |
| commit | 7be36ae7979eb62dc34c59b18b0bb1202ffefa3f (patch) | |
| tree | c82b0a56e8974c42a3caf2bfb234f60f98b3913b /compiler/optimizing/builder.h | |
| parent | 63130d07713dc3eaa3ce156e3f7b8f0b0e06cd61 (diff) | |
| parent | e4d4d323aa42506351b03e842818e9ec09ea6c37 (diff) | |
Merge "ART: Add SparseSwitch support to the optimizing compiler"
Diffstat (limited to 'compiler/optimizing/builder.h')
| -rw-r--r-- | compiler/optimizing/builder.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index e4e370582d..73c2f50958 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -29,6 +29,7 @@ namespace art { class Instruction; +class SwitchTable; class HGraphBuilder : public ValueObject { public: @@ -203,10 +204,17 @@ class HGraphBuilder : public ValueObject { uint16_t type_index, uint32_t dex_pc); - // Builds an instruction sequence for a packed switch statement. This will punt to the interpreter - // for a switch with a full 64k set of cases. + // Builds an instruction sequence for a packed switch statement. bool BuildPackedSwitch(const Instruction& instruction, uint32_t dex_pc); + // Builds an instruction sequence for a sparse switch statement. + bool BuildSparseSwitch(const Instruction& instruction, uint32_t dex_pc); + + void BuildSwitchCaseHelper(const Instruction& instruction, size_t index, + bool is_last_case, const SwitchTable& table, + HInstruction* value, int32_t case_value_int, + int32_t target_offset, uint32_t dex_pc); + ArenaAllocator* const arena_; // A list of the size of the dex code holding block information for |