Sha256: 8646bab2770fe64df0ebafcf2d6a641d61f746077804f3457ae4bc11425ca936

Contents?: true

Size: 610 Bytes

Versions: 10

Compression:

Stored size: 610 Bytes

Contents

__attribute__((__noinline__))
static VALUE bspec_exec(void** ip, char* s, VALUE a) {
  static void* opcodes[] = { <%= @opcode_list.join ', ' %> };
  if (ip == NULL) {
    return (VALUE)opcodes;
  }
  goto **(ip++);
BS_RET:
  return a;
<% [8, 16, 32, 64].each do |len| %>
BS_EXPECT<%= len %>:
  {
    char* expect = (char*)(ip++);
    if (strncmp(s, expect, <%= len / 8 %>)) {
      return Qnil;
    }
    goto **(ip++);
  }
<% end %>
<% @conv_insns.each do |ins| %>
BS_<%= ins %>:
  {
    <%= extract ins %>;
    rb_ary_push(a, <%= convert ins %>);
    s += <%= incr ins %>;
    goto **(ip++);
  }
<% end %>
}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
zscan-2.0.9 generate/bspec_exec.inc
zscan-2.0.8 generate/bspec_exec.inc
zscan-2.0.7 generate/bspec_exec.inc
zscan-2.0.6 generate/bspec_exec.inc
zscan-2.0.5 generate/bspec_exec.inc
zscan-2.0.4 generate/bspec_exec.inc
zscan-2.0.3 generate/bspec_exec.inc
zscan-2.0.2 generate/bspec_exec.inc
zscan-2.0.1 generate/bspec_exec.inc
zscan-2.0 generate/bspec_exec.inc