Improved performance of unary addition by avoiding runtime calls.

Fixed the handling of '>' and '<=' to use right-to-left conversion and left-to-right evaluation as specified by ECMA-262.

Fixed a branch elimination bug on the ARM platform where incorrect code was generated because of overly aggressive branch elimination.

Improved performance of code that repeatedly assigns the same function to the same property of different objects with the same map.

Untangled DEBUG and ENABLE_DISASSEMBLER defines.  The disassembler no longer expects DEBUG to be defined.

Added platform-nullos.cc to serve as the basis for new platform implementations.


git-svn-id: http://v8.googlecode.com/svn/trunk@9 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/stub-cache-arm.cc b/src/stub-cache-arm.cc
index e14dfe6..b553306 100644
--- a/src/stub-cache-arm.cc
+++ b/src/stub-cache-arm.cc
@@ -237,7 +237,6 @@
                                               JSFunction* function,
                                               CheckType check) {
   // ----------- S t a t e -------------
-  //  -- r0: number of arguments
   //  -- r1: receiver
   //  -- lr: return address
   // -----------------------------------
@@ -322,17 +321,20 @@
       UNREACHABLE();
   }
 
+  // Number of arguments for this function.
+  const int argc = arguments().immediate();
+
   // Get the function and setup the context.
   __ mov(r3, Operand(Handle<JSFunction>(function)));
   __ ldr(cp, FieldMemOperand(r3, JSFunction::kContextOffset));
 
   // Patch the function on the stack; 1 ~ receiver.
-  __ add(ip, sp, Operand(r0, LSL, kPointerSizeLog2));
-  __ str(r3, MemOperand(ip, 1 * kPointerSize));
+  __ str(r3, MemOperand(sp, (argc + 1) * kPointerSize));
 
   // Jump to the cached code (tail call).
   Handle<Code> code(function->code());
-  __ Jump(code, code_target);
+  ParameterCount expected(function->shared()->formal_parameter_count());
+  __ InvokeCode(code, expected, arguments(), code_target, JUMP_FUNCTION);
 
   // Handle call cache miss.
   __ bind(&miss);