Reviewers: iposva, Kasper Lund,

Description:
Fix CALL_NON_FUNCTION. If a builtin is not resolved at runtime (happened
at bootstrapper time), it uses related pc address, otherwise, generate
code to adjust offset for instruction start address.


Please review this at http://codereview.chromium.org/10233

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/codegen-arm.cc
   M     src/macro-assembler-arm.cc


Index: src/codegen-arm.cc
===================================================================
--- src/codegen-arm.cc  (revision 721)
+++ src/codegen-arm.cc  (working copy)
@@ -4283,7 +4283,10 @@
    // Slow-case: Non-function called.
    __ bind(&slow);
    __ mov(r0, Operand(argc_));  // Setup the number of arguments.
-  __ InvokeBuiltin(Builtins::CALL_NON_FUNCTION, JUMP_JS);
+  __ mov(r2, Operand(0));
+  __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
+  __  
Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)),
+          RelocInfo::CODE_TARGET);
  }


Index: src/macro-assembler-arm.cc
===================================================================
--- src/macro-assembler-arm.cc  (revision 719)
+++ src/macro-assembler-arm.cc  (working copy)
@@ -838,6 +838,9 @@
          Bootstrapper::FixupFlagsIsPCRelative::encode(true);
      Unresolved entry = { pc_offset() - sizeof(Instr), flags, name };
      unresolved_.Add(entry);
+
+  } else {
+    add(target, target, Operand(Code::kHeaderSize - kHeapObjectTag));
    }
  }




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

Reply via email to