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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 | 1884 |
1885 __ Pop(result_register()); | 1885 __ Pop(result_register()); |
1886 EmitReturnSequence(); | 1886 EmitReturnSequence(); |
1887 | 1887 |
1888 __ bind(&resume); | 1888 __ bind(&resume); |
1889 context()->Plug(result_register()); | 1889 context()->Plug(result_register()); |
1890 break; | 1890 break; |
1891 } | 1891 } |
1892 | 1892 |
1893 case Yield::kFinal: { | 1893 case Yield::kFinal: { |
1894 VisitForAccumulatorValue(expr->generator_object()); | |
1895 __ Move(FieldOperand(result_register(), | |
1896 JSGeneratorObject::kContinuationOffset), | |
1897 Smi::FromInt(JSGeneratorObject::kGeneratorClosed)); | |
1898 // Pop value from top-of-stack slot, box result into result register. | 1894 // Pop value from top-of-stack slot, box result into result register. |
1899 EmitCreateIteratorResult(true); | 1895 EmitCreateIteratorResult(true); |
1900 EmitUnwindBeforeReturn(); | 1896 EmitUnwindBeforeReturn(); |
1901 EmitReturnSequence(); | 1897 EmitReturnSequence(); |
1902 break; | 1898 break; |
1903 } | 1899 } |
1904 | 1900 |
1905 case Yield::kDelegating: { | 1901 case Yield::kDelegating: { |
1906 VisitForStackValue(expr->generator_object()); | 1902 VisitForStackValue(expr->generator_object()); |
1907 | 1903 |
(...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4720 Assembler::target_address_at(call_target_address, | 4716 Assembler::target_address_at(call_target_address, |
4721 unoptimized_code)); | 4717 unoptimized_code)); |
4722 return OSR_AFTER_STACK_CHECK; | 4718 return OSR_AFTER_STACK_CHECK; |
4723 } | 4719 } |
4724 | 4720 |
4725 | 4721 |
4726 } // namespace internal | 4722 } // namespace internal |
4727 } // namespace v8 | 4723 } // namespace v8 |
4728 | 4724 |
4729 #endif // V8_TARGET_ARCH_X64 | 4725 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |