Lines Matching full:slot
214 Slot* slot = par->slot();
215 if (slot != NULL && slot->type() == Slot::CONTEXT) {
217 // because the slot is guaranteed to be a context slot.
229 __ mov(SlotOperand(slot, context.reg()), value.reg());
230 int offset = FixedArray::kHeaderSize + slot->index() * kPointerSize;
250 StoreToSlot(scope()->function()->slot(), NOT_CONST_INIT);
358 Operand CodeGenerator::SlotOperand(Slot* slot, Register tmp) {
367 ASSERT(slot != NULL);
368 int index = slot->index();
369 switch (slot->type()) {
370 case Slot::PARAMETER:
373 case Slot::LOCAL:
376 case Slot::CONTEXT: {
380 int chain_length = scope()->ContextChainLength(slot->var()->scope());
409 Operand CodeGenerator::ContextSlotOperandCheckExtensions(Slot* slot,
412 ASSERT(slot->type() == Slot::CONTEXT);
416 for (Scope* s = scope(); s != slot->var()->scope(); s = s->outer_scope()) {
433 return ContextOperand(tmp.reg(), slot->index());
575 Slot global(variable, Slot::CONTEXT, Context::GLOBAL_INDEX);
580 } else if (variable != NULL && variable->slot() != NULL) {
581 // For a variable that rewrites to a slot, we signal it is the immediate
584 LoadFromSlotCheckForArguments(variable->slot(), INSIDE_TYPEOF);
626 ASSERT(arguments != NULL && arguments->slot() != NULL);
627 ASSERT(shadow != NULL && shadow->slot() != NULL);
631 // We have to skip storing into the arguments slot if it has already
634 Result probe = LoadFromSlot(arguments->slot(), NOT_INSIDE_TYPEOF);
646 StoreToSlot(arguments->slot(), NOT_CONST_INIT);
649 StoreToSlot(shadow->slot(), NOT_CONST_INIT);
706 ASSERT(var->slot() != NULL);
707 ref->set_type(Reference::SLOT);
2475 LoadFromSlot(scope()->arguments()->var()->slot(), NOT_INSIDE_TYPEOF);
2729 Slot* slot = var->slot();
2734 if (slot != NULL && slot->type() == Slot::LOOKUP) {
2735 // Variables with a "LOOKUP" slot were introduced as non-locals
3512 // [iteration counter (smi)] <- slot 0
3513 // [length of array] <- slot 1
3514 // [FixedArray] <- slot 2
3515 // [Map or 0] <- slot 3
3516 // [Object] <- slot 4
3582 frame_->EmitPush(eax); // push the Object (slot 4) for the runtime call
3608 frame_->EmitPush(eax); // <- slot 3
3609 frame_->EmitPush(edx); // <- slot 2
3612 frame_->EmitPush(eax); // <- slot 1
3613 frame_->EmitPush(Immediate(Smi::FromInt(0))); // <- slot 0
3618 frame_->EmitPush(Immediate(Smi::FromInt(0))); // <- slot 3
3619 frame_->EmitPush(eax); // <- slot 2
3624 frame_->EmitPush(eax); // <- slot 1
3625 frame_->EmitPush(Immediate(Smi::FromInt(0))); // <- slot 0
3680 // If the reference was to a slot we rely on the convenient property
3732 ASSERT(catch_var != NULL && catch_var->slot() != NULL);
3733 StoreToSlot(catch_var->slot(), NOT_CONST_INIT);
4129 Result CodeGenerator::LoadFromSlot(Slot* slot, TypeofState typeof_state) {
4131 if (slot->type() == Slot::LOOKUP) {
4132 ASSERT(slot->var()->is_dynamic());
4141 if (slot->var()->mode() == Variable::DYNAMIC_GLOBAL) {
4142 slot, typeof_state, &slow);
4147 } else if (slot->var()->mode() == Variable::DYNAMIC_LOCAL) {
4148 Slot* potential_slot = slot->var()->local_if_not_shadowed()->slot();
4179 frame()->EmitPush(Immediate(slot->var()->name()));
4190 } else if (slot->var()->mode() == Variable::CONST) {
4200 __ mov(ecx, SlotOperand(slot, ecx));
4207 } else if (slot->type() == Slot::PARAMETER) {
4208 frame()->PushParameterAt(slot->index());
4211 } else if (slot->type() == Slot::LOCAL) {
4212 frame()->PushLocalAt(slot->index());
4216 // The other remaining slot types (LOOKUP and GLOBAL) cannot reach
4220 // because it will always be a context slot.
4221 ASSERT(slot->type() == Slot::CONTEXT);
4224 __ mov(result.reg(), SlotOperand(slot, result.reg()));
4230 Result CodeGenerator::LoadFromSlotCheckForArguments(Slot* slot,
4232 Result result = LoadFromSlot(slot, state);
4237 // ... or if the slot isn't a non-parameter arguments slot.
4238 if (slot->type() == Slot::PARAMETER || !slot->is_arguments()) return result;
4266 Slot* slot,
4326 frame_->Push(slot->var()->name());
4339 void CodeGenerator::StoreToSlot(Slot* slot, InitState init_state) {
4340 if (slot->type() == Slot::LOOKUP) {
4341 ASSERT(slot->var()->is_dynamic());
4349 frame_->EmitPush(Immediate(slot->var()->name()));
4354 // (e.g. READ_ONLY) of context slot so that we can initialize const
4359 // context slot declaration, but we cannot initialize it at the same
4365 // split into 2 operations: declaration of the context slot followed
4377 ASSERT(!slot->var()->is_dynamic());
4381 ASSERT(slot->var()->mode() == Variable::CONST);
4382 // Only the first const initialization must be executed (the slot
4391 __ mov(ecx, SlotOperand(slot, ecx));
4400 // Note: We will reach here even with slot->var()->mode() ==
4403 if (slot->type() == Slot::PARAMETER) {
4404 frame_->StoreToParameterAt(slot->index());
4405 } else if (slot->type() == Slot::LOCAL) {
4406 frame_->StoreToLocalAt(slot->index());
4408 // The other slot types (LOOKUP and GLOBAL) cannot reach here.
4411 // because the slot is a context slot.
4412 ASSERT(slot->type() == Slot::CONTEXT);
4418 __ mov(SlotOperand(slot, start.reg()), value.reg());
4424 int offset = FixedArray::kHeaderSize + slot->index() * kPointerSize;
4437 void CodeGenerator::VisitSlot(Slot* node) {
4438 Comment cmnt(masm_, "[ Slot");
4742 Slot* slot = var->slot();
4743 ASSERT(slot != NULL);
4747 Result result = LoadFromSlotCheckForArguments(slot, NOT_INSIDE_TYPEOF);
4764 StoreToSlot(slot,
5020 // Allocate a frame slot for the receiver.
5087 } else if (var != NULL && var->slot() != NULL &&
5088 var->slot()->type() == Slot::LOOKUP) {
5911 Slot* slot = variable->slot();
5920 } else if (slot != NULL && slot->type() == Slot::LOOKUP) {
6131 // Postfix operations need a stack slot under the reference to hold
6209 // Postfix: store the old value in the allocated slot under the
7045 case SLOT: {
7046 Comment cmnt(masm, "[ Load from Slot");
7047 Slot* slot = expression_->AsVariableProxy()->AsVariable()->slot();
7048 ASSERT(slot != NULL);
7050 cgen_->LoadFromSlotCheckForArguments(slot, NOT_INSIDE_TYPEOF);
7086 // slot. For all others, we fall back on GetValue.
7089 if (type_ != SLOT) {
7094 Slot* slot = expression_->AsVariableProxy()->AsVariable()->slot();
7095 ASSERT(slot != NULL);
7096 if (slot->type() == Slot::LOOKUP ||
7097 slot->type() == Slot::CONTEXT ||
7098 slot->var()->mode() == Variable::CONST ||
7099 slot->is_arguments()) {
7107 ASSERT(!slot->is_arguments());
7108 if (slot->type() == Slot::PARAMETER) {
7109 cgen_->frame()->TakeParameterAt(slot->index());
7111 ASSERT(slot->type() == Slot::LOCAL);
7112 cgen_->frame()->TakeLocalAt(slot->index());
7125 case SLOT: {
7126 Comment cmnt(masm, "[ Store to Slot");
7127 Slot* slot = expression_->AsVariableProxy()->AsVariable()->slot();
7128 ASSERT(slot != NULL);
7129 cgen_->StoreToSlot(slot, init_state);
9328 // Add previous index (from its stack slot) if value is not negative.
10087 __ push(Immediate(Smi::FromInt(marker))); // context slot
10088 __ push(Immediate(Smi::FromInt(marker))); // function slot