spill the inputs of CreateCl onto the stack

I did this for the IR but didn't do it for the JIT :(
Esse commit está contido em:
Paul Tarjan
2013-04-22 11:58:49 -07:00
commit de Sara Golemon
commit 017b6f231b
3 arquivos alterados com 19 adições e 0 exclusões
@@ -9249,6 +9249,10 @@ TranslatorX64::translateCreateCl(const Tracelet& t,
R(clsCache),
IMM(uintptr_t(clsName)));
for (auto& input : i.inputs) {
m_regMap.cleanLoc(input->location);
}
EMIT_RCALL(a, i,
getMethodPtr(&c_Closure::init),
R(rax),
+13
Ver Arquivo
@@ -0,0 +1,13 @@
<?php
class A {}
function a() {
$b = new A;
$c = function() use ($b) {
return $b;
};
return $c();
}
var_dump(a());
@@ -0,0 +1,2 @@
object(A)#1 (0) {
}