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

Unified Diff: runtime/vm/instructions_ia32.h

Issue 1376963002: Cleanup: we are not patching entries any longer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 3 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 | « runtime/vm/compiler.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698