Lines Matching refs:variable
116 // Left-hand side can only be a property, a global or a variable slot.
117 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
125 (property == NULL) ? VARIABLE : (property->key()->IsPropertyName())
169 // Bind the receiver variable.
355 Variable* variable = decl->proxy()->var();
358 switch (variable->location()) {
359 case Variable::UNALLOCATED: {
360 Handle<Oddball> value = variable->binding_needs_init()
363 globals()->Add(variable->name(), zone());
367 case Variable::PARAMETER:
368 case Variable::LOCAL:
371 environment()->Bind(variable, value);
374 case Variable::CONTEXT:
377 const Operator* op = javascript()->StoreContext(0, variable->index());
381 case Variable::LOOKUP:
388 Variable* variable = decl->proxy()->var();
389 switch (variable->location()) {
390 case Variable::UNALLOCATED: {
395 globals()->Add(variable->name(), zone());
399 case Variable::PARAMETER:
400 case Variable::LOCAL: {
403 environment()->Bind(variable, value);
406 case Variable::CONTEXT: {
409 const Operator* op = javascript()->StoreContext(0, variable->index());
413 case Variable::LOOKUP:
1019 // Left-hand side can only be a property, a global or a variable slot.
1025 case VARIABLE: {
1026 Variable* var = expr->AsVariableProxy()->var();
1064 // Left-hand side can only be a property, a global or a variable slot.
1070 case VARIABLE:
1088 case VARIABLE: {
1089 Variable* variable = expr->target()->AsVariableProxy()->var();
1090 old_value = BuildVariableLoad(variable, expr->target()->id());
1123 case VARIABLE: {
1124 Variable* variable = expr->target()->AsVariableProxy()->var();
1125 BuildVariableAssignment(variable, value, expr->op(),
1202 Variable* variable = callee->AsVariableProxy()->var();
1203 callee_value = BuildVariableLoad(variable, expr->expression()->id());
1208 Variable* variable = callee->AsVariableProxy()->var();
1209 DCHECK(variable->location() == Variable::LOOKUP);
1210 Node* name = jsgraph()->Constant(variable->name());
1376 // Left-hand side can only be a property, a global or a variable slot.
1388 case VARIABLE: {
1389 Variable* variable = expr->expression()->AsVariableProxy()->var();
1390 old_value = BuildVariableLoad(variable, expr->expression()->id());
1431 case VARIABLE: {
1432 Variable* variable = expr->expression()->AsVariableProxy()->var();
1434 BuildVariableAssignment(variable, value, expr->op(),
1586 Variable* variable = expr->expression()->AsVariableProxy()->var();
1587 DCHECK(strict_mode() == SLOPPY || variable->is_this());
1588 value = BuildVariableDelete(variable);
1615 // perform a non-contextual load in case the operand is a variable proxy.
1616 Variable* variable = expr->expression()->AsVariableProxy()->var();
1618 BuildVariableLoad(variable, expr->expression()->id(), NOT_CONTEXTUAL);
1693 Variable* variable = info()->scope()->parameter(i);
1694 if (!variable->IsContextSlot()) continue;
1698 // Context variable (at bottom of the context chain).
1699 DCHECK_EQ(0, info()->scope()->ContextChainLength(variable->scope()));
1700 const Operator* op = javascript()->StoreContext(0, variable->index());
1708 Node* AstGraphBuilder::BuildArgumentsObject(Variable* arguments) {
1716 // Assign the object to the arguments variable.
1740 Node* AstGraphBuilder::BuildHoleCheckThrow(Node* value, Variable* variable,
1747 environment()->Push(BuildThrowReferenceError(variable));
1755 Node* AstGraphBuilder::BuildVariableLoad(Variable* variable,
1759 VariableMode mode = variable->mode();
1760 switch (variable->location()) {
1761 case Variable::UNALLOCATED: {
1762 // Global var, const, or let variable.
1764 Unique<Name> name = MakeUnique(variable->name());
1770 case Variable::PARAMETER:
1771 case Variable::LOCAL: {
1772 // Local var, const, or let variable.
1773 Node* value = environment()->Lookup(variable);
1785 value = BuildThrowReferenceError(variable);
1787 value = BuildHoleCheckThrow(value, variable, value);
1792 case Variable::CONTEXT: {
1793 // Context variable (potentially up the context chain).
1794 int depth = current_scope()->ContextChainLength(variable->scope());
1795 bool immutable = variable->maybe_assigned() == kNotAssigned;
1797 javascript()->LoadContext(depth, variable->index(), immutable);
1808 value = BuildHoleCheckThrow(value, variable, value);
1812 case Variable::LOOKUP: {
1813 // Dynamic lookup of context variable (anywhere in the chain).
1814 Node* name = jsgraph()->Constant(variable->name());
1829 Node* AstGraphBuilder::BuildVariableDelete(Variable* variable) {
1830 switch (variable->location()) {
1831 case Variable::UNALLOCATED: {
1832 // Global var, const, or let variable.
1834 Node* name = jsgraph()->Constant(variable->name());
1838 case Variable::PARAMETER:
1839 case Variable::LOCAL:
1840 case Variable::CONTEXT:
1841 // Local var, const, or let variable or context variable.
1842 return variable->is_this() ? jsgraph()->TrueConstant()
1844 case Variable::LOOKUP: {
1845 // Dynamic lookup of context variable (anywhere in the chain).
1846 Node* name = jsgraph()->Constant(variable->name());
1856 Node* AstGraphBuilder::BuildVariableAssignment(Variable* variable, Node* value,
1860 VariableMode mode = variable->mode();
1861 switch (variable->location()) {
1862 case Variable::UNALLOCATED: {
1863 // Global var, const, or let variable.
1865 Unique<Name> name = MakeUnique(variable->name());
1871 case Variable::PARAMETER:
1872 case Variable::LOCAL:
1873 // Local var, const, or let variable.
1876 Node* current = environment()->Lookup(variable);
1887 // temporal dead zone of a let declared variable.
1888 Node* current = environment()->Lookup(variable);
1890 value = BuildThrowReferenceError(variable);
1892 value = BuildHoleCheckThrow(current, variable, value);
1898 environment()->Bind(variable, value);
1900 case Variable::CONTEXT: {
1901 // Context variable (potentially up the context chain).
1902 int depth = current_scope()->ContextChainLength(variable->scope());
1906 javascript()->LoadContext(depth, variable->index(), false);
1915 javascript()->LoadContext(depth, variable->index(), false);
1917 value = BuildHoleCheckThrow(current, variable, value);
1922 const Operator* op = javascript()->StoreContext(depth, variable->index());
1925 case Variable::LOOKUP: {
1926 // Dynamic lookup of context variable (anywhere in the chain).
1927 Node* name = jsgraph()->Constant(variable->name());
1970 Node* AstGraphBuilder::BuildThrowReferenceError(Variable* variable) {
1972 Node* variable_name = jsgraph()->Constant(variable->name());