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

Unified Diff: src/assembler.h

Issue 6793016: Record AST ids in relocation info at spots where we collect dynamic type feedback. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: last change Created 9 years, 8 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 | « src/arm/macro-assembler-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index e8cecc3fdb941cbf02081ba5d60a8462b6c0e974..918de62a4239c2cd5b00f2e1dafa9b0a7ad9d2c5 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -42,7 +42,7 @@
namespace v8 {
namespace internal {
-
+const unsigned kNoASTId = -1;
// -----------------------------------------------------------------------------
// Platform independent assembler base class.
@@ -209,10 +209,11 @@ class RelocInfo BASE_EMBEDDED {
enum Mode {
// Please note the order is important (see IsCodeTarget, IsGCRelocMode).
+ CODE_TARGET, // Code target which is not any of the above.
+ CODE_TARGET_WITH_ID,
CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor.
CODE_TARGET_CONTEXT, // Code target used for contextual loads and stores.
DEBUG_BREAK, // Code target for the debugger statement.
- CODE_TARGET, // Code target which is not any of the above.
EMBEDDED_OBJECT,
GLOBAL_PROPERTY_CELL,
@@ -228,10 +229,12 @@ class RelocInfo BASE_EMBEDDED {
// add more as needed
// Pseudo-types
- NUMBER_OF_MODES, // must be no greater than 14 - see RelocInfoWriter
+ NUMBER_OF_MODES, // There are at most 14 modes with noncompact encoding.
NONE, // never recorded
- LAST_CODE_ENUM = CODE_TARGET,
- LAST_GCED_ENUM = GLOBAL_PROPERTY_CELL
+ LAST_CODE_ENUM = DEBUG_BREAK,
+ LAST_GCED_ENUM = GLOBAL_PROPERTY_CELL,
+ // Modes <= LAST_COMPACT_ENUM are guaranteed to have compact encoding.
+ LAST_COMPACT_ENUM = CODE_TARGET_WITH_ID
};
@@ -361,7 +364,8 @@ class RelocInfo BASE_EMBEDDED {
static const int kCodeTargetMask = (1 << (LAST_CODE_ENUM + 1)) - 1;
static const int kPositionMask = 1 << POSITION | 1 << STATEMENT_POSITION;
- static const int kDebugMask = kPositionMask | 1 << COMMENT;
+ static const int kDataMask =
+ (1 << CODE_TARGET_WITH_ID) | kPositionMask | (1 << COMMENT);
static const int kApplyMask; // Modes affected by apply. Depends on arch.
private:
@@ -380,9 +384,14 @@ class RelocInfo BASE_EMBEDDED {
// lower addresses.
class RelocInfoWriter BASE_EMBEDDED {
public:
- RelocInfoWriter() : pos_(NULL), last_pc_(NULL), last_data_(0) {}
- RelocInfoWriter(byte* pos, byte* pc) : pos_(pos), last_pc_(pc),
- last_data_(0) {}
+ RelocInfoWriter() : pos_(NULL),
+ last_pc_(NULL),
+ last_id_(0),
+ last_position_(0) {}
+ RelocInfoWriter(byte* pos, byte* pc) : pos_(pos),
+ last_pc_(pc),
+ last_id_(0),
+ last_position_(0) {}
byte* pos() const { return pos_; }
byte* last_pc() const { return last_pc_; }
@@ -407,13 +416,15 @@ class RelocInfoWriter BASE_EMBEDDED {
inline uint32_t WriteVariableLengthPCJump(uint32_t pc_delta);
inline void WriteTaggedPC(uint32_t pc_delta, int tag);
inline void WriteExtraTaggedPC(uint32_t pc_delta, int extra_tag);
+ inline void WriteExtraTaggedIntData(int data_delta, int top_tag);
inline void WriteExtraTaggedData(intptr_t data_delta, int top_tag);
inline void WriteTaggedData(intptr_t data_delta, int tag);
inline void WriteExtraTag(int extra_tag, int top_tag);
byte* pos_;
byte* last_pc_;
- intptr_t last_data_;
+ int last_id_;
+ int last_position_;
DISALLOW_COPY_AND_ASSIGN(RelocInfoWriter);
};
@@ -455,12 +466,13 @@ class RelocIterator: public Malloced {
int GetTopTag();
void ReadTaggedPC();
void AdvanceReadPC();
+ void AdvanceReadId();
+ void AdvanceReadPosition();
void AdvanceReadData();
void AdvanceReadVariableLengthPCJump();
- int GetPositionTypeTag();
- void ReadTaggedData();
-
- static RelocInfo::Mode DebugInfoModeFromTag(int tag);
+ int GetLocatableTypeTag();
+ void ReadTaggedId();
+ void ReadTaggedPosition();
// If the given mode is wanted, set it in rinfo_ and return true.
// Else return false. Used for efficiently skipping unwanted modes.
@@ -473,6 +485,8 @@ class RelocIterator: public Malloced {
RelocInfo rinfo_;
bool done_;
int mode_mask_;
+ int last_id_;
+ int last_position_;
DISALLOW_COPY_AND_ASSIGN(RelocIterator);
};
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698