| Index: src/x64/stub-cache-x64.cc
|
| ===================================================================
|
| --- src/x64/stub-cache-x64.cc (revision 5559)
|
| +++ src/x64/stub-cache-x64.cc (working copy)
|
| @@ -800,9 +800,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());
|
| __ Move(scratch, Handle<Object>(cell));
|
| @@ -879,9 +881,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;
|
| }
|
| @@ -1033,9 +1038,11 @@
|
| }
|
|
|
| // Handle call cache miss.
|
| + 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);
|
| @@ -1088,9 +1095,11 @@
|
| __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION);
|
|
|
| // 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);
|
| @@ -1246,9 +1255,11 @@
|
| 1);
|
| }
|
|
|
| + 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);
|
| @@ -1328,9 +1339,11 @@
|
| argc + 1,
|
| 1);
|
|
|
| + 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);
|
| @@ -1400,9 +1413,11 @@
|
| __ LoadRoot(rax, Heap::kEmptyStringRootIndex);
|
| __ ret((argc + 1) * kPointerSize);
|
|
|
| + 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);
|
| @@ -1470,9 +1485,11 @@
|
| __ LoadRoot(rax, Heap::kNanValueRootIndex);
|
| __ ret((argc + 1) * kPointerSize);
|
|
|
| + 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);
|
| @@ -1539,9 +1556,11 @@
|
| __ InvokeFunction(function, arguments(), JUMP_FUNCTION);
|
|
|
| __ bind(&miss);
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| // rcx: function name.
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
|
| @@ -1652,9 +1671,11 @@
|
| __ InvokeFunction(function, arguments(), JUMP_FUNCTION);
|
|
|
| __ bind(&miss);
|
| + Object* obj;
|
| + { TryAllocation t = GenerateMissBranch();
|
| + if (!t->ToObject(&obj)) return t;
|
| + }
|
| // rcx: function name.
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
|
| @@ -1718,9 +1739,11 @@
|
| __ InvokeFunction(rdi, arguments(), JUMP_FUNCTION);
|
|
|
| // Handle load 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);
|
| @@ -1781,9 +1804,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);
|
| - Object* obj = GenerateMissBranch();
|
| - if (obj->IsFailure()) return obj;
|
|
|
| // Return the generated code.
|
| return GetCode(NORMAL, name);
|
|
|