Index: runtime/vm/instructions_mips.h |
diff --git a/runtime/vm/instructions_mips.h b/runtime/vm/instructions_mips.h |
index d3e784d66301d51f07a75d4852b09e2372a9501f..51875b5194e0facd1ebb2d4d885369274ad469ae 100644 |
--- a/runtime/vm/instructions_mips.h |
+++ b/runtime/vm/instructions_mips.h |
@@ -54,12 +54,14 @@ class CallPattern : public ValueObject { |
RawICData* IcData(); |
- RawCode* TargetCode() const; |
- void SetTargetCode(const Code& target) const; |
+ uword TargetAddress() const; |
+ void SetTargetAddress(uword target_address) const; |
- static const int kDeoptCallLengthInBytes = 4 * Instr::kInstrSize; |
+ // This constant length is only valid for inserted call patterns used for |
+ // lazy deoptimization. Regular call pattern may vary in length. |
+ static const int kFixedLengthInBytes = 4 * Instr::kInstrSize; |
- static void InsertDeoptCallAt(uword pc, uword target_address); |
+ static void InsertAt(uword pc, uword target_address); |
private: |
const ObjectPool& object_pool_; |
@@ -67,7 +69,7 @@ class CallPattern : public ValueObject { |
uword end_; |
uword ic_data_load_end_; |
- intptr_t target_code_pool_index_; |
+ intptr_t target_address_pool_index_; |
ICData& ic_data_; |
DISALLOW_COPY_AND_ASSIGN(CallPattern); |
@@ -78,8 +80,8 @@ class NativeCallPattern : public ValueObject { |
public: |
NativeCallPattern(uword pc, const Code& code); |
- RawCode* target() const; |
- void set_target(const Code& target) const; |
+ uword target() const; |
+ void set_target(uword target_address) const; |
NativeFunction native_function() const; |
void set_native_function(NativeFunction target) const; |
@@ -89,12 +91,34 @@ class NativeCallPattern : public ValueObject { |
uword end_; |
intptr_t native_function_pool_index_; |
- intptr_t target_code_pool_index_; |
+ intptr_t target_address_pool_index_; |
DISALLOW_COPY_AND_ASSIGN(NativeCallPattern); |
}; |
+class JumpPattern : public ValueObject { |
+ public: |
+ JumpPattern(uword pc, const Code& code); |
+ |
+ // lui; ori; jr; nop (in delay slot) = 4. |
+ static const int kLengthInBytes = 4*Instr::kInstrSize; |
+ |
+ int pattern_length_in_bytes() const { |
+ return kLengthInBytes; |
+ } |
+ |
+ bool IsValid() const; |
+ uword TargetAddress() const; |
+ void SetTargetAddress(uword target_address) const; |
+ |
+ private: |
+ const uword pc_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(JumpPattern); |
+}; |
+ |
+ |
class ReturnPattern : public ValueObject { |
public: |
explicit ReturnPattern(uword pc); |