| Index: src/arm/stub-cache-arm.cc
|
| ===================================================================
|
| --- src/arm/stub-cache-arm.cc (revision 5559)
|
| +++ src/arm/stub-cache-arm.cc (working copy)
|
| @@ -838,9 +838,11 @@
|
| GlobalObject* global,
|
| String* name,
|
| Register scratch,
|
| + Object* probe;
|
| + { TryAllocation t = global->EnsurePropertyCell(name);
|
| + if (!t->ToObject(&probe)) return t;
|
| + }
|
| Label* miss) {
|
| - Object* probe = global->EnsurePropertyCell(name);
|
| - if (probe->IsFailure()) return probe;
|
| JSGlobalPropertyCell* cell = JSGlobalPropertyCell::cast(probe);
|
| ASSERT(cell->value()->IsTheHole());
|
| __ mov(scratch, Operand(Handle<Object>(cell)));
|
| @@ -1281,9 +1283,12 @@
|
| }
|
|
|
|
|
| + Object* obj;
|
| + { TryAllocation t =
|
| + StubCache::ComputeCallMiss(arguments().immediate(), kind_);
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| Object* CallStubCompiler::GenerateMissBranch() {
|
| - Object* obj = StubCache::ComputeCallMiss(arguments().immediate(), kind_);
|
| - if (obj->IsFailure()) return obj;
|
| __ Jump(Handle<Code>(Code::cast(obj)), RelocInfo::CODE_TARGET);
|
| return obj;
|
| }
|
| @@ -1316,9 +1321,11 @@
|
| GenerateCallFunction(masm(), object, arguments(), &miss);
|
|
|
| // Handle call cache miss.
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| __ bind(&miss);
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return GetCode(FIELD, name);
|
| @@ -1360,9 +1367,11 @@
|
| 1);
|
|
|
| // Handle call cache miss.
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| __ bind(&miss);
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return GetCode(function);
|
| @@ -1404,9 +1413,11 @@
|
| 1);
|
|
|
| // Handle call cache miss.
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| __ bind(&miss);
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return GetCode(function);
|
| @@ -1476,9 +1487,11 @@
|
| __ Drop(argc + 1);
|
| __ Ret();
|
|
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| __ bind(&miss);
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return GetCode(function);
|
| @@ -1550,9 +1563,11 @@
|
| __ Drop(argc + 1);
|
| __ Ret();
|
|
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| __ bind(&miss);
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return GetCode(function);
|
| @@ -1624,9 +1639,11 @@
|
| __ InvokeFunction(function, arguments(), JUMP_FUNCTION);
|
|
|
| __ bind(&miss);
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| // r2: function name.
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
|
| @@ -1736,9 +1753,11 @@
|
| __ InvokeFunction(function, arguments(), JUMP_FUNCTION);
|
|
|
| __ bind(&miss);
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| // r2: function name.
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
|
| @@ -1890,9 +1909,11 @@
|
| FreeSpaceForFastApiCall(masm());
|
| }
|
|
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| __ bind(&miss_in_smi_check);
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return GetCode(function);
|
| @@ -1940,9 +1961,11 @@
|
| GenerateCallFunction(masm(), object, arguments(), &miss);
|
|
|
| // Handle call cache miss.
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| __ bind(&miss);
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return GetCode(INTERCEPTOR, name);
|
| @@ -1999,9 +2022,11 @@
|
|
|
| // Handle call cache miss.
|
| __ bind(&miss);
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| __ IncrementCounter(&Counters::call_global_inline_miss, 1, r1, r3);
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return GetCode(NORMAL, name);
|
|
|