Source/JavaScriptCore/ChangeLog

 12014-08-29 Akos Kiss <akiss@inf.u-szeged.hu>
 2
 3 Ensure that the call frame passed from doVMEntry to the called function always contains the valid scope chain.
 4 https://bugs.webkit.org/show_bug.cgi?id=136391
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Do not rely on calling conventions to fill in the CallerFrame component
 9 of the ExecState* parameter of the called function.
 10
 11 * llint/LowLevelInterpreter32_64.asm:
 12 * llint/LowLevelInterpreter64.asm:
 13
1142014-08-29 Joseph Pecoraro <pecoraro@apple.com>
215
316 JavaScriptCore: Use ASCIILiteral where possible

Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

@@end
367367
368368macro makeHostFunctionCall(entry, temp1, temp2)
369369 move entry, temp1
 370 storep cfr, [sp]
370371 if C_LOOP
371372 move sp, a0
372  storep cfr, [sp]
373373 storep lr, PtrSize[sp]
374374 cloopCallNative temp1
375375 else

@@macro makeHostFunctionCall(entry, temp1, temp2)
377377 # Put callee frame pointer on stack as arg0, also put it in ecx for "fastcall" targets
378378 move 0, temp2
379379 move temp2, 4[sp] # put 0 in ReturnPC
380  move cfr, [sp] # put caller frame pointer into callee frame since callee prologue can't
381380 move sp, t2 # t2 is ecx
382381 push temp2 # Push dummy arg1
383382 push t2

Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

@@macro makeHostFunctionCall(entry, temp)
311311 elsif ARM64 or C_LOOP
312312 move sp, a0
313313 end
 314 storep cfr, [sp]
314315 if C_LOOP
315  storep cfr, [sp]
316316 storep lr, 8[sp]
317317 cloopCallNative temp
318318 elsif X86_64_WIN
319  # For a host function call, JIT relies on that the CallerFrame (frame pointer) is put on the stack,
320  # On Win64 we need to manually copy the frame pointer to the stack, since MSVC may not maintain a frame pointer on 64-bit.
321  # See http://msdn.microsoft.com/en-us/library/9z1stfyw.aspx where it's stated that rbp MAY be used as a frame pointer.
322  storep cfr, [sp]
323 
324319 # We need to allocate 32 bytes on the stack for the shadow space.
325320 subp 32, sp
326321 call temp