OLD | NEW |
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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 __ lea(eax, Operand(eax, ebx, times_1, Code::kHeaderSize - kHeapObjectTag)); | 1319 __ lea(eax, Operand(eax, ebx, times_1, Code::kHeaderSize - kHeapObjectTag)); |
1320 | 1320 |
1321 // Overwrite the return address on the stack. | 1321 // Overwrite the return address on the stack. |
1322 __ mov(Operand(esp, 0), eax); | 1322 __ mov(Operand(esp, 0), eax); |
1323 | 1323 |
1324 // And "return" to the OSR entry point of the function. | 1324 // And "return" to the OSR entry point of the function. |
1325 __ ret(0); | 1325 __ ret(0); |
1326 } | 1326 } |
1327 | 1327 |
1328 | 1328 |
| 1329 void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) { |
| 1330 // We check the stack limit as indicator that recompilation might be done. |
| 1331 Label ok; |
| 1332 ExternalReference stack_limit = |
| 1333 ExternalReference::address_of_stack_limit(masm->isolate()); |
| 1334 __ cmp(esp, Operand::StaticVariable(stack_limit)); |
| 1335 __ j(above_equal, &ok, Label::kNear); |
| 1336 { |
| 1337 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1338 __ CallRuntime(Runtime::kStackGuard, 0); |
| 1339 } |
| 1340 __ jmp(masm->isolate()->builtins()->OnStackReplacement(), |
| 1341 RelocInfo::CODE_TARGET); |
| 1342 |
| 1343 __ bind(&ok); |
| 1344 __ ret(0); |
| 1345 } |
| 1346 |
1329 #undef __ | 1347 #undef __ |
1330 } | 1348 } |
1331 } // namespace v8::internal | 1349 } // namespace v8::internal |
1332 | 1350 |
1333 #endif // V8_TARGET_ARCH_IA32 | 1351 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |