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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { | 377 void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { |
378 // ----------- S t a t e ------------- | 378 // ----------- S t a t e ------------- |
379 // -- eax : the value to pass to the generator | 379 // -- eax : the value to pass to the generator |
380 // -- ebx : the JSGeneratorObject to resume | 380 // -- ebx : the JSGeneratorObject to resume |
381 // -- edx : the resume mode (tagged) | 381 // -- edx : the resume mode (tagged) |
382 // -- esp[0] : return address | 382 // -- esp[0] : return address |
383 // ----------------------------------- | 383 // ----------------------------------- |
384 __ AssertGeneratorObject(ebx); | 384 __ AssertGeneratorObject(ebx); |
385 | 385 |
386 // Store input value into generator object. | 386 // Store input value into generator object. |
387 __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOffset), eax); | 387 __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOrDebugPosOffset), eax); |
388 __ RecordWriteField(ebx, JSGeneratorObject::kInputOffset, eax, ecx, | 388 __ RecordWriteField(ebx, JSGeneratorObject::kInputOrDebugPosOffset, eax, ecx, |
389 kDontSaveFPRegs); | 389 kDontSaveFPRegs); |
390 | 390 |
391 // Store resume mode into generator object. | 391 // Store resume mode into generator object. |
392 __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); | 392 __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); |
393 | 393 |
394 // Load suspended function and context. | 394 // Load suspended function and context. |
395 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); | 395 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); |
396 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); | 396 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); |
397 | 397 |
398 // Flood function if we are stepping. | 398 // Flood function if we are stepping. |
(...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2968 // And "return" to the OSR entry point of the function. | 2968 // And "return" to the OSR entry point of the function. |
2969 __ ret(0); | 2969 __ ret(0); |
2970 } | 2970 } |
2971 | 2971 |
2972 | 2972 |
2973 #undef __ | 2973 #undef __ |
2974 } // namespace internal | 2974 } // namespace internal |
2975 } // namespace v8 | 2975 } // namespace v8 |
2976 | 2976 |
2977 #endif // V8_TARGET_ARCH_IA32 | 2977 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |