On ARM the code looks like this:

  if (result_type_ == TRBinaryOpIC::UNINITIALIZED ||
      result_type_ == TRBinaryOpIC::SMI) {
    // Only allow smi results.
    GenerateSmiCode(masm, NULL, NO_HEAPNUMBER_RESULTS);
  } else {
    // Allow heap number result and don't make a transition if a heap number
    // cannot be allocated.
    GenerateSmiCode(masm, &call_runtime, ALLOW_HEAPNUMBER_RESULTS);
  }

// Code falls through if the result is not returned as either a smi or heap
  // number.
  GenerateTypeTransition(masm);

  __ bind(&call_runtime);
  GenerateCallRuntime(masm);

It is basically the same, but maybe we should make them be the same. Making a
runtime call instead of a type transition when allocation fails is the right
thing to do, but in practice it will very rarely make a difference.

http://codereview.chromium.org/6803010/

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

Reply via email to