diff options
| author | 2014-09-16 15:19:06 +0000 | |
|---|---|---|
| committer | 2014-09-16 15:19:06 +0000 | |
| commit | bace0378d720a1d2938ec7f6be17e2814671d20a (patch) | |
| tree | d986e10ad92b40e38f9098c486e12891b0ec4118 /compiler/optimizing/nodes.h | |
| parent | 5733b35c23792834f3a2374003c109301a48867c (diff) | |
| parent | fbc695f9b8e2084697e19c1355ab925f99f0d235 (diff) | |
Merge "Revert "Revert "Implement suspend checks in new compiler."""
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 9018fee0a5..ed6dd939de 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -443,6 +443,7 @@ class HBasicBlock : public ArenaObject { M(BoundsCheck) \ M(NullCheck) \ M(Temporary) \ + M(SuspendCheck) \ #define FOR_EACH_INSTRUCTION(M) \ FOR_EACH_CONCRETE_INSTRUCTION(M) \ @@ -1593,6 +1594,25 @@ class HTemporary : public HTemplateInstruction<0> { DISALLOW_COPY_AND_ASSIGN(HTemporary); }; +class HSuspendCheck : public HTemplateInstruction<0> { + public: + explicit HSuspendCheck(uint32_t dex_pc) + : HTemplateInstruction(SideEffects::ChangesSomething()), dex_pc_(dex_pc) {} + + virtual bool NeedsEnvironment() const { + return true; + } + + uint32_t GetDexPc() const { return dex_pc_; } + + DECLARE_INSTRUCTION(SuspendCheck); + + private: + const uint32_t dex_pc_; + + DISALLOW_COPY_AND_ASSIGN(HSuspendCheck); +}; + class MoveOperands : public ArenaObject { public: MoveOperands(Location source, Location destination) |