blob: e2ef2225488791e40e5063770fa6a039d120f04d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
%# -*- C -*-
%# Copyright (c) 2017 Urabe, Shyouhei. All rights reserved.
%#
%# This file is a part of the programming language Ruby. Permission is hereby
%# granted, to either redistribute and/or modify this file, provided that the
%# conditions mentioned in the file COPYING are met. Consult the file for
%# details.
%
enum ruby_insn_type_chars {
% RubyVM::Typemap.each_value do |(c, t)|
<%= t %> = '<%= c %>',
% end
};
static inline union iseq_inline_storage_entry *
ISEQ_IS_ENTRY_START(const struct rb_iseq_constant_body *body, char op_type)
{
unsigned int relative_ic_offset = 0;
switch (op_type) {
case TS_IC:
relative_ic_offset += body->ise_size;
case TS_ISE:
relative_ic_offset += body->ivc_size;
case TS_IVC:
case TS_ICVARC:
break;
default:
rb_bug("Wrong op type");
}
return &body->is_entries[relative_ic_offset];
}
|