5 #include "src/ast/variables.h" 7 #include "src/ast/scopes.h" 8 #include "src/globals.h" 9 #include "src/objects-inl.h" 17 Variable::Variable(Variable* other)
18 : scope_(other->scope_),
20 local_if_not_shadowed_(nullptr),
22 index_(other->index_),
23 initializer_position_(other->initializer_position_),
24 bit_field_(other->bit_field_) {}
26 bool Variable::IsGlobalObjectProperty()
const {
29 return (IsDynamicVariableMode(mode()) || mode() == VariableMode::kVar) &&
30 scope_ !=
nullptr && scope_->is_script_scope();