[erlang-questions] marco definition in beam_emu.c

caox caox@REDACTED
Tue Sep 6 17:50:50 CEST 2011


Hi

	When reading the source code of beam_emu.c, I found the following marcos:

#if defined(NO_JUMP_TABLE)
#  define OpCase(OpCode)    case op_##OpCode: lb_##OpCode
#  define CountCase(OpCode) case op_count_##OpCode
#  define OpCode(OpCode)    ((Uint*)op_##OpCode)
#  define Goto(Rel) {Go = (int)(Rel); goto emulator_loop;}
#  define LabelAddr(Addr) &&##Addr
#else
#  define OpCase(OpCode)    lb_##OpCode
#  define CountCase(OpCode) lb_count_##OpCode
#  define Goto(Rel) goto *(Rel)
#  define LabelAddr(Label) &&Label
#  define OpCode(OpCode)  (&&lb_##OpCode)
#endif

which I couldn't understand. What is the meaning of 'op_##' and 'lb_##'?

BR

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110906/fc6126fd/attachment.htm>


More information about the erlang-questions mailing list