I almost forgot to ask: can you do the same thing for ARM? On Wed, Oct 21, 2009 at 9:34 PM, Kevin Millikin <[email protected]>wrote:
> On Wed, Oct 21, 2009 at 6:12 PM, <[email protected]> wrote: > >> if (source.is_temporary()) { >> if (FLAG_trace) { >> __ CallRuntime(Runtime::kTraceExit, 1); >> } else { >> __ pop(eax); >> } >> } else { >> ASSERT(blah blah blah); >> if (FLAG_trace) { >> __ push(Immediate(expr->AsLiteral()->handle())); >> __ CallRuntime(Runtime::kTraceExit, 1); >> } else { >> __ mov(eax, expr->AsLiteral()->handle()); >> } >> } >> > > Probably simpler: > > if (FLAG_trace) { > if (source.is_constant()) { > ASSERT(expr->AsLiteral() != NULL); > __ push(Immediate(expr->AsLiteral()->handle())); > } > __ CallRuntime(Runtime::kTraceExit, 1); > } else { > if (source.is_temporary()) { > __ pop(eax); > } else { > // the same asserts > __ mov(eax, expr->AsLiteral()->handle()); > } > } > --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
