Lines Matching refs:CONTEXT
111 // o rsi: our context
160 // Generators allocate locals, if any, in context slots.
174 // Possibly allocate a local context.
175 int heap_slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
177 Comment cmnt(masm_, "[ Allocate context");
190 // Context is returned in both rax and rsi. It replaces the context
194 // Copy any necessary parameters into the context.
203 // Store it in the context.
204 int context_offset = Context::SlotOffset(var->index());
216 // Arguments object must be allocated after the context object, in
217 // case the "arguments" or ".arguments" variables are in the context.
716 int offset = Context::SlotOffset(var->index());
727 // context. Otherwise, we let the Visit function deal with the
729 if (!context()->IsTest() || !info_->IsOptimizable()) return;
743 // The variable in the declaration always resides in the current context.
746 // Check that we're not inside a with or catch context.
760 // local context.
783 case Variable::CONTEXT:
842 case Variable::CONTEXT: {
847 int offset = Context::SlotOffset(variable->index());
875 ASSERT(variable->location() == Variable::CONTEXT);
884 __ movq(rax, ContextOperand(rax, Context::EXTENSION_INDEX));
890 Context::SlotOffset(variable->index()),
911 case Variable::CONTEXT: {
933 __ push(rsi); // The context is the first argument.
1190 { EffectContext context(this);
1298 context()->Plug(rax);
1311 Register context = rsi;
1319 __ cmpq(ContextOperand(context, Context::EXTENSION_INDEX),
1323 // Load next context in chain.
1324 __ movq(temp, ContextOperand(context, Context::PREVIOUS_INDEX));
1326 context = temp;
1329 // context extensions. If we have reached an eval scope, we check
1336 // Loop up the context chain. There is no frame effect so it is
1339 if (!context.is(temp)) {
1340 __ movq(temp, context);
1345 // Terminate at native context.
1349 __ cmpq(ContextOperand(temp, Context::EXTENSION_INDEX), Immediate(0));
1351 // Load next context in chain.
1352 __ movq(temp, ContextOperand(temp, Context::PREVIOUS_INDEX));
1372 Register context = rsi;
1379 __ cmpq(ContextOperand(context, Context::EXTENSION_INDEX),
1383 __ movq(temp, ContextOperand(context, Context::PREVIOUS_INDEX));
1385 context = temp;
1389 __ cmpq(ContextOperand(context, Context::EXTENSION_INDEX), Immediate(0));
1395 return ContextOperand(context, var->index());
1447 context()->Plug(rax);
1453 case Variable::CONTEXT: {
1454 Comment cmnt(masm_, var->IsContextSlot() ? "Context slot" : "Stack slot");
1507 context()->Plug(rax);
1511 context()->Plug(var);
1522 __ push(rsi); // Context.
1526 context()->Plug(rax);
1583 context()->Plug(rax);
1718 context()->PlugTOS();
1720 context()->Plug(rax);
1837 context()->PlugTOS();
1839 context()->Plug(rax);
1895 { AccumulatorValueContext context(this);
1920 AccumulatorValueContext context(this);
1945 context()->Plug(rax);
1999 context()->Plug(result_register());
2097 context()->DropAndPlug(2, rax); // drop iter and g
2122 // Load suspended function and context.
2151 __ push(rsi); // Callee's context.
2197 context()->Plug(result_register());
2312 context()->Plug(rax);
2325 context()->Plug(rax);
2351 EffectContext context(this);
2381 context()->Plug(rax);
2409 // able to drill a hole to that function context, even from inside a
2410 // 'with' context. We thus bypass the normal static scope lookup for
2422 __ push(rsi); // Context.
2440 rcx, Context::SlotOffset(var->index()), rdx, rbx, kDontSaveFPRegs);
2460 rcx, Context::SlotOffset(var->index()), rdx, rbx, kDontSaveFPRegs);
2465 __ push(rsi); // Context.
2491 context()->Plug(rax);
2508 context()->Plug(rax);
2520 context()->Plug(rax);
2526 context()->Plug(rax);
2558 // Restore context register.
2560 context()->Plug(rax);
2591 // Restore context register.
2593 context()->DropAndPlug(1, rax); // Drop the key still on the stack.
2621 // Restore context register.
2624 context()->DropAndPlug(1, rax);
2694 // Restore context register.
2696 context()->DropAndPlug(1, rax);
2804 context()->Plug(rax);
2818 context()->PrepareTest(&materialize_true, &materialize_false,
2825 context()->Plug(if_true, if_false);
2839 context()->PrepareTest(&materialize_true, &materialize_false,
2846 context()->Plug(if_true, if_false);
2860 context()->PrepareTest(&materialize_true, &materialize_false,
2878 context()->Plug(if_true, if_false);
2892 context()->PrepareTest(&materialize_true, &materialize_false,
2900 context()->Plug(if_true, if_false);
2914 context()->PrepareTest(&materialize_true, &materialize_false,
2924 context()->Plug(if_true, if_false);
2939 context()->PrepareTest(&materialize_true, &materialize_false,
3004 __ movq(rdx, Operand(rsi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
3007 ContextOperand(rdx, Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX));
3011 context()->Plug(if_true, if_false);
3025 context()->PrepareTest(&materialize_true, &materialize_false,
3033 context()->Plug(if_true, if_false);
3047 context()->PrepareTest(&materialize_true, &materialize_false,
3060 context()->Plug(if_true, if_false);
3074 context()->PrepareTest(&materialize_true, &materialize_false,
3082 context()->Plug(if_true, if_false);
3096 context()->PrepareTest(&materialize_true, &materialize_false,
3104 context()->Plug(if_true, if_false);
3116 context()->PrepareTest(&materialize_true, &materialize_false,
3136 context()->Plug(if_true, if_false);
3152 context()->PrepareTest(&materialize_true, &materialize_false,
3160 context()->Plug(if_true, if_false);
3175 context()->Plug(rax);
3198 context()->Plug(rax);
3259 context()->Plug(rax);
3280 context()->Plug(rax);
3293 context()->Plug(rax);
3307 context()->Plug(rax);
3326 context()->Plug(rax);
3373 context()->Plug(rax);
3406 context()->Plug(string);
3439 context()->Plug(rax);
3451 context()->Plug(rax);
3479 context()->Plug(rax);
3492 context()->Plug(rax);
3511 context()->Plug(rbx);
3557 context()->Plug(result);
3605 context()->Plug(result);
3627 context()->Plug(rax);
3640 context()->Plug(rax);
3652 context()->Plug(rax);
3662 context()->Plug(rax);
3695 context()->Plug(rax);
3707 context()->Plug(rax);
3723 context()->Plug(rax);
3732 __ movq(cache, ContextOperand(rsi, Context::GLOBAL_OBJECT_INDEX));
3736 ContextOperand(cache, Context::JSFUNCTION_RESULT_CACHES_INDEX));
3764 context()->Plug(rax);
3803 context()->Plug(rax);
3817 context()->PrepareTest(&materialize_true, &materialize_false,
3826 context()->Plug(if_true, if_false);
3841 context()->Plug(rax);
4123 // Drop temp values from the stack, and restore context register.
4126 context()->Plug(rax);
4160 // Restore context register.
4165 context()->Plug(rax);
4183 context()->Plug(rax);
4194 context()->Plug(rax);
4199 context()->Plug(var->is_this());
4202 // context where the variable was introduced.
4206 context()->Plug(rax);
4212 context()->Plug(true);
4220 context()->Plug(Heap::kUndefinedValueRootIndex);
4226 if (context()->IsEffect()) {
4230 } else if (context()->IsTest()) {
4231 const TestContext* test = TestContext::cast(context());
4237 context()->Plug(test->true_label(), test->false_label());
4240 // for control and plugging the control flow into the context,
4243 ASSERT(context()->IsAccumulatorValue() || context()->IsStackValue());
4251 if (context()->IsAccumulatorValue()) {
4259 if (context()->IsAccumulatorValue()) {
4271 { StackValueContext context(this);
4275 context()->Plug(rax);
4301 // In case of a property we use the uninitialized expression context
4311 AccumulatorValueContext context(this);
4315 if (expr->is_postfix() && !context()->IsEffect()) {
4348 if (!context()->IsEffect()) {
4383 if (!context()->IsEffect()) {
4420 { EffectContext context(this);
4424 context.Plug(rax);
4428 if (!context()->IsEffect()) {
4429 context()->PlugTOS();
4436 context()->Plug(rax);
4448 if (!context()->IsEffect()) {
4449 context()->PlugTOS();
4452 context()->Plug(rax);
4465 if (!context()->IsEffect()) {
4466 context()->PlugTOS();
4469 context()->Plug(rax);
4479 ASSERT(!context()->IsEffect());
4480 ASSERT(!context()->IsTest());
4491 context()->Plug(rax);
4506 context()->Plug(rax);
4521 context()->PrepareTest(&materialize_true, &materialize_false,
4524 { AccumulatorValueContext context(this);
4588 context()->Plug(if_true, if_false);
4601 // into the expression's context after the comparison is performed.
4606 context()->PrepareTest(&materialize_true, &materialize_false,
4661 // expression's context.
4662 context()->Plug(if_true, if_false);
4673 context()->PrepareTest(&materialize_true, &materialize_false,
4690 context()->Plug(if_true, if_false);
4696 context()->Plug(rax);
4725 // Contexts nested in the native context have a canonical empty function
4732 // context calling eval, not the anonymous closure containing the eval
4733 // code. Fetch it from the context.
4734 __ push(ContextOperand(rsi, Context::CLOSURE_INDEX));
4819 // Because the handler block contains the context of the finally
4825 // Restore the context to its dedicated register and the stack.