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

Unified Diff: src/property-details.h

Issue 61623004: Add signed/unsigned 8-bit and 16-bit Representations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Tweaks Created 7 years, 1 month 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/property-details.h
diff --git a/src/property-details.h b/src/property-details.h
index 659fbd1da6e2b5829cb0d3d5a0e4d305c106ba9b..dc2f4fc3b9b3f9b2bb77d98939a4bbad59f178a7 100644
--- a/src/property-details.h
+++ b/src/property-details.h
@@ -82,7 +82,10 @@ class Representation {
public:
enum Kind {
kNone,
- kByte,
+ kInteger8,
+ kUInteger8,
+ kInteger16,
+ kUInteger16,
kSmi,
kInteger32,
kDouble,
@@ -96,7 +99,12 @@ class Representation {
static Representation None() { return Representation(kNone); }
static Representation Tagged() { return Representation(kTagged); }
- static Representation Byte() { return Representation(kByte); }
+ static Representation Integer8() { return Representation(kInteger8); }
+ static Representation UInteger8() { return Representation(kUInteger8); }
+ static Representation Integer16() { return Representation(kInteger16); }
+ static Representation UInteger16() {
+ return Representation(kUInteger16);
+ }
static Representation Smi() { return Representation(kSmi); }
static Representation Integer32() { return Representation(kInteger32); }
static Representation Double() { return Representation(kDouble); }
@@ -141,7 +149,10 @@ class Representation {
Kind kind() const { return static_cast<Kind>(kind_); }
bool IsNone() const { return kind_ == kNone; }
- bool IsByte() const { return kind_ == kByte; }
+ bool IsInteger8() const { return kind_ == kInteger8; }
+ bool IsUInteger8() const { return kind_ == kUInteger8; }
+ bool IsInteger16() const { return kind_ == kInteger16; }
+ bool IsUInteger16() const { return kind_ == kUInteger16; }
bool IsTagged() const { return kind_ == kTagged; }
bool IsSmi() const { return kind_ == kSmi; }
bool IsSmiOrTagged() const { return IsSmi() || IsTagged(); }
@@ -151,7 +162,9 @@ class Representation {
bool IsHeapObject() const { return kind_ == kHeapObject; }
bool IsExternal() const { return kind_ == kExternal; }
bool IsSpecialization() const {
- return IsByte() || IsSmi() || IsInteger32() || IsDouble();
+ return IsInteger8() || IsUInteger8() ||
+ IsInteger16() || IsUInteger16() ||
+ IsSmi() || IsInteger32() || IsDouble();
}
const char* Mnemonic() const;
@@ -256,8 +269,8 @@ class PropertyDetails BASE_EMBEDDED {
// Bit fields for fast objects.
class DescriptorPointer: public BitField<uint32_t, 6, 11> {};
- class RepresentationField: public BitField<uint32_t, 17, 3> {};
- class FieldIndexField: public BitField<uint32_t, 20, 11> {};
+ class RepresentationField: public BitField<uint32_t, 17, 4> {};
+ class FieldIndexField: public BitField<uint32_t, 21, 10> {};
static const int kInitialIndex = 1;

Powered by Google App Engine
This is Rietveld 408576698