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 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 GenerateMakeCodeYoungAgainCommon(masm); \ | 1252 GenerateMakeCodeYoungAgainCommon(masm); \ |
1253 } \ | 1253 } \ |
1254 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ | 1254 void Builtins::Generate_Make##C##CodeYoungAgainOddMarking( \ |
1255 MacroAssembler* masm) { \ | 1255 MacroAssembler* masm) { \ |
1256 GenerateMakeCodeYoungAgainCommon(masm); \ | 1256 GenerateMakeCodeYoungAgainCommon(masm); \ |
1257 } | 1257 } |
1258 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) | 1258 CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) |
1259 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR | 1259 #undef DEFINE_CODE_AGE_BUILTIN_GENERATOR |
1260 | 1260 |
1261 | 1261 |
| 1262 void Builtins::Generate_NotifyICMiss(MacroAssembler* masm) { |
| 1263 { |
| 1264 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1265 |
| 1266 // Preserve registers across notification, this is important compiled stubs |
| 1267 // that tail call the runtime on deopts passing their parameters in |
| 1268 // registers. |
| 1269 __ stm(db_w, sp, kJSCallerSaved | kCalleeSaved); |
| 1270 // Pass the function and deoptimization type to the runtime system. |
| 1271 __ CallRuntime(Runtime::kNotifyICMiss, 0); |
| 1272 __ ldm(ia_w, sp, kJSCallerSaved | kCalleeSaved); |
| 1273 } |
| 1274 |
| 1275 __ pop(ip); // Ignore pushed state |
| 1276 __ pop(ip); // Ignore function marker |
| 1277 __ pop(cp); // Restore context |
| 1278 __ pop(fp); // Restore frame ptr |
| 1279 __ mov(ip, lr); // lr contains beginning of IC miss code |
| 1280 __ pop(lr); // Restore lr for return after IC miss completes |
| 1281 __ mov(pc, ip); |
| 1282 } |
| 1283 |
| 1284 |
1262 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 1285 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
1263 Deoptimizer::BailoutType type) { | 1286 Deoptimizer::BailoutType type) { |
1264 { | 1287 { |
1265 FrameScope scope(masm, StackFrame::INTERNAL); | 1288 FrameScope scope(masm, StackFrame::INTERNAL); |
1266 // Pass the function and deoptimization type to the runtime system. | 1289 // Pass the function and deoptimization type to the runtime system. |
1267 __ mov(r0, Operand(Smi::FromInt(static_cast<int>(type)))); | 1290 __ mov(r0, Operand(Smi::FromInt(static_cast<int>(type)))); |
1268 __ push(r0); | 1291 __ push(r0); |
1269 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); | 1292 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); |
1270 } | 1293 } |
1271 | 1294 |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 __ bind(&dont_adapt_arguments); | 1855 __ bind(&dont_adapt_arguments); |
1833 __ Jump(r3); | 1856 __ Jump(r3); |
1834 } | 1857 } |
1835 | 1858 |
1836 | 1859 |
1837 #undef __ | 1860 #undef __ |
1838 | 1861 |
1839 } } // namespace v8::internal | 1862 } } // namespace v8::internal |
1840 | 1863 |
1841 #endif // V8_TARGET_ARCH_ARM | 1864 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |