Thank you for spotting this. I missed the true prarmeter to Generate in the stub
inherited from CEntryStub.

To test this you will need to have recursive breakpoints and/or GC involved,
where the register content differs. What happens is that when a break is hit all registers are saved to a static memory area. During the exit from JavaScript the ones that contains objects are saved on the JavaScript stack and later they are all saved on the C stack. When returning to JavaScript the static memory area is first populated from the values on the C stack and then some of the values are overwritten from the JavaScript stack. Without this fix the static memory area will be used to save and restore without the values being moved to the stack.

Also please change the name c_entry_debug_break_code (root in heap.h) to
something like debugger_statement_code. Actually I don't think we heed to have
the DebuggerStatementStub as a root any more. You can do that as a separate
change.

Whether we need the CEntryStub with MODE_DEBUG instead I am not sure. Also I
just wondered about 64-bit Windows, where we have CEntryStub returning 1 value as a root but not the one returning 2 values. This requires some more looking
into Heap::CreateFixedStubs() (where I also think a #ifdef
ENABLE_DEBUGGER_SUPPORT/#endif might be missing.


http://codereview.chromium.org/555164/diff/1/7
File src/arm/codegen-arm.cc (right):

http://codereview.chromium.org/555164/diff/1/7#newcode6201
src/arm/codegen-arm.cc:6201: int CEntryStub::MinorKey() {
Don't you also need a new minor key here?

See comment for src/x64/codegen-x64.cc

http://codereview.chromium.org/555164/diff/1/4
File src/codegen.h (right):

http://codereview.chromium.org/555164/diff/1/4#newcode334
src/codegen.h:334: ExitFrame::Mode mode = ExitFrame::MODE_NORMAL)
Indention.

http://codereview.chromium.org/555164/diff/1/2
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/555164/diff/1/2#newcode9078
src/ia32/codegen-ia32.cc:9078: int CEntryStub::MinorKey() {
See comment for src/x64/codegen-x64.cc.

http://codereview.chromium.org/555164/diff/1/6
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/555164/diff/1/6#newcode7337
src/x64/codegen-x64.cc:7337: int CEntryStub::MinorKey() {
Please change this to use two 1-bit bitfields as e.g. CallFunctionStub.
if _WIN64 is not defined just encode 0 is the ResultSize bitfield.

You can then move CEntryStub::MinorKey() to codegen.h (codegen.cc) and
have it shared between platforms.

http://codereview.chromium.org/555164

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to