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

Unified Diff: src/x64/macro-assembler-x64.h

Issue 10824079: Use a special EnumLength field to indicate number of valid enum cache values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: u Created 8 years, 5 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
Index: src/x64/macro-assembler-x64.h
diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h
index 68795a48c1f4e6ca73c282cd8983d9ae290cb775..b0c65e26cdcc669f4e817fdc16de9332c25aef61 100644
--- a/src/x64/macro-assembler-x64.h
+++ b/src/x64/macro-assembler-x64.h
@@ -945,6 +945,15 @@ class MacroAssembler: public Assembler {
Register temp_reg);
void LoadInstanceDescriptors(Register map, Register descriptors);
+ void EnumLength(Register dst, Register map);
+
+ template<typename Field>
+ void DecodeField(Register reg) {
+ static const int full_shift = Field::kShift + kSmiShift;
+ static const int low_mask = Field::kMask >> Field::kShift;
+ shr(reg, Immediate(full_shift));
+ and_(reg, Immediate(low_mask));
+ }
// Abort execution if argument is not a number. Used in debug code.
void AbortIfNotNumber(Register object);
« src/objects.h ('K') | « src/x64/lithium-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698