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

Side by Side Diff: src/arm/virtual-frame-arm.cc

Issue 181019: Move stack check into AllocateStackSlots so the load delay can be... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 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
« src/arm/codegen-arm.cc ('K') | « src/arm/codegen-arm.cc ('k') | 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 136
137 void VirtualFrame::AllocateStackSlots() { 137 void VirtualFrame::AllocateStackSlots() {
138 int count = local_count(); 138 int count = local_count();
139 if (count > 0) { 139 if (count > 0) {
140 Comment cmnt(masm(), "[ Allocate space for locals"); 140 Comment cmnt(masm(), "[ Allocate space for locals");
141 Adjust(count); 141 Adjust(count);
142 // Initialize stack slots with 'undefined' value. 142 // Initialize stack slots with 'undefined' value.
143 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); 143 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
144 for (int i = 0; i < count; i++) { 144 }
145 __ push(ip); 145 if (FLAG_check_stack) {
146 } 146 __ LoadRoot(r2, Heap::kStackLimitRootIndex);
147 }
148 for (int i = 0; i < count; i++) {
149 __ push(ip);
150 }
151 if (FLAG_check_stack) {
152 masm()->add(lr, pc, Operand(4));
153 masm()->cmp(sp, Operand(r2));
154 StackCheckStub stub;
155 // Call the stub if lower.
156 masm()->mov(pc,
157 Operand(reinterpret_cast<intptr_t>(stub.GetCode().location()),
158 RelocInfo::CODE_TARGET),
159 LeaveCC,
160 lo);
147 } 161 }
148 } 162 }
149 163
150 164
151 void VirtualFrame::SaveContextRegister() { 165 void VirtualFrame::SaveContextRegister() {
152 UNIMPLEMENTED(); 166 UNIMPLEMENTED();
153 } 167 }
154 168
155 169
156 void VirtualFrame::RestoreContextRegister() { 170 void VirtualFrame::RestoreContextRegister() {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 ASSERT(stack_pointer_ == element_count() - 1); 381 ASSERT(stack_pointer_ == element_count() - 1);
368 elements_.Add(FrameElement::MemoryElement()); 382 elements_.Add(FrameElement::MemoryElement());
369 stack_pointer_++; 383 stack_pointer_++;
370 __ push(reg); 384 __ push(reg);
371 } 385 }
372 386
373 387
374 #undef __ 388 #undef __
375 389
376 } } // namespace v8::internal 390 } } // namespace v8::internal
OLDNEW
« src/arm/codegen-arm.cc ('K') | « src/arm/codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698