| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 if (slots > 0) { | 132 if (slots > 0) { |
| 133 if (FLAG_debug_code) { | 133 if (FLAG_debug_code) { |
| 134 __ mov(Operand(eax), Immediate(slots)); | 134 __ mov(Operand(eax), Immediate(slots)); |
| 135 Label loop; | 135 Label loop; |
| 136 __ bind(&loop); | 136 __ bind(&loop); |
| 137 __ push(Immediate(kSlotsZapValue)); | 137 __ push(Immediate(kSlotsZapValue)); |
| 138 __ dec(eax); | 138 __ dec(eax); |
| 139 __ j(not_zero, &loop); | 139 __ j(not_zero, &loop); |
| 140 } else { | 140 } else { |
| 141 __ sub(Operand(esp), Immediate(slots * kPointerSize)); | 141 __ sub(Operand(esp), Immediate(slots * kPointerSize)); |
| 142 #ifdef _MSC_VER |
| 143 // On windows, you may not access the stack more than one page below |
| 144 // the most recently mapped page. To make the allocated area randomly |
| 145 // accessible, we write to each page in turn (the value is irrelevant). |
| 146 const int kPageSize = 4 * KB; |
| 147 for (int offset = slots * kPointerSize - kPageSize; |
| 148 offset > 0; |
| 149 offset -= kPageSize) { |
| 150 __ mov(Operand(esp, offset), eax); |
| 151 } |
| 152 #endif |
| 153 |
| 142 } | 154 } |
| 143 } | 155 } |
| 144 | 156 |
| 145 // Trace the call. | 157 // Trace the call. |
| 146 if (FLAG_trace) { | 158 if (FLAG_trace) { |
| 147 __ CallRuntime(Runtime::kTraceEnter, 0); | 159 __ CallRuntime(Runtime::kTraceEnter, 0); |
| 148 } | 160 } |
| 149 return !is_aborted(); | 161 return !is_aborted(); |
| 150 } | 162 } |
| 151 | 163 |
| (...skipping 3329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3481 ASSERT(osr_pc_offset_ == -1); | 3493 ASSERT(osr_pc_offset_ == -1); |
| 3482 osr_pc_offset_ = masm()->pc_offset(); | 3494 osr_pc_offset_ = masm()->pc_offset(); |
| 3483 } | 3495 } |
| 3484 | 3496 |
| 3485 | 3497 |
| 3486 #undef __ | 3498 #undef __ |
| 3487 | 3499 |
| 3488 } } // namespace v8::internal | 3500 } } // namespace v8::internal |
| 3489 | 3501 |
| 3490 #endif // V8_TARGET_ARCH_IA32 | 3502 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |