OLD | NEW |
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 Loading... |
451 void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { | 451 void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
452 // ----------- S t a t e ------------- | 452 // ----------- S t a t e ------------- |
453 // -- rax : the value to pass to the generator | 453 // -- rax : the value to pass to the generator |
454 // -- rbx : the JSGeneratorObject to resume | 454 // -- rbx : the JSGeneratorObject to resume |
455 // -- rdx : the resume mode (tagged) | 455 // -- rdx : the resume mode (tagged) |
456 // -- rsp[0] : return address | 456 // -- rsp[0] : return address |
457 // ----------------------------------- | 457 // ----------------------------------- |
458 __ AssertGeneratorObject(rbx); | 458 __ AssertGeneratorObject(rbx); |
459 | 459 |
460 // Store input value into generator object. | 460 // Store input value into generator object. |
461 __ movp(FieldOperand(rbx, JSGeneratorObject::kInputOffset), rax); | 461 __ movp(FieldOperand(rbx, JSGeneratorObject::kInputOrDebugPosOffset), rax); |
462 __ RecordWriteField(rbx, JSGeneratorObject::kInputOffset, rax, rcx, | 462 __ RecordWriteField(rbx, JSGeneratorObject::kInputOrDebugPosOffset, rax, rcx, |
463 kDontSaveFPRegs); | 463 kDontSaveFPRegs); |
464 | 464 |
465 // Store resume mode into generator object. | 465 // Store resume mode into generator object. |
466 __ movp(FieldOperand(rbx, JSGeneratorObject::kResumeModeOffset), rdx); | 466 __ movp(FieldOperand(rbx, JSGeneratorObject::kResumeModeOffset), rdx); |
467 | 467 |
468 // Load suspended function and context. | 468 // Load suspended function and context. |
469 __ movp(rsi, FieldOperand(rbx, JSGeneratorObject::kContextOffset)); | 469 __ movp(rsi, FieldOperand(rbx, JSGeneratorObject::kContextOffset)); |
470 __ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset)); | 470 __ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset)); |
471 | 471 |
472 // Flood function if we are stepping. | 472 // Flood function if we are stepping. |
(...skipping 2558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3031 __ ret(0); | 3031 __ ret(0); |
3032 } | 3032 } |
3033 | 3033 |
3034 | 3034 |
3035 #undef __ | 3035 #undef __ |
3036 | 3036 |
3037 } // namespace internal | 3037 } // namespace internal |
3038 } // namespace v8 | 3038 } // namespace v8 |
3039 | 3039 |
3040 #endif // V8_TARGET_ARCH_X64 | 3040 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |