Chromium Code Reviews| 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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 959 // Compute the target address = code_obj + header_size + osr_offset | 959 // Compute the target address = code_obj + header_size + osr_offset |
| 960 // <entry_addr> = <code_obj> + #header_size + <osr_offset> | 960 // <entry_addr> = <code_obj> + #header_size + <osr_offset> |
| 961 __ addu(v0, v0, a1); | 961 __ addu(v0, v0, a1); |
| 962 __ addiu(ra, v0, Code::kHeaderSize - kHeapObjectTag); | 962 __ addiu(ra, v0, Code::kHeaderSize - kHeapObjectTag); |
| 963 | 963 |
| 964 // And "return" to the OSR entry point of the function. | 964 // And "return" to the OSR entry point of the function. |
| 965 __ Ret(); | 965 __ Ret(); |
| 966 } | 966 } |
| 967 | 967 |
| 968 | 968 |
| 969 void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) { | |
| 970 // We check the stack limit as indicator that recompilation might be done. | |
| 971 Label ok; | |
| 972 __ stop("check1"); | |
|
Yang
2013/09/25 14:54:38
You probably want to remove this :)
Paul Lind
2013/09/25 15:05:00
You probably should remove this ... ;-)
... thank
kilvadyb
2013/09/25 15:14:28
Done.
| |
| 973 __ LoadRoot(at, Heap::kStackLimitRootIndex); | |
| 974 __ Branch(&ok, hs, sp, Operand(at)); | |
| 975 { | |
| 976 FrameScope scope(masm, StackFrame::INTERNAL); | |
| 977 __ CallRuntime(Runtime::kStackGuard, 0); | |
| 978 } | |
| 979 __ Jump(masm->isolate()->builtins()->OnStackReplacement(), | |
| 980 RelocInfo::CODE_TARGET); | |
| 981 | |
| 982 __ bind(&ok); | |
| 983 __ Ret(); | |
| 984 } | |
| 985 | |
| 986 | |
| 969 void Builtins::Generate_FunctionCall(MacroAssembler* masm) { | 987 void Builtins::Generate_FunctionCall(MacroAssembler* masm) { |
| 970 // 1. Make sure we have at least one argument. | 988 // 1. Make sure we have at least one argument. |
| 971 // a0: actual number of arguments | 989 // a0: actual number of arguments |
| 972 { Label done; | 990 { Label done; |
| 973 __ Branch(&done, ne, a0, Operand(zero_reg)); | 991 __ Branch(&done, ne, a0, Operand(zero_reg)); |
| 974 __ LoadRoot(t2, Heap::kUndefinedValueRootIndex); | 992 __ LoadRoot(t2, Heap::kUndefinedValueRootIndex); |
| 975 __ push(t2); | 993 __ push(t2); |
| 976 __ Addu(a0, a0, Operand(1)); | 994 __ Addu(a0, a0, Operand(1)); |
| 977 __ bind(&done); | 995 __ bind(&done); |
| 978 } | 996 } |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1457 __ bind(&dont_adapt_arguments); | 1475 __ bind(&dont_adapt_arguments); |
| 1458 __ Jump(a3); | 1476 __ Jump(a3); |
| 1459 } | 1477 } |
| 1460 | 1478 |
| 1461 | 1479 |
| 1462 #undef __ | 1480 #undef __ |
| 1463 | 1481 |
| 1464 } } // namespace v8::internal | 1482 } } // namespace v8::internal |
| 1465 | 1483 |
| 1466 #endif // V8_TARGET_ARCH_MIPS | 1484 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |