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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 435020: Fast-compiler: Add stack limit checks to back edges of while, do-while and for. (Closed)
Patch Set: Created 11 years 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } else { 206 } else {
207 RecordWriteStub stub(object, dst, value); 207 RecordWriteStub stub(object, dst, value);
208 CallStub(&stub); 208 CallStub(&stub);
209 } 209 }
210 } 210 }
211 211
212 bind(&done); 212 bind(&done);
213 } 213 }
214 214
215 215
216 void MacroAssembler::StackLimitCheck(Label* on_stack_overflow) {
217 cmp(esp,
218 Operand::StaticVariable(ExternalReference::address_of_stack_limit()));
219 j(below, on_stack_overflow);
220 }
221
222
216 #ifdef ENABLE_DEBUGGER_SUPPORT 223 #ifdef ENABLE_DEBUGGER_SUPPORT
217 void MacroAssembler::SaveRegistersToMemory(RegList regs) { 224 void MacroAssembler::SaveRegistersToMemory(RegList regs) {
218 ASSERT((regs & ~kJSCallerSaved) == 0); 225 ASSERT((regs & ~kJSCallerSaved) == 0);
219 // Copy the content of registers to memory location. 226 // Copy the content of registers to memory location.
220 for (int i = 0; i < kNumJSCallerSaved; i++) { 227 for (int i = 0; i < kNumJSCallerSaved; i++) {
221 int r = JSCallerSavedCode(i); 228 int r = JSCallerSavedCode(i);
222 if ((regs & (1 << r)) != 0) { 229 if ((regs & (1 << r)) != 0) {
223 Register reg = { r }; 230 Register reg = { r };
224 ExternalReference reg_addr = 231 ExternalReference reg_addr =
225 ExternalReference(Debug_Address::Register(i)); 232 ExternalReference(Debug_Address::Register(i));
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 // Indicate that code has changed. 1280 // Indicate that code has changed.
1274 CPU::FlushICache(address_, size_); 1281 CPU::FlushICache(address_, size_);
1275 1282
1276 // Check that the code was patched as expected. 1283 // Check that the code was patched as expected.
1277 ASSERT(masm_.pc_ == address_ + size_); 1284 ASSERT(masm_.pc_ == address_ + size_);
1278 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1285 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1279 } 1286 }
1280 1287
1281 1288
1282 } } // namespace v8::internal 1289 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698