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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 17485002: Fix stack frame reconstruction for generators with formal arguments (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | test/mjsunit/harmony/generators-iteration.js » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 // Push receiver. 2084 // Push receiver.
2085 __ push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset)); 2085 __ push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset));
2086 2086
2087 // Push holes for arguments to generator function. 2087 // Push holes for arguments to generator function.
2088 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); 2088 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
2089 __ mov(edx, 2089 __ mov(edx,
2090 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); 2090 FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset));
2091 __ mov(ecx, isolate()->factory()->the_hole_value()); 2091 __ mov(ecx, isolate()->factory()->the_hole_value());
2092 Label push_argument_holes, push_frame; 2092 Label push_argument_holes, push_frame;
2093 __ bind(&push_argument_holes); 2093 __ bind(&push_argument_holes);
2094 __ sub(edx, Immediate(1)); 2094 __ sub(edx, Immediate(Smi::FromInt(1)));
2095 __ j(carry, &push_frame); 2095 __ j(carry, &push_frame);
2096 __ push(ecx); 2096 __ push(ecx);
2097 __ jmp(&push_argument_holes); 2097 __ jmp(&push_argument_holes);
2098 2098
2099 // Enter a new JavaScript frame, and initialize its slots as they were when 2099 // Enter a new JavaScript frame, and initialize its slots as they were when
2100 // the generator was suspended. 2100 // the generator was suspended.
2101 Label resume_frame; 2101 Label resume_frame;
2102 __ bind(&push_frame); 2102 __ bind(&push_frame);
2103 __ call(&resume_frame); 2103 __ call(&resume_frame);
2104 __ jmp(&done); 2104 __ jmp(&done);
(...skipping 2788 matching lines...) Expand 10 before | Expand all | Expand 10 after
4893 *stack_depth = 0; 4893 *stack_depth = 0;
4894 *context_length = 0; 4894 *context_length = 0;
4895 return previous_; 4895 return previous_;
4896 } 4896 }
4897 4897
4898 #undef __ 4898 #undef __
4899 4899
4900 } } // namespace v8::internal 4900 } } // namespace v8::internal
4901 4901
4902 #endif // V8_TARGET_ARCH_IA32 4902 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | test/mjsunit/harmony/generators-iteration.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698