diff options
| author | 2014-09-15 12:21:36 +0000 | |
|---|---|---|
| committer | 2014-09-15 12:21:37 +0000 | |
| commit | 1c52115647f7bfac016ed47d3ee4d70078f9c074 (patch) | |
| tree | 71debbb7c475be1508e14a7986ed69e75e5b0e4c /compiler/optimizing/nodes.h | |
| parent | 8accb5ac557598fd40b80214bf87517bc4b7bc41 (diff) | |
| parent | 6fbce029fba3ed5da6c36017754ed408e6bcb632 (diff) | |
Merge "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) |