Index: runtime/vm/instructions_ia32.h |
diff --git a/runtime/vm/instructions_ia32.h b/runtime/vm/instructions_ia32.h |
index 9cf5243311e768159e13aa1905e7a54b2b12f617..33d648f44c0bf3de8e7974ae528708541bb17618 100644 |
--- a/runtime/vm/instructions_ia32.h |
+++ b/runtime/vm/instructions_ia32.h |
@@ -62,44 +62,32 @@ template<class P> class InstructionPattern : public ValueObject { |
}; |
-template<class P> |
-class CallOrJumpPattern : public InstructionPattern<P> { |
+class CallPattern : public InstructionPattern<CallPattern> { |
public: |
+ explicit CallPattern(uword pc) : InstructionPattern(pc) {} |
uword TargetAddress() const { |
ASSERT(this->IsValid()); |
return this->start() + |
- P::pattern_length_in_bytes() + |
+ CallPattern::pattern_length_in_bytes() + |
*reinterpret_cast<uword*>(this->start() + 1); |
} |
void SetTargetAddress(uword new_target) const { |
ASSERT(this->IsValid()); |
*reinterpret_cast<uword*>(this->start() + 1) = |
- new_target - this->start() - P::pattern_length_in_bytes(); |
+ new_target - this->start() - CallPattern::pattern_length_in_bytes(); |
CPU::FlushICache(this->start() + 1, kWordSize); |
} |
- protected: |
- explicit CallOrJumpPattern(uword pc) : InstructionPattern<P>(pc) {} |
- |
- private: |
- DISALLOW_COPY_AND_ASSIGN(CallOrJumpPattern); |
-}; |
- |
- |
-class CallPattern : public CallOrJumpPattern<CallPattern> { |
- public: |
- explicit CallPattern(uword pc) : CallOrJumpPattern(pc) {} |
- |
static int pattern_length_in_bytes() { return kLengthInBytes; } |
static const int* pattern() { |
static const int kCallPattern[kLengthInBytes] = {0xE8, -1, -1, -1, -1}; |
return kCallPattern; |
} |
+ |
private: |
static const int kLengthInBytes = 5; |
- |
DISALLOW_COPY_AND_ASSIGN(CallPattern); |
}; |