OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 | 1284 |
1285 void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) { | 1285 void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) { |
1286 Generate_JSEntryTrampolineHelper(masm, false); | 1286 Generate_JSEntryTrampolineHelper(masm, false); |
1287 } | 1287 } |
1288 | 1288 |
1289 | 1289 |
1290 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { | 1290 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { |
1291 Generate_JSEntryTrampolineHelper(masm, true); | 1291 Generate_JSEntryTrampolineHelper(masm, true); |
1292 } | 1292 } |
1293 | 1293 |
| 1294 |
| 1295 void Builtins::Generate_LazyCompile(MacroAssembler* masm) { |
| 1296 // Enter an internal frame. |
| 1297 __ EnterInternalFrame(); |
| 1298 |
| 1299 // Push a copy of the function onto the stack. |
| 1300 __ push(rdi); |
| 1301 |
| 1302 __ push(rdi); // Function is also the parameter to the runtime call. |
| 1303 __ CallRuntime(Runtime::kLazyCompile, 1); |
| 1304 __ pop(rdi); |
| 1305 |
| 1306 // Tear down temporary frame. |
| 1307 __ LeaveInternalFrame(); |
| 1308 |
| 1309 // Do a tail-call of the compiled function. |
| 1310 __ lea(rcx, FieldOperand(rax, Code::kHeaderSize)); |
| 1311 __ jmp(rcx); |
| 1312 } |
| 1313 |
1294 } } // namespace v8::internal | 1314 } } // namespace v8::internal |
1295 | 1315 |
1296 #endif // V8_TARGET_ARCH_X64 | 1316 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |