Commit af200d0d authored by antonm@chromium.org's avatar antonm@chromium.org

Shorten bail out checks when calling code which can fail.

Review URL: http://codereview.chromium.org/6713004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 46cf1c0b
...@@ -1526,10 +1526,8 @@ MaybeObject* CallStubCompiler::CompileCallField(JSObject* object, ...@@ -1526,10 +1526,8 @@ MaybeObject* CallStubCompiler::CompileCallField(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(FIELD, name); return GetCode(FIELD, name);
...@@ -1686,10 +1684,8 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object, ...@@ -1686,10 +1684,8 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1772,10 +1768,8 @@ MaybeObject* CallStubCompiler::CompileArrayPopCall(Object* object, ...@@ -1772,10 +1768,8 @@ MaybeObject* CallStubCompiler::CompileArrayPopCall(Object* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1858,10 +1852,8 @@ MaybeObject* CallStubCompiler::CompileStringCharCodeAtCall( ...@@ -1858,10 +1852,8 @@ MaybeObject* CallStubCompiler::CompileStringCharCodeAtCall(
// Restore function name in r2. // Restore function name in r2.
__ Move(r2, Handle<String>(name)); __ Move(r2, Handle<String>(name));
__ bind(&name_miss); __ bind(&name_miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1946,10 +1938,8 @@ MaybeObject* CallStubCompiler::CompileStringCharAtCall( ...@@ -1946,10 +1938,8 @@ MaybeObject* CallStubCompiler::CompileStringCharAtCall(
// Restore function name in r2. // Restore function name in r2.
__ Move(r2, Handle<String>(name)); __ Move(r2, Handle<String>(name));
__ bind(&name_miss); __ bind(&name_miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -2022,10 +2012,8 @@ MaybeObject* CallStubCompiler::CompileStringFromCharCodeCall( ...@@ -2022,10 +2012,8 @@ MaybeObject* CallStubCompiler::CompileStringFromCharCodeCall(
__ bind(&miss); __ bind(&miss);
// r2: function name. // r2: function name.
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
...@@ -2171,8 +2159,8 @@ MaybeObject* CallStubCompiler::CompileMathFloorCall(Object* object, ...@@ -2171,8 +2159,8 @@ MaybeObject* CallStubCompiler::CompileMathFloorCall(Object* object,
__ bind(&miss); __ bind(&miss);
// r2: function name. // r2: function name.
MaybeObject* obj = GenerateMissBranch(); MaybeObject* maybe_result = GenerateMissBranch();
if (obj->IsFailure()) return obj; if (maybe_result->IsFailure()) return maybe_result;
// Return the generated code. // Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
...@@ -2273,10 +2261,8 @@ MaybeObject* CallStubCompiler::CompileMathAbsCall(Object* object, ...@@ -2273,10 +2261,8 @@ MaybeObject* CallStubCompiler::CompileMathAbsCall(Object* object,
__ bind(&miss); __ bind(&miss);
// r2: function name. // r2: function name.
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
...@@ -2327,10 +2313,8 @@ MaybeObject* CallStubCompiler::CompileFastApiCall( ...@@ -2327,10 +2313,8 @@ MaybeObject* CallStubCompiler::CompileFastApiCall(
FreeSpaceForFastApiCall(masm()); FreeSpaceForFastApiCall(masm());
__ bind(&miss_before_stack_reserved); __ bind(&miss_before_stack_reserved);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -2461,10 +2445,8 @@ MaybeObject* CallStubCompiler::CompileCallConstant(Object* object, ...@@ -2461,10 +2445,8 @@ MaybeObject* CallStubCompiler::CompileCallConstant(Object* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -2516,10 +2498,8 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object, ...@@ -2516,10 +2498,8 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(INTERCEPTOR, name); return GetCode(INTERCEPTOR, name);
...@@ -2585,10 +2565,8 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object, ...@@ -2585,10 +2565,8 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
__ IncrementCounter(COUNTERS->call_global_inline_miss(), 1, r1, r3); __ IncrementCounter(COUNTERS->call_global_inline_miss(), 1, r1, r3);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(NORMAL, name); return GetCode(NORMAL, name);
......
...@@ -1409,10 +1409,8 @@ MUST_USE_RESULT MaybeObject* CallStubCompiler::CompileCallField( ...@@ -1409,10 +1409,8 @@ MUST_USE_RESULT MaybeObject* CallStubCompiler::CompileCallField(
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(FIELD, name); return GetCode(FIELD, name);
...@@ -1561,10 +1559,8 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object, ...@@ -1561,10 +1559,8 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object,
} }
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1644,10 +1640,8 @@ MaybeObject* CallStubCompiler::CompileArrayPopCall(Object* object, ...@@ -1644,10 +1640,8 @@ MaybeObject* CallStubCompiler::CompileArrayPopCall(Object* object,
1); 1);
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1728,10 +1722,8 @@ MaybeObject* CallStubCompiler::CompileStringCharCodeAtCall( ...@@ -1728,10 +1722,8 @@ MaybeObject* CallStubCompiler::CompileStringCharCodeAtCall(
// Restore function name in ecx. // Restore function name in ecx.
__ Set(ecx, Immediate(Handle<String>(name))); __ Set(ecx, Immediate(Handle<String>(name)));
__ bind(&name_miss); __ bind(&name_miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1814,10 +1806,8 @@ MaybeObject* CallStubCompiler::CompileStringCharAtCall( ...@@ -1814,10 +1806,8 @@ MaybeObject* CallStubCompiler::CompileStringCharAtCall(
// Restore function name in ecx. // Restore function name in ecx.
__ Set(ecx, Immediate(Handle<String>(name))); __ Set(ecx, Immediate(Handle<String>(name)));
__ bind(&name_miss); __ bind(&name_miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1889,10 +1879,8 @@ MaybeObject* CallStubCompiler::CompileStringFromCharCodeCall( ...@@ -1889,10 +1879,8 @@ MaybeObject* CallStubCompiler::CompileStringFromCharCodeCall(
__ bind(&miss); __ bind(&miss);
// ecx: function name. // ecx: function name.
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
...@@ -2017,10 +2005,8 @@ MaybeObject* CallStubCompiler::CompileMathFloorCall(Object* object, ...@@ -2017,10 +2005,8 @@ MaybeObject* CallStubCompiler::CompileMathFloorCall(Object* object,
__ bind(&miss); __ bind(&miss);
// ecx: function name. // ecx: function name.
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
...@@ -2122,10 +2108,8 @@ MaybeObject* CallStubCompiler::CompileMathAbsCall(Object* object, ...@@ -2122,10 +2108,8 @@ MaybeObject* CallStubCompiler::CompileMathAbsCall(Object* object,
__ bind(&miss); __ bind(&miss);
// ecx: function name. // ecx: function name.
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
...@@ -2184,10 +2168,8 @@ MaybeObject* CallStubCompiler::CompileFastApiCall( ...@@ -2184,10 +2168,8 @@ MaybeObject* CallStubCompiler::CompileFastApiCall(
__ add(Operand(esp), Immediate(kFastApiCallArguments * kPointerSize)); __ add(Operand(esp), Immediate(kFastApiCallArguments * kPointerSize));
__ bind(&miss_before_stack_reserved); __ bind(&miss_before_stack_reserved);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -2320,10 +2302,8 @@ MaybeObject* CallStubCompiler::CompileCallConstant(Object* object, ...@@ -2320,10 +2302,8 @@ MaybeObject* CallStubCompiler::CompileCallConstant(Object* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -2388,10 +2368,8 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object, ...@@ -2388,10 +2368,8 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object,
// Handle load cache miss. // Handle load cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(INTERCEPTOR, name); return GetCode(INTERCEPTOR, name);
...@@ -2459,10 +2437,8 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object, ...@@ -2459,10 +2437,8 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
__ IncrementCounter(COUNTERS->call_global_inline_miss(), 1); __ IncrementCounter(COUNTERS->call_global_inline_miss(), 1);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(NORMAL, name); return GetCode(NORMAL, name);
......
...@@ -1372,10 +1372,8 @@ MaybeObject* CallStubCompiler::CompileCallField(JSObject* object, ...@@ -1372,10 +1372,8 @@ MaybeObject* CallStubCompiler::CompileCallField(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(FIELD, name); return GetCode(FIELD, name);
...@@ -1535,10 +1533,8 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object, ...@@ -1535,10 +1533,8 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object,
} }
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1619,10 +1615,8 @@ MaybeObject* CallStubCompiler::CompileArrayPopCall(Object* object, ...@@ -1619,10 +1615,8 @@ MaybeObject* CallStubCompiler::CompileArrayPopCall(Object* object,
1); 1);
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1703,10 +1697,8 @@ MaybeObject* CallStubCompiler::CompileStringCharCodeAtCall( ...@@ -1703,10 +1697,8 @@ MaybeObject* CallStubCompiler::CompileStringCharCodeAtCall(
// Restore function name in rcx. // Restore function name in rcx.
__ Move(rcx, Handle<String>(name)); __ Move(rcx, Handle<String>(name));
__ bind(&name_miss); __ bind(&name_miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1789,10 +1781,8 @@ MaybeObject* CallStubCompiler::CompileStringCharAtCall( ...@@ -1789,10 +1781,8 @@ MaybeObject* CallStubCompiler::CompileStringCharAtCall(
// Restore function name in rcx. // Restore function name in rcx.
__ Move(rcx, Handle<String>(name)); __ Move(rcx, Handle<String>(name));
__ bind(&name_miss); __ bind(&name_miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1860,10 +1850,8 @@ MaybeObject* CallStubCompiler::CompileStringFromCharCodeCall( ...@@ -1860,10 +1850,8 @@ MaybeObject* CallStubCompiler::CompileStringFromCharCodeCall(
__ bind(&miss); __ bind(&miss);
// rcx: function name. // rcx: function name.
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
...@@ -1975,10 +1963,8 @@ MaybeObject* CallStubCompiler::CompileMathAbsCall(Object* object, ...@@ -1975,10 +1963,8 @@ MaybeObject* CallStubCompiler::CompileMathAbsCall(Object* object,
__ bind(&miss); __ bind(&miss);
// rcx: function name. // rcx: function name.
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name);
...@@ -2034,10 +2020,8 @@ MaybeObject* CallStubCompiler::CompileFastApiCall( ...@@ -2034,10 +2020,8 @@ MaybeObject* CallStubCompiler::CompileFastApiCall(
__ addq(rsp, Immediate(kFastApiCallArguments * kPointerSize)); __ addq(rsp, Immediate(kFastApiCallArguments * kPointerSize));
__ bind(&miss_before_stack_reserved); __ bind(&miss_before_stack_reserved);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -2170,10 +2154,8 @@ MaybeObject* CallStubCompiler::CompileCallConstant(Object* object, ...@@ -2170,10 +2154,8 @@ MaybeObject* CallStubCompiler::CompileCallConstant(Object* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -2239,10 +2221,8 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object, ...@@ -2239,10 +2221,8 @@ MaybeObject* CallStubCompiler::CompileCallInterceptor(JSObject* object,
// Handle load cache miss. // Handle load cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(INTERCEPTOR, name); return GetCode(INTERCEPTOR, name);
...@@ -2311,10 +2291,8 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object, ...@@ -2311,10 +2291,8 @@ MaybeObject* CallStubCompiler::CompileCallGlobal(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
__ IncrementCounter(COUNTERS->call_global_inline_miss(), 1); __ IncrementCounter(COUNTERS->call_global_inline_miss(), 1);
Object* obj; MaybeObject* maybe_result = GenerateMissBranch();
{ MaybeObject* maybe_obj = GenerateMissBranch(); if (maybe_result->IsFailure()) return maybe_result;
if (!maybe_obj->ToObject(&obj)) return maybe_obj;
}
// Return the generated code. // Return the generated code.
return GetCode(NORMAL, name); return GetCode(NORMAL, name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment