| Index: src/variables.h
|
| diff --git a/src/variables.h b/src/variables.h
|
| index dcd2e6af6e02d5d90d9221580bcd38bd867e3736..565b799e81b258f7990068c6bd01973de48b5dfb 100644
|
| --- a/src/variables.h
|
| +++ b/src/variables.h
|
| @@ -124,6 +124,8 @@ class Variable: public ZoneObject {
|
| index_ = index;
|
| }
|
|
|
| + void SetFromEval() { is_from_eval_ = true; }
|
| +
|
| static int CompareIndex(Variable* const* v, Variable* const* w);
|
|
|
| void RecordStrongModeReference(int start_position, int end_position) {
|
| @@ -144,6 +146,16 @@ class Variable: public ZoneObject {
|
| int strong_mode_reference_end_position() const {
|
| return strong_mode_reference_end_position_;
|
| }
|
| + PropertyAttributes DeclarationPropertyAttributes() const {
|
| + int property_attributes = NONE;
|
| + if (IsImmutableVariableMode(mode_)) {
|
| + property_attributes |= READ_ONLY;
|
| + }
|
| + if (is_from_eval_) {
|
| + property_attributes |= EVAL_DECLARED;
|
| + }
|
| + return static_cast<PropertyAttributes>(property_attributes);
|
| + }
|
|
|
| private:
|
| Scope* scope_;
|
| @@ -165,6 +177,9 @@ class Variable: public ZoneObject {
|
| // binding scope (exclusive).
|
| Variable* local_if_not_shadowed_;
|
|
|
| + // True if this variable is introduced by a sloppy eval
|
| + bool is_from_eval_;
|
| +
|
| // Usage info.
|
| bool force_context_allocation_; // set by variable resolver
|
| bool is_used_;
|
|
|