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

Unified Diff: runtime/vm/instructions_x64.h

Issue 22825023: Uses an object pool on x64 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/instructions_mips_test.cc ('k') | runtime/vm/instructions_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_x64.h
===================================================================
--- runtime/vm/instructions_x64.h (revision 27291)
+++ runtime/vm/instructions_x64.h (working copy)
@@ -11,6 +11,7 @@
#endif
#include "vm/allocation.h"
+#include "vm/object.h"
namespace dart {
@@ -37,6 +38,8 @@
virtual const int* pattern() const = 0;
virtual int pattern_length_in_bytes() const = 0;
+ static intptr_t IndexFromPPLoad(uword start);
+
protected:
uword start() const { return start_; }
@@ -52,46 +55,47 @@
};
-class CallOrJumpPattern : public InstructionPattern {
+class CallPattern : public InstructionPattern {
public:
- virtual int pattern_length_in_bytes() const {
+ CallPattern(uword pc, const Code& code)
+ : InstructionPattern(pc),
+ code_(code) {}
+ static int InstructionLength() {
return kLengthInBytes;
}
uword TargetAddress() const;
void SetTargetAddress(uword new_target) const;
-
- protected:
- explicit CallOrJumpPattern(uword pc) : InstructionPattern(pc) {}
- static const int kLengthInBytes = 13;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CallOrJumpPattern);
-};
-
-
-class CallPattern : public CallOrJumpPattern {
- public:
- explicit CallPattern(uword pc) : CallOrJumpPattern(pc) {}
- static int InstructionLength() {
+ virtual int pattern_length_in_bytes() const {
return kLengthInBytes;
}
private:
+ static const int kLengthInBytes = 13;
virtual const int* pattern() const;
+ const Code& code_;
DISALLOW_COPY_AND_ASSIGN(CallPattern);
};
-class JumpPattern : public CallOrJumpPattern {
+class JumpPattern : public InstructionPattern {
public:
- explicit JumpPattern(uword pc) : CallOrJumpPattern(pc) {}
+ JumpPattern(uword pc, const Code& code)
+ : InstructionPattern(pc),
+ object_pool_(Array::Handle(code.ObjectPool())) {}
static int InstructionLength() {
return kLengthInBytes;
}
+ uword TargetAddress() const;
+ void SetTargetAddress(uword new_target) const;
+ virtual int pattern_length_in_bytes() const {
+ return kLengthInBytes;
+ }
private:
+ static const int kLengthInBytes = 10;
virtual const int* pattern() const;
+ const Array& object_pool_;
DISALLOW_COPY_AND_ASSIGN(JumpPattern);
};
« no previous file with comments | « runtime/vm/instructions_mips_test.cc ('k') | runtime/vm/instructions_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698