Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 3f2b01ea2c6e7cb0b9a757c655ce0648af092efd..889e9815a01526829c4efffdc363da41e342df72 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -1734,6 +1734,17 @@ void MacroAssembler::CallStub(CodeStub* stub, Condition cond) { |
} |
+MaybeObject* MacroAssembler::TryCallStub(CodeStub* stub, Condition cond) { |
+ ASSERT(allow_stub_calls()); // Stub calls are not allowed in some stubs. |
+ Object* result; |
+ { MaybeObject* maybe_result = stub->TryGetCode(); |
+ if (!maybe_result->ToObject(&result)) return maybe_result; |
+ } |
+ Call(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET, cond); |
+ return result; |
+} |
+ |
+ |
void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { |
ASSERT(allow_stub_calls()); // Stub calls are not allowed in some stubs. |
Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); |