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

Unified Diff: runtime/vm/instructions_arm.h

Issue 24744002: Pattern match on generated code to find edge counters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. 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/flow_graph_compiler_x64.cc ('k') | runtime/vm/instructions_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_arm.h
diff --git a/runtime/vm/instructions_arm.h b/runtime/vm/instructions_arm.h
index 59cb2595866f54c7315c43573007e07eb674684a..05235d1d19e3b2c47384ecdf1d5bad8bd052fc62 100644
--- a/runtime/vm/instructions_arm.h
+++ b/runtime/vm/instructions_arm.h
@@ -15,6 +15,38 @@
namespace dart {
+class InstructionPattern : public AllStatic {
+ public:
+ // Decodes a load sequence ending at 'end' (the last instruction of the
+ // load sequence is the instruction before the one at end). Returns the
+ // address of the first instruction in the sequence. Returns the register
+ // being loaded and the loaded object in the output parameters 'reg' and
+ // 'obj' respectively.
+ static uword DecodeLoadObject(uword end,
+ const Array& object_pool,
+ Register* reg,
+ Object* obj);
+
+ // Decodes a load sequence ending at 'end' (the last instruction of the
+ // load sequence is the instruction before the one at end). Returns the
+ // address of the first instruction in the sequence. Returns the register
+ // being loaded and the loaded immediate value in the output parameters
+ // 'reg' and 'value' respectively.
+ static uword DecodeLoadWordImmediate(uword end,
+ Register* reg,
+ intptr_t* value);
+
+ // Decodes a load sequence ending at 'end' (the last instruction of the
+ // load sequence is the instruction before the one at end). Returns the
+ // address of the first instruction in the sequence. Returns the register
+ // being loaded and the index in the pool being read from in the output
+ // parameters 'reg' and 'index' respectively.
+ static uword DecodeLoadWordFromPool(uword end,
+ Register* reg,
+ intptr_t* index);
+};
+
+
class CallPattern : public ValueObject {
public:
CallPattern(uword pc, const Code& code);
@@ -32,17 +64,15 @@ class CallPattern : public ValueObject {
static void InsertAt(uword pc, uword target_address);
private:
- uword Back(int n) const;
- int DecodeLoadObject(int end, Register* reg, Object* obj);
- int DecodeLoadWordImmediate(int end, Register* reg, int* value);
- int DecodeLoadWordFromPool(int end, Register* reg, int* index);
- const uword* end_;
- int target_address_pool_index_;
- int args_desc_load_end_;
+ const Array& object_pool_;
+
+ uword end_;
+ uword args_desc_load_end_;
+ uword ic_data_load_end_;
+
+ intptr_t target_address_pool_index_;
Array& args_desc_;
- int ic_data_load_end_;
ICData& ic_data_;
- const Array& object_pool_;
DISALLOW_COPY_AND_ASSIGN(CallPattern);
};
@@ -71,4 +101,3 @@ class JumpPattern : public ValueObject {
} // namespace dart
#endif // VM_INSTRUCTIONS_ARM_H_
-
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/instructions_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698