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

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

Issue 17261028: MIPS: 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 | « no previous file | no next file » | 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 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 __ lw(a2, FieldMemOperand(a1, JSGeneratorObject::kReceiverOffset)); 2135 __ lw(a2, FieldMemOperand(a1, JSGeneratorObject::kReceiverOffset));
2136 __ push(a2); 2136 __ push(a2);
2137 2137
2138 // Push holes for the rest of the arguments to the generator function. 2138 // Push holes for the rest of the arguments to the generator function.
2139 __ lw(a3, FieldMemOperand(t0, JSFunction::kSharedFunctionInfoOffset)); 2139 __ lw(a3, FieldMemOperand(t0, JSFunction::kSharedFunctionInfoOffset));
2140 __ lw(a3, 2140 __ lw(a3,
2141 FieldMemOperand(a3, SharedFunctionInfo::kFormalParameterCountOffset)); 2141 FieldMemOperand(a3, SharedFunctionInfo::kFormalParameterCountOffset));
2142 __ LoadRoot(a2, Heap::kTheHoleValueRootIndex); 2142 __ LoadRoot(a2, Heap::kTheHoleValueRootIndex);
2143 Label push_argument_holes, push_frame; 2143 Label push_argument_holes, push_frame;
2144 __ bind(&push_argument_holes); 2144 __ bind(&push_argument_holes);
2145 __ Subu(a3, a3, Operand(1)); 2145 __ Subu(a3, a3, Operand(Smi::FromInt(1)));
2146 __ Branch(&push_frame, lt, a3, Operand(zero_reg)); 2146 __ Branch(&push_frame, lt, a3, Operand(zero_reg));
2147 __ push(a2); 2147 __ push(a2);
2148 __ jmp(&push_argument_holes); 2148 __ jmp(&push_argument_holes);
2149 2149
2150 // Enter a new JavaScript frame, and initialize its slots as they were when 2150 // Enter a new JavaScript frame, and initialize its slots as they were when
2151 // the generator was suspended. 2151 // the generator was suspended.
2152 Label resume_frame; 2152 Label resume_frame;
2153 __ bind(&push_frame); 2153 __ bind(&push_frame);
2154 __ Call(&resume_frame); 2154 __ Call(&resume_frame);
2155 __ jmp(&done); 2155 __ jmp(&done);
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after
4927 *context_length = 0; 4927 *context_length = 0;
4928 return previous_; 4928 return previous_;
4929 } 4929 }
4930 4930
4931 4931
4932 #undef __ 4932 #undef __
4933 4933
4934 } } // namespace v8::internal 4934 } } // namespace v8::internal
4935 4935
4936 #endif // V8_TARGET_ARCH_MIPS 4936 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698