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

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

Issue 13408005: Force context allocation for variables in generator scopes. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | src/ia32/full-codegen-ia32.cc » ('J')
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); 155 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
156 __ str(r2, MemOperand(sp, receiver_offset)); 156 __ str(r2, MemOperand(sp, receiver_offset));
157 __ bind(&ok); 157 __ bind(&ok);
158 } 158 }
159 159
160 // Open a frame scope to indicate that there is a frame on the stack. The 160 // Open a frame scope to indicate that there is a frame on the stack. The
161 // MANUAL indicates that the scope shouldn't actually generate code to set up 161 // MANUAL indicates that the scope shouldn't actually generate code to set up
162 // the frame (that is done below). 162 // the frame (that is done below).
163 FrameScope frame_scope(masm_, StackFrame::MANUAL); 163 FrameScope frame_scope(masm_, StackFrame::MANUAL);
164 164
165 int locals_count = info->scope()->num_stack_slots(); 165 int locals_count = info->scope()->num_stack_slots();
Michael Starzinger 2013/04/05 11:38:42 nit: I know this is not part of your change, but c
wingo 2013/04/05 12:25:06 Done.
166 // Generators allocate locals, if any, in context slots.
167 ASSERT(!(info->function()->is_generator() && locals_count));
166 168
167 info->set_prologue_offset(masm_->pc_offset()); 169 info->set_prologue_offset(masm_->pc_offset());
168 { 170 {
169 PredictableCodeSizeScope predictible_code_size_scope( 171 PredictableCodeSizeScope predictible_code_size_scope(
170 masm_, kNoCodeAgeSequenceLength * Assembler::kInstrSize); 172 masm_, kNoCodeAgeSequenceLength * Assembler::kInstrSize);
171 // The following three instructions must remain together and unmodified 173 // The following three instructions must remain together and unmodified
172 // for code aging to work properly. 174 // for code aging to work properly.
173 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); 175 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit());
174 // Load undefined value here, so the value is ready for the loop 176 // Load undefined value here, so the value is ready for the loop
175 // below. 177 // below.
(...skipping 4404 matching lines...) Expand 10 before | Expand all | Expand 10 after
4580 *context_length = 0; 4582 *context_length = 0;
4581 return previous_; 4583 return previous_;
4582 } 4584 }
4583 4585
4584 4586
4585 #undef __ 4587 #undef __
4586 4588
4587 } } // namespace v8::internal 4589 } } // namespace v8::internal
4588 4590
4589 #endif // V8_TARGET_ARCH_ARM 4591 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | src/ia32/full-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698