Hi!

    Currently, i'm analyzing v8 source code, since i want to port v8
to SuperH architecture
   and plan to contribute the code when it is finished.

    After reading documentation about dynamic compilation techniques,
and reading v8's code,
   I am now thinking about how to port v8 to SuperH. At the same time,
there are some
   source code that i have vague understanding now, could you tell me
the reason why we need
   to do all of this?

   Question 1:
   function JSEntryStub::GenerateBody in file codegen-ia32.cc.
   why push a fake receiver? What is it used for?

     // Fake a receiver (NULL).
     __ push(Immediate(0));  // receiver


   Question 2:
   function MacroAssembler::EnterFrame in file macro-assembler-
ia32.cc,
   why push an empty code cache slot? What is it used for?

     push(Immediate(0));  // Push an empty code cache slot.


   Question 3:
   function MacroAssembler::PushTryHandler in file macro-assembler-
ia32.cc,
   why push the following two? What is it used for?

   push(Immediate(Smi::FromInt(StackHandler::kCodeNotPresent)));
   push(Immediate(0));  // NULL parameter pointer


   Thanks!

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

Reply via email to