Index: src/scopeinfo.h |
diff --git a/src/scopeinfo.h b/src/scopeinfo.h |
index 7b8ed44d5bd6280f5773625ce4f15af2f137c326..4de325939588446f44bf91ed8d59e42e2029877f 100644 |
--- a/src/scopeinfo.h |
+++ b/src/scopeinfo.h |
@@ -20,17 +20,14 @@ class ContextSlotCache { |
public: |
// Lookup context slot index for (data, name). |
// If absent, kNotFound is returned. |
- int Lookup(Object* data, |
- String* name, |
- VariableMode* mode, |
- InitializationFlag* init_flag); |
+ int Lookup(Object* data, String* name, VariableMode* mode, |
+ InitializationFlag* init_flag, |
+ MaybeAssignedFlag* maybe_assigned_flag); |
// Update an element in the cache. |
- void Update(Handle<Object> data, |
- Handle<String> name, |
- VariableMode mode, |
+ void Update(Handle<Object> data, Handle<String> name, VariableMode mode, |
InitializationFlag init_flag, |
- int slot_index); |
+ MaybeAssignedFlag maybe_assigned_flag, int slot_index); |
// Clear the cache. |
void Clear(); |
@@ -49,11 +46,9 @@ class ContextSlotCache { |
inline static int Hash(Object* data, String* name); |
#ifdef DEBUG |
- void ValidateEntry(Handle<Object> data, |
- Handle<String> name, |
- VariableMode mode, |
- InitializationFlag init_flag, |
- int slot_index); |
+ void ValidateEntry(Handle<Object> data, Handle<String> name, |
+ VariableMode mode, InitializationFlag init_flag, |
+ MaybeAssignedFlag maybe_assigned_flag, int slot_index); |
#endif |
static const int kLength = 256; |
@@ -63,17 +58,18 @@ class ContextSlotCache { |
}; |
struct Value { |
- Value(VariableMode mode, |
- InitializationFlag init_flag, |
- int index) { |
+ Value(VariableMode mode, InitializationFlag init_flag, |
+ MaybeAssignedFlag maybe_assigned_flag, int index) { |
ASSERT(ModeField::is_valid(mode)); |
ASSERT(InitField::is_valid(init_flag)); |
+ ASSERT(MaybeAssignedField::is_valid(maybe_assigned_flag)); |
ASSERT(IndexField::is_valid(index)); |
- value_ = ModeField::encode(mode) | |
- IndexField::encode(index) | |
- InitField::encode(init_flag); |
+ value_ = ModeField::encode(mode) | IndexField::encode(index) | |
+ InitField::encode(init_flag) | |
+ MaybeAssignedField::encode(maybe_assigned_flag); |
ASSERT(mode == this->mode()); |
ASSERT(init_flag == this->initialization_flag()); |
+ ASSERT(maybe_assigned_flag == this->maybe_assigned_flag()); |
ASSERT(index == this->index()); |
} |
@@ -87,13 +83,18 @@ class ContextSlotCache { |
return InitField::decode(value_); |
} |
+ MaybeAssignedFlag maybe_assigned_flag() { |
+ return MaybeAssignedField::decode(value_); |
+ } |
+ |
int index() { return IndexField::decode(value_); } |
// Bit fields in value_ (type, shift, size). Must be public so the |
// constants can be embedded in generated code. |
- class ModeField: public BitField<VariableMode, 0, 4> {}; |
- class InitField: public BitField<InitializationFlag, 4, 1> {}; |
- class IndexField: public BitField<int, 5, 32-5> {}; |
+ class ModeField : public BitField<VariableMode, 0, 4> {}; |
+ class InitField : public BitField<InitializationFlag, 4, 1> {}; |
+ class MaybeAssignedField : public BitField<MaybeAssignedFlag, 5, 1> {}; |
+ class IndexField : public BitField<int, 6, 32 - 6> {}; |
private: |
uint32_t value_; |