Revert FBReactKit: use indirect jumps to external functions

Reviewed By: rnystrom

Differential Revision: D3117661

fb-gh-sync-id: 05b7f796b58656aa13e4be78a562e07d18cf9488
fbshipit-source-id: 05b7f796b58656aa13e4be78a562e07d18cf9488
This commit is contained in:
Jason Prado 2016-03-30 16:39:26 -07:00 committed by Facebook Github Bot 0
parent d3b8846400
commit 9d49cf095b

View File

@ -35,10 +35,7 @@ SYMBOL_NAME(RCTProfileTrampoline):
* profile
*/
mov r0, #0xc
ldr ip, LCPI_malloc
blx ip
bl SYMBOL_NAME(malloc)
/**
* r4 is the callee saved register we'll use to refer to the allocated memory,
* store its initial value, so we can restore it later
@ -90,20 +87,10 @@ SYMBOL_NAME(RCTProfileTrampoline):
ldr r1, [r4, #0x8]
ldr r4, [r4]
push {r1} // save the caller on the stack
ldr ip, LCPI_free
blx ip
bl SYMBOL_NAME(free)
pop {lr} // pop the caller
pop {r0} // pop the return value
bx lr // jump to the calleer
trap
.p2align 2
LCPI_malloc:
.long SYMBOL_NAME(malloc)
LCPI_free:
.long SYMBOL_NAME(free)
#endif