| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { | 389 void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
| 390 // ----------- S t a t e ------------- | 390 // ----------- S t a t e ------------- |
| 391 // -- eax : the value to pass to the generator | 391 // -- eax : the value to pass to the generator |
| 392 // -- ebx : the JSGeneratorObject to resume | 392 // -- ebx : the JSGeneratorObject to resume |
| 393 // -- edx : the resume mode (tagged) | 393 // -- edx : the resume mode (tagged) |
| 394 // -- esp[0] : return address | 394 // -- esp[0] : return address |
| 395 // ----------------------------------- | 395 // ----------------------------------- |
| 396 __ AssertGeneratorObject(ebx); | 396 __ AssertGeneratorObject(ebx); |
| 397 | 397 |
| 398 // Store input value into generator object. | 398 // Store input value into generator object. |
| 399 __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOffset), eax); | 399 __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOrDebugPosOffset), eax); |
| 400 __ RecordWriteField(ebx, JSGeneratorObject::kInputOffset, eax, ecx, | 400 __ RecordWriteField(ebx, JSGeneratorObject::kInputOrDebugPosOffset, eax, ecx, |
| 401 kDontSaveFPRegs); | 401 kDontSaveFPRegs); |
| 402 | 402 |
| 403 // Store resume mode into generator object. | 403 // Store resume mode into generator object. |
| 404 __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); | 404 __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); |
| 405 | 405 |
| 406 // Load suspended function and context. | 406 // Load suspended function and context. |
| 407 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); | 407 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); |
| 408 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); | 408 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); |
| 409 | 409 |
| 410 // Flood function if we are stepping. | 410 // Flood function if we are stepping. |
| (...skipping 2579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2990 // And "return" to the OSR entry point of the function. | 2990 // And "return" to the OSR entry point of the function. |
| 2991 __ ret(0); | 2991 __ ret(0); |
| 2992 } | 2992 } |
| 2993 | 2993 |
| 2994 | 2994 |
| 2995 #undef __ | 2995 #undef __ |
| 2996 } // namespace internal | 2996 } // namespace internal |
| 2997 } // namespace v8 | 2997 } // namespace v8 |
| 2998 | 2998 |
| 2999 #endif // V8_TARGET_ARCH_X87 | 2999 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |