Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/builtins/x64/builtins-x64.cc

Issue 2639533002: [generators] Always call function with closure context when resuming. (Closed)
Patch Set: Ports. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 451
452 // Store input value into generator object. 452 // Store input value into generator object.
453 __ movp(FieldOperand(rbx, JSGeneratorObject::kInputOrDebugPosOffset), rax); 453 __ movp(FieldOperand(rbx, JSGeneratorObject::kInputOrDebugPosOffset), rax);
454 __ RecordWriteField(rbx, JSGeneratorObject::kInputOrDebugPosOffset, rax, rcx, 454 __ RecordWriteField(rbx, JSGeneratorObject::kInputOrDebugPosOffset, rax, rcx,
455 kDontSaveFPRegs); 455 kDontSaveFPRegs);
456 456
457 // Store resume mode into generator object. 457 // Store resume mode into generator object.
458 __ movp(FieldOperand(rbx, JSGeneratorObject::kResumeModeOffset), rdx); 458 __ movp(FieldOperand(rbx, JSGeneratorObject::kResumeModeOffset), rdx);
459 459
460 // Load suspended function and context. 460 // Load suspended function and context.
461 __ movp(rsi, FieldOperand(rbx, JSGeneratorObject::kContextOffset));
462 __ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset)); 461 __ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset));
462 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
463 463
464 // Flood function if we are stepping. 464 // Flood function if we are stepping.
465 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; 465 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator;
466 Label stepping_prepared; 466 Label stepping_prepared;
467 ExternalReference debug_hook = 467 ExternalReference debug_hook =
468 ExternalReference::debug_hook_on_function_call_address(masm->isolate()); 468 ExternalReference::debug_hook_on_function_call_address(masm->isolate());
469 Operand debug_hook_operand = masm->ExternalOperand(debug_hook); 469 Operand debug_hook_operand = masm->ExternalOperand(debug_hook);
470 STATIC_ASSERT(StepFrame > StepIn); 470 STATIC_ASSERT(StepFrame > StepIn);
471 __ cmpb(debug_hook_operand, Immediate(0)); 471 __ cmpb(debug_hook_operand, Immediate(0));
472 __ j(not_equal, &prepare_step_in_if_stepping); 472 __ j(not_equal, &prepare_step_in_if_stepping);
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after
3040 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3040 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3041 Generate_OnStackReplacementHelper(masm, true); 3041 Generate_OnStackReplacementHelper(masm, true);
3042 } 3042 }
3043 3043
3044 #undef __ 3044 #undef __
3045 3045
3046 } // namespace internal 3046 } // namespace internal
3047 } // namespace v8 3047 } // namespace v8
3048 3048
3049 #endif // V8_TARGET_ARCH_X64 3049 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698