ruby-internal 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/README +204 -6
  2. data/ext/cached/ruby-1.6.8/internal/binding/block.h +35 -0
  3. data/ext/cached/ruby-1.6.8/internal/method/method.h +19 -0
  4. data/ext/cached/ruby-1.6.8/internal/module/classpath.c +3 -0
  5. data/ext/cached/ruby-1.6.8/internal/module/classpath.h +8 -0
  6. data/ext/cached/ruby-1.6.8/internal/node/block.h +35 -0
  7. data/ext/cached/ruby-1.6.8/internal/node/global_entry.h +15 -0
  8. data/ext/cached/ruby-1.6.8/internal/node/node_type_descrip.c +149 -0
  9. data/ext/cached/ruby-1.6.8/internal/node/nodeinfo.c +5582 -0
  10. data/ext/cached/ruby-1.6.8/internal/node/nodeinfo.h +69 -0
  11. data/ext/cached/ruby-1.6.8/internal/proc/block.h +35 -0
  12. data/ext/cached/ruby-1.6.8/internal/tag/tag.h +15 -0
  13. data/ext/cached/ruby-1.6.8/internal/vm/instruction/insns_info.c +39 -0
  14. data/ext/cached/ruby-1.6.8/internal/vm/instruction/insns_info.h +21 -0
  15. data/ext/cached/ruby-1.6.8/internal/vm/iseq/insns_info.inc +12 -0
  16. data/ext/cached/ruby-1.6.8/internal/vm/iseq/iseq_load.inc +9 -0
  17. data/ext/cached/ruby-1.8.0/internal/node/node_type_descrip.c +91 -91
  18. data/ext/cached/ruby-1.8.0/internal/node/nodeinfo.c +1909 -1909
  19. data/ext/cached/ruby-1.8.0/internal/vm/iseq/iseq_load.inc +9 -0
  20. data/ext/cached/ruby-1.8.1/internal/node/node_type_descrip.c +90 -90
  21. data/ext/cached/ruby-1.8.1/internal/node/nodeinfo.c +1946 -1946
  22. data/ext/cached/ruby-1.8.1/internal/vm/iseq/iseq_load.inc +9 -0
  23. data/ext/cached/ruby-1.8.2/internal/node/node_type_descrip.c +90 -90
  24. data/ext/cached/ruby-1.8.2/internal/node/nodeinfo.c +1946 -1946
  25. data/ext/cached/ruby-1.8.2/internal/vm/iseq/iseq_load.inc +9 -0
  26. data/ext/cached/ruby-1.8.3/internal/node/node_type_descrip.c +90 -90
  27. data/ext/cached/ruby-1.8.3/internal/node/nodeinfo.c +1946 -1946
  28. data/ext/cached/ruby-1.8.3/internal/vm/iseq/iseq_load.inc +9 -0
  29. data/ext/cached/ruby-1.8.4/internal/node/node_type_descrip.c +90 -90
  30. data/ext/cached/ruby-1.8.4/internal/node/nodeinfo.c +1946 -1946
  31. data/ext/cached/ruby-1.8.4/internal/vm/iseq/iseq_load.inc +9 -0
  32. data/ext/cached/ruby-1.8.5/internal/node/node_type_descrip.c +90 -90
  33. data/ext/cached/ruby-1.8.5/internal/node/nodeinfo.c +1909 -1909
  34. data/ext/cached/ruby-1.8.5/internal/vm/iseq/iseq_load.inc +9 -0
  35. data/ext/cached/ruby-1.8.6/internal/node/node_type_descrip.c +90 -90
  36. data/ext/cached/ruby-1.8.6/internal/node/nodeinfo.c +1909 -1909
  37. data/ext/cached/ruby-1.8.6/internal/vm/iseq/iseq_load.inc +9 -0
  38. data/ext/cached/ruby-1.8.7/internal/node/node_type_descrip.c +90 -90
  39. data/ext/cached/ruby-1.8.7/internal/node/nodeinfo.c +1909 -1909
  40. data/ext/cached/ruby-1.8.7/internal/vm/iseq/iseq_load.inc +9 -0
  41. data/ext/cached/ruby-1.9.0/internal/node/node_type_descrip.c +85 -85
  42. data/ext/cached/ruby-1.9.0/internal/node/nodeinfo.c +1800 -1800
  43. data/ext/cached/ruby-1.9.0/internal/vm/iseq/iseq_load.inc +13 -0
  44. data/ext/cached/ruby-1.9.0/internal/yarv-headers/transdb.h +51 -51
  45. data/ext/cached/ruby-1.9.1/internal/node/node_type_descrip.c +85 -85
  46. data/ext/cached/ruby-1.9.1/internal/node/nodeinfo.c +1800 -1800
  47. data/ext/cached/ruby-1.9.1/internal/vm/instruction/insns_info.h +1 -2
  48. data/ext/cached/ruby-1.9.1/internal/vm/iseq/iseq_load.inc +356 -0
  49. data/ext/cached/ruby-1.9.1/internal/yarv-headers/eval_intern.h +15 -9
  50. data/ext/cached/ruby-1.9.1/internal/yarv-headers/id.h +45 -66
  51. data/ext/cached/ruby-1.9.1/internal/yarv-headers/iseq.h +12 -3
  52. data/ext/cached/ruby-1.9.1/internal/yarv-headers/node.h +2 -2
  53. data/ext/cached/ruby-1.9.1/internal/yarv-headers/parse.h +23 -138
  54. data/ext/cached/ruby-1.9.1/internal/yarv-headers/revision.h +1 -1
  55. data/ext/cached/ruby-1.9.1/internal/yarv-headers/transcode_data.h +9 -2
  56. data/ext/cached/ruby-1.9.1/internal/yarv-headers/transdb.h +62 -0
  57. data/ext/cached/ruby-1.9.1/internal/yarv-headers/version.h +17 -23
  58. data/ext/cached/ruby-1.9.1/internal/yarv-headers/vm_core.h +20 -29
  59. data/ext/cached/ruby-1.9.1/internal/yarv-headers/vm_exec.h +4 -7
  60. data/ext/cached/ruby-1.9.1/internal/yarv-headers/vm_insnhelper.h +6 -5
  61. data/ext/internal/module/cfp.h +13 -0
  62. data/ext/internal/module/extconf.rb +2 -2
  63. data/ext/internal/module/module.c +3 -8
  64. data/ext/internal/node/nodes.rb +2 -1
  65. data/ext/internal/vm/iseq/iseq.c +2 -3
  66. data/ext/internal/vm/iseq/iseq_load.inc.rpp +61 -0
  67. data/ext/internal/yarv-headers/debug.h +36 -0
  68. data/ext/internal/yarv-headers/dln.h +41 -0
  69. data/ext/internal/yarv-headers/encdb.h +147 -0
  70. data/ext/internal/yarv-headers/eval_intern.h +215 -0
  71. data/ext/internal/yarv-headers/gc.h +75 -0
  72. data/ext/internal/yarv-headers/id.h +163 -0
  73. data/ext/internal/yarv-headers/iseq.h +103 -0
  74. data/ext/internal/yarv-headers/node.h +516 -0
  75. data/ext/internal/yarv-headers/parse.h +188 -0
  76. data/ext/internal/yarv-headers/regenc.h +207 -0
  77. data/ext/internal/yarv-headers/regint.h +842 -0
  78. data/ext/internal/yarv-headers/regparse.h +351 -0
  79. data/ext/internal/yarv-headers/revision.h +1 -0
  80. data/ext/internal/yarv-headers/thread_pthread.h +24 -0
  81. data/ext/internal/yarv-headers/thread_win32.h +33 -0
  82. data/ext/internal/yarv-headers/transcode_data.h +106 -0
  83. data/ext/internal/yarv-headers/transdb.h +147 -0
  84. data/ext/internal/yarv-headers/version.h +54 -0
  85. data/ext/internal/yarv-headers/vm_core.h +646 -0
  86. data/ext/internal/yarv-headers/vm_exec.h +184 -0
  87. data/ext/internal/yarv-headers/vm_insnhelper.h +195 -0
  88. data/ext/internal/yarv-headers/vm_opts.h +51 -0
  89. data/publish_rdoc.rb +4 -0
  90. metadata +52 -2
@@ -1,24 +1,23 @@
1
- /* A Bison parser, made by GNU Bison 2.3. */
2
1
 
3
- /* Skeleton interface for Bison's Yacc-like parsers in C
2
+ /* A Bison parser, made by GNU Bison 2.4.1. */
4
3
 
5
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
4
+ /* Skeleton interface for Bison's Yacc-like parsers in C
5
+
6
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6
7
  Free Software Foundation, Inc.
7
-
8
- This program is free software; you can redistribute it and/or modify
8
+
9
+ This program is free software: you can redistribute it and/or modify
9
10
  it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation; either version 2, or (at your option)
11
- any later version.
12
-
11
+ the Free Software Foundation, either version 3 of the License, or
12
+ (at your option) any later version.
13
+
13
14
  This program is distributed in the hope that it will be useful,
14
15
  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
16
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
17
  GNU General Public License for more details.
17
-
18
+
18
19
  You should have received a copy of the GNU General Public License
19
- along with this program; if not, write to the Free Software
20
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
- Boston, MA 02110-1301, USA. */
20
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
22
21
 
23
22
  /* As a special exception, you may create a larger work that contains
24
23
  part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +28,11 @@
29
28
  special exception, which will cause the skeleton and the resulting
30
29
  Bison output files to be licensed under the GNU General Public
31
30
  License without this special exception.
32
-
31
+
33
32
  This special exception was added by the Free Software Foundation in
34
33
  version 2.2 of Bison. */
35
34
 
35
+
36
36
  /* Tokens. */
37
37
  #ifndef YYTOKENTYPE
38
38
  # define YYTOKENTYPE
@@ -160,144 +160,29 @@
160
160
  tLAST_TOKEN = 376
161
161
  };
162
162
  #endif
163
- /* Tokens. */
164
- #define keyword_class 258
165
- #define keyword_module 259
166
- #define keyword_def 260
167
- #define keyword_undef 261
168
- #define keyword_begin 262
169
- #define keyword_rescue 263
170
- #define keyword_ensure 264
171
- #define keyword_end 265
172
- #define keyword_if 266
173
- #define keyword_unless 267
174
- #define keyword_then 268
175
- #define keyword_elsif 269
176
- #define keyword_else 270
177
- #define keyword_case 271
178
- #define keyword_when 272
179
- #define keyword_while 273
180
- #define keyword_until 274
181
- #define keyword_for 275
182
- #define keyword_break 276
183
- #define keyword_next 277
184
- #define keyword_redo 278
185
- #define keyword_retry 279
186
- #define keyword_in 280
187
- #define keyword_do 281
188
- #define keyword_do_cond 282
189
- #define keyword_do_block 283
190
- #define keyword_do_LAMBDA 284
191
- #define keyword_return 285
192
- #define keyword_yield 286
193
- #define keyword_super 287
194
- #define keyword_self 288
195
- #define keyword_nil 289
196
- #define keyword_true 290
197
- #define keyword_false 291
198
- #define keyword_and 292
199
- #define keyword_or 293
200
- #define keyword_not 294
201
- #define modifier_if 295
202
- #define modifier_unless 296
203
- #define modifier_while 297
204
- #define modifier_until 298
205
- #define modifier_rescue 299
206
- #define keyword_alias 300
207
- #define keyword_defined 301
208
- #define keyword_BEGIN 302
209
- #define keyword_END 303
210
- #define keyword__LINE__ 304
211
- #define keyword__FILE__ 305
212
- #define keyword__ENCODING__ 306
213
- #define tIDENTIFIER 307
214
- #define tFID 308
215
- #define tGVAR 309
216
- #define tIVAR 310
217
- #define tCONSTANT 311
218
- #define tCVAR 312
219
- #define tLABEL 313
220
- #define tINTEGER 314
221
- #define tFLOAT 315
222
- #define tSTRING_CONTENT 316
223
- #define tCHAR 317
224
- #define tNTH_REF 318
225
- #define tBACK_REF 319
226
- #define tREGEXP_END 320
227
- #define tUPLUS 321
228
- #define tUMINUS 322
229
- #define tPOW 323
230
- #define tCMP 324
231
- #define tEQ 325
232
- #define tEQQ 326
233
- #define tNEQ 327
234
- #define tGEQ 328
235
- #define tLEQ 329
236
- #define tANDOP 330
237
- #define tOROP 331
238
- #define tMATCH 332
239
- #define tNMATCH 333
240
- #define tDOT2 334
241
- #define tDOT3 335
242
- #define tAREF 336
243
- #define tASET 337
244
- #define tLSHFT 338
245
- #define tRSHFT 339
246
- #define tCOLON2 340
247
- #define tCOLON3 341
248
- #define tOP_ASGN 342
249
- #define tASSOC 343
250
- #define tLPAREN 344
251
- #define tLPAREN_ARG 345
252
- #define tRPAREN 346
253
- #define tLBRACK 347
254
- #define tLBRACE 348
255
- #define tLBRACE_ARG 349
256
- #define tSTAR 350
257
- #define tAMPER 351
258
- #define tLAMBDA 352
259
- #define tSYMBEG 353
260
- #define tSTRING_BEG 354
261
- #define tXSTRING_BEG 355
262
- #define tREGEXP_BEG 356
263
- #define tWORDS_BEG 357
264
- #define tQWORDS_BEG 358
265
- #define tSTRING_DBEG 359
266
- #define tSTRING_DVAR 360
267
- #define tSTRING_END 361
268
- #define tLAMBEG 362
269
- #define tLOWEST 363
270
- #define tUMINUS_NUM 364
271
- #define idNULL 365
272
- #define idRespond_to 366
273
- #define idIFUNC 367
274
- #define idCFUNC 368
275
- #define idThrowState 369
276
- #define id_core_set_method_alias 370
277
- #define id_core_set_variable_alias 371
278
- #define id_core_undef_method 372
279
- #define id_core_define_method 373
280
- #define id_core_define_singleton_method 374
281
- #define id_core_set_postexe 375
282
- #define tLAST_TOKEN 376
283
-
284
163
 
285
164
 
286
165
 
287
166
  #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
288
167
  typedef union YYSTYPE
289
168
  {
169
+
170
+ /* Line 1676 of yacc.c */
171
+
290
172
  VALUE val;
291
173
  NODE *node;
292
174
  ID id;
293
175
  int num;
294
- }
295
- /* Line 1489 of yacc.c. */
296
- YYSTYPE;
176
+
177
+
178
+
179
+ /* Line 1676 of yacc.c */
180
+ } YYSTYPE;
181
+ # define YYSTYPE_IS_TRIVIAL 1
297
182
  # define yystype YYSTYPE /* obsolescent; will be withdrawn */
298
183
  # define YYSTYPE_IS_DECLARED 1
299
- # define YYSTYPE_IS_TRIVIAL 1
300
184
  #endif
301
185
 
302
186
 
303
187
 
188
+
@@ -1 +1 @@
1
- #define RUBY_REVISION 19983
1
+ #define RUBY_REVISION 24175
@@ -2,7 +2,7 @@
2
2
 
3
3
  transcode_data.h -
4
4
 
5
- $Author: akr $
5
+ $Author: yugui $
6
6
  created at: Mon 10 Dec 2007 14:01:47 JST 2007
7
7
 
8
8
  Copyright (C) 2007 Martin Duerst
@@ -35,6 +35,7 @@
35
35
  #define FUNio (PType 0x0E) /* function from info to output */
36
36
  #define FUNso (PType 0x0F) /* function from start to output */
37
37
  #define STR1 (PType 0x11) /* string 4 <= len <= 259 bytes: 1byte length + content */
38
+ #define GB4bt (PType 0x12) /* GB18030 four bytes payload */
38
39
 
39
40
  #define STR1_LENGTH(byte_addr) (*(byte_addr) + 4)
40
41
  #define STR1_BYTEINDEX(w) ((w) >> 6)
@@ -44,13 +45,19 @@
44
45
  #define o1(b1) (PType((((unsigned char)(b1))<<8)|ONEbt))
45
46
  #define o2(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt))
46
47
  #define o3(b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|THREEbt)&0xffffffffU))
47
- #define o4(b0,b1,b2,b3) (PType(((((unsigned char)(b1))<< 8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt)&0xffffffffU))
48
+ #define o4(b0,b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt)&0xffffffffU))
49
+ #define g4(b0,b1,b2,b3) (PType(((((unsigned char)(b0))<<8)|(((unsigned char)(b2))<<16)|((((unsigned char)(b1))&0x0f)<<24)|((((unsigned char)(b3))&0x0f)<<28)|GB4bt)&0xffffffffU))
48
50
 
49
51
  #define getBT1(a) (((a)>> 8)&0xFF)
50
52
  #define getBT2(a) (((a)>>16)&0xFF)
51
53
  #define getBT3(a) (((a)>>24)&0xFF)
52
54
  #define getBT0(a) ((((a)>> 5)&0x07)|0xF0) /* for UTF-8 only!!! */
53
55
 
56
+ #define getGB4bt0(a) (((a)>> 8)&0xFF)
57
+ #define getGB4bt1(a) (((a)>>24)&0x0F|0x30)
58
+ #define getGB4bt2(a) (((a)>>16)&0xFF)
59
+ #define getGB4bt3(a) (((a)>>28)&0x0F|0x30)
60
+
54
61
  #define o2FUNii(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|FUNii))
55
62
 
56
63
  /* do we need these??? maybe not, can be done with simple tables */
@@ -1,7 +1,17 @@
1
+ rb_declare_transcoder("Big5", "UTF-8", "big5");
2
+ rb_declare_transcoder("UTF-8", "Big5", "big5");
3
+ rb_declare_transcoder("GB2312", "UTF-8", "chinese");
4
+ rb_declare_transcoder("GB12345", "UTF-8", "chinese");
5
+ rb_declare_transcoder("UTF-8", "GB2312", "chinese");
6
+ rb_declare_transcoder("UTF-8", "GB12345", "chinese");
1
7
  rb_declare_transcoder("", "amp_escape", "escape");
2
8
  rb_declare_transcoder("", "xml_text_escape", "escape");
3
9
  rb_declare_transcoder("", "xml_attr_content_escape", "escape");
4
10
  rb_declare_transcoder("", "xml_attr_quote", "escape");
11
+ rb_declare_transcoder("GB18030", "UTF-8", "gb18030");
12
+ rb_declare_transcoder("UTF-8", "GB18030", "gb18030");
13
+ rb_declare_transcoder("GBK", "UTF-8", "gbk");
14
+ rb_declare_transcoder("UTF-8", "GBK", "gbk");
5
15
  rb_declare_transcoder("ISO-2022-JP", "stateless-ISO-2022-JP", "iso2022");
6
16
  rb_declare_transcoder("stateless-ISO-2022-JP", "ISO-2022-JP", "iso2022");
7
17
  rb_declare_transcoder("stateless-ISO-2022-JP", "EUC-JP", "iso2022");
@@ -75,6 +85,58 @@ rb_declare_transcoder("WINDOWS-1256", "UTF-8", "single_byte");
75
85
  rb_declare_transcoder("UTF-8", "WINDOWS-1256", "single_byte");
76
86
  rb_declare_transcoder("WINDOWS-1257", "UTF-8", "single_byte");
77
87
  rb_declare_transcoder("UTF-8", "WINDOWS-1257", "single_byte");
88
+ rb_declare_transcoder("IBM437", "UTF-8", "single_byte");
89
+ rb_declare_transcoder("UTF-8", "IBM437", "single_byte");
90
+ rb_declare_transcoder("IBM775", "UTF-8", "single_byte");
91
+ rb_declare_transcoder("UTF-8", "IBM775", "single_byte");
92
+ rb_declare_transcoder("IBM852", "UTF-8", "single_byte");
93
+ rb_declare_transcoder("UTF-8", "IBM852", "single_byte");
94
+ rb_declare_transcoder("IBM855", "UTF-8", "single_byte");
95
+ rb_declare_transcoder("UTF-8", "IBM855", "single_byte");
96
+ rb_declare_transcoder("IBM857", "UTF-8", "single_byte");
97
+ rb_declare_transcoder("UTF-8", "IBM857", "single_byte");
98
+ rb_declare_transcoder("IBM860", "UTF-8", "single_byte");
99
+ rb_declare_transcoder("UTF-8", "IBM860", "single_byte");
100
+ rb_declare_transcoder("IBM861", "UTF-8", "single_byte");
101
+ rb_declare_transcoder("UTF-8", "IBM861", "single_byte");
102
+ rb_declare_transcoder("IBM862", "UTF-8", "single_byte");
103
+ rb_declare_transcoder("UTF-8", "IBM862", "single_byte");
104
+ rb_declare_transcoder("IBM863", "UTF-8", "single_byte");
105
+ rb_declare_transcoder("UTF-8", "IBM863", "single_byte");
106
+ rb_declare_transcoder("IBM865", "UTF-8", "single_byte");
107
+ rb_declare_transcoder("UTF-8", "IBM865", "single_byte");
108
+ rb_declare_transcoder("IBM866", "UTF-8", "single_byte");
109
+ rb_declare_transcoder("UTF-8", "IBM866", "single_byte");
110
+ rb_declare_transcoder("IBM869", "UTF-8", "single_byte");
111
+ rb_declare_transcoder("UTF-8", "IBM869", "single_byte");
112
+ rb_declare_transcoder("MACCROATIAN", "UTF-8", "single_byte");
113
+ rb_declare_transcoder("UTF-8", "MACCROATIAN", "single_byte");
114
+ rb_declare_transcoder("MACCYRILLIC", "UTF-8", "single_byte");
115
+ rb_declare_transcoder("UTF-8", "MACCYRILLIC", "single_byte");
116
+ rb_declare_transcoder("MACGREEK", "UTF-8", "single_byte");
117
+ rb_declare_transcoder("UTF-8", "MACGREEK", "single_byte");
118
+ rb_declare_transcoder("MACICELAND", "UTF-8", "single_byte");
119
+ rb_declare_transcoder("UTF-8", "MACICELAND", "single_byte");
120
+ rb_declare_transcoder("MACROMAN", "UTF-8", "single_byte");
121
+ rb_declare_transcoder("UTF-8", "MACROMAN", "single_byte");
122
+ rb_declare_transcoder("MACROMANIA", "UTF-8", "single_byte");
123
+ rb_declare_transcoder("UTF-8", "MACROMANIA", "single_byte");
124
+ rb_declare_transcoder("MACTURKISH", "UTF-8", "single_byte");
125
+ rb_declare_transcoder("UTF-8", "MACTURKISH", "single_byte");
126
+ rb_declare_transcoder("MACUKRAINE", "UTF-8", "single_byte");
127
+ rb_declare_transcoder("UTF-8", "MACUKRAINE", "single_byte");
128
+ rb_declare_transcoder("KOI8-U", "UTF-8", "single_byte");
129
+ rb_declare_transcoder("UTF-8", "KOI8-U", "single_byte");
130
+ rb_declare_transcoder("KOI8-R", "UTF-8", "single_byte");
131
+ rb_declare_transcoder("UTF-8", "KOI8-R", "single_byte");
132
+ rb_declare_transcoder("TIS-620", "UTF-8", "single_byte");
133
+ rb_declare_transcoder("UTF-8", "TIS-620", "single_byte");
134
+ rb_declare_transcoder("CP850", "UTF-8", "single_byte");
135
+ rb_declare_transcoder("UTF-8", "CP850", "single_byte");
136
+ rb_declare_transcoder("CP852", "UTF-8", "single_byte");
137
+ rb_declare_transcoder("UTF-8", "CP852", "single_byte");
138
+ rb_declare_transcoder("CP855", "UTF-8", "single_byte");
139
+ rb_declare_transcoder("UTF-8", "CP855", "single_byte");
78
140
  rb_declare_transcoder("UTF-16BE", "UTF-8", "utf_16_32");
79
141
  rb_declare_transcoder("UTF-8", "UTF-16BE", "utf_16_32");
80
142
  rb_declare_transcoder("UTF-16LE", "UTF-8", "utf_16_32");
@@ -1,15 +1,12 @@
1
1
  #define RUBY_VERSION "1.9.1"
2
- #define RUBY_RELEASE_DATE "2008-10-28"
3
- #define RUBY_VERSION_CODE 191
4
- #define RUBY_RELEASE_CODE 20081028
5
- #define RUBY_PATCHLEVEL 0
6
-
2
+ #define RUBY_RELEASE_DATE "2009-07-16"
3
+ #define RUBY_PATCHLEVEL 243
7
4
  #define RUBY_VERSION_MAJOR 1
8
5
  #define RUBY_VERSION_MINOR 9
9
6
  #define RUBY_VERSION_TEENY 1
10
- #define RUBY_RELEASE_YEAR 2008
11
- #define RUBY_RELEASE_MONTH 10
12
- #define RUBY_RELEASE_DAY 28
7
+ #define RUBY_RELEASE_YEAR 2009
8
+ #define RUBY_RELEASE_MONTH 7
9
+ #define RUBY_RELEASE_DAY 12
13
10
 
14
11
  #ifdef RUBY_EXTERN
15
12
  RUBY_EXTERN const char ruby_version[];
@@ -25,32 +22,29 @@ RUBY_EXTERN const char ruby_copyright[];
25
22
  #define RUBY_BIRTH_MONTH 2
26
23
  #define RUBY_BIRTH_DAY 24
27
24
 
25
+ #define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL)
26
+
28
27
  #ifndef RUBY_REVISION
29
- #include "revision.h"
28
+ # include "revision.h"
30
29
  #endif
31
- #ifndef RUBY_REVISION
32
- #define RUBY_REVISION 0
30
+ # ifndef RUBY_REVISION
31
+ # define RUBY_REVISION 0
33
32
  #endif
34
33
 
35
- #if RUBY_PATCHLEVEL
36
- #define RUBY_PATCHLEVEL_STR " patchlevel "STRINGIZE(RUBY_PATCHLEVEL)
37
- #else
38
- #define RUBY_PATCHLEVEL_STR ""
39
- #endif
40
34
  #if RUBY_REVISION
41
- #ifdef RUBY_BRANCH_NAME
42
- #define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "STRINGIZE(RUBY_REVISION)
43
- #else
44
- #define RUBY_REVISION_STR " revision "STRINGIZE(RUBY_REVISION)
45
- #endif
35
+ # ifdef RUBY_BRANCH_NAME
36
+ # define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "STRINGIZE(RUBY_REVISION)
37
+ # else
38
+ # define RUBY_REVISION_STR " revision "STRINGIZE(RUBY_REVISION)
39
+ # endif
46
40
  #else
47
- #define RUBY_REVISION_STR ""
41
+ # define RUBY_REVISION_STR ""
48
42
  #endif
49
43
 
50
44
  # define RUBY_DESCRIPTION \
51
45
  "ruby "RUBY_VERSION \
46
+ RUBY_PATCHLEVEL_STR \
52
47
  " ("RUBY_RELEASE_DATE \
53
- RUBY_PATCHLEVEL_STR \
54
48
  RUBY_REVISION_STR") " \
55
49
  "["RUBY_PLATFORM"]"
56
50
  # define RUBY_COPYRIGHT \
@@ -2,7 +2,7 @@
2
2
 
3
3
  vm_core.h -
4
4
 
5
- $Author: ko1 $
5
+ $Author: yugui $
6
6
  created at: 04/01/01 19:41:38 JST
7
7
 
8
8
  Copyright (C) 2004-2007 Koichi Sasada
@@ -363,6 +363,7 @@ typedef struct rb_thread_struct
363
363
  int slice;
364
364
 
365
365
  native_thread_data_t native_thread_data;
366
+ void *blocking_region_buffer;
366
367
 
367
368
  VALUE thgroup;
368
369
  VALUE value;
@@ -431,11 +432,12 @@ typedef struct rb_thread_struct
431
432
  /* iseq.c */
432
433
  VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE);
433
434
  VALUE rb_iseq_new_top(NODE *node, VALUE name, VALUE filename, VALUE parent);
435
+ VALUE rb_iseq_new_main(NODE *node, VALUE filename);
434
436
  VALUE rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE);
435
437
  VALUE rb_iseq_new_with_opt(NODE*, VALUE, VALUE, VALUE, VALUE, const rb_compile_option_t*);
436
438
  VALUE rb_iseq_compile(VALUE src, VALUE file, VALUE line);
437
- VALUE ruby_iseq_disasm(VALUE self);
438
- VALUE ruby_iseq_disasm_insn(VALUE str, VALUE *iseqval, int pos, rb_iseq_t *iseq, VALUE child);
439
+ VALUE rb_iseq_disasm(VALUE self);
440
+ VALUE rb_iseq_disasm_insn(VALUE str, VALUE *iseqval, int pos, rb_iseq_t *iseq, VALUE child);
439
441
  const char *ruby_node_name(int node);
440
442
  int rb_iseq_first_lineno(rb_iseq_t *iseq);
441
443
 
@@ -567,23 +569,28 @@ VALUE rb_thread_alloc(VALUE klass);
567
569
  VALUE rb_proc_alloc(VALUE klass);
568
570
 
569
571
  /* for debug */
570
- extern void vm_stack_dump_raw(rb_thread_t *, rb_control_frame_t *);
571
- #define SDR() vm_stack_dump_raw(GET_THREAD(), GET_THREAD()->cfp)
572
- #define SDR2(cfp) vm_stack_dump_raw(GET_THREAD(), (cfp))
572
+ extern void rb_vmdebug_stack_dump_raw(rb_thread_t *, rb_control_frame_t *);
573
+ #define SDR() rb_vmdebug_stack_dump_raw(GET_THREAD(), GET_THREAD()->cfp)
574
+ #define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_THREAD(), (cfp))
573
575
  void rb_vm_bugreport(void);
574
576
 
575
577
 
576
578
  /* functions about thread/vm execution */
577
579
 
578
580
  VALUE rb_iseq_eval(VALUE iseqval);
581
+ VALUE rb_iseq_eval_main(VALUE iseqval);
579
582
  void rb_enable_interrupt(void);
580
583
  void rb_disable_interrupt(void);
581
584
  int rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, VALUE *klassp);
582
585
 
583
- VALUE vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc, VALUE self,
584
- int argc, const VALUE *argv, rb_block_t *blockptr);
585
- VALUE vm_make_proc(rb_thread_t *th, rb_control_frame_t *cfp, const rb_block_t *block, VALUE klass);
586
- VALUE vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp);
586
+ VALUE rb_vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc, VALUE self,
587
+ int argc, const VALUE *argv, rb_block_t *blockptr);
588
+ VALUE rb_vm_make_proc(rb_thread_t *th, const rb_block_t *block, VALUE klass);
589
+ VALUE rb_vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp);
590
+
591
+ void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
592
+ int ruby_thread_has_gvl_p(void);
593
+ rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
587
594
 
588
595
  NOINLINE(void rb_gc_save_machine_context(rb_thread_t *));
589
596
 
@@ -624,30 +631,14 @@ void rb_thread_execute_interrupts(rb_thread_t *);
624
631
  RUBY_VM_CHECK_INTS_TH(GET_THREAD())
625
632
 
626
633
  /* tracer */
627
- static inline void
628
- exec_event_hooks(rb_event_hook_t *hook, rb_event_flag_t flag, VALUE self, ID id, VALUE klass)
629
- {
630
- if (self == rb_mRubyVMFrozenCore) return;
631
- while (hook) {
632
- if (flag & hook->flag) {
633
- (*hook->func)(flag, hook->data, self, id, klass);
634
- }
635
- hook = hook->next;
636
- }
637
- }
634
+ void
635
+ rb_threadptr_exec_event_hooks(rb_thread_t *th, rb_event_flag_t flag, VALUE self, ID id, VALUE klass);
638
636
 
639
637
  #define EXEC_EVENT_HOOK(th, flag, self, id, klass) do { \
640
638
  rb_event_flag_t wait_event__ = th->event_flags; \
641
639
  if (UNLIKELY(wait_event__)) { \
642
640
  if (wait_event__ & (flag | RUBY_EVENT_VM)) { \
643
- VALUE self__ = (self), klass__ = (klass); \
644
- ID id__ = (id); \
645
- if (wait_event__ & flag) { \
646
- exec_event_hooks(th->event_hooks, flag, self__, id__, klass__); \
647
- } \
648
- if (wait_event__ & RUBY_EVENT_VM) { \
649
- exec_event_hooks(th->vm->event_hooks, flag, self__, id__, klass__); \
650
- } \
641
+ rb_threadptr_exec_event_hooks(th, flag, self, id, klass); \
651
642
  } \
652
643
  } \
653
644
  } while (0)
@@ -2,15 +2,15 @@
2
2
 
3
3
  vm.h -
4
4
 
5
- $Author: ko1 $
5
+ $Author: yugui $
6
6
  created at: 04/01/01 16:56:59 JST
7
7
 
8
8
  Copyright (C) 2004-2007 Koichi Sasada
9
9
 
10
10
  **********************************************************************/
11
11
 
12
- #ifndef RUBY_VM_H
13
- #define RUBY_VM_H
12
+ #ifndef RUBY_VM_EXEC_H
13
+ #define RUBY_VM_EXEC_H
14
14
 
15
15
  typedef long OFFSET;
16
16
  typedef unsigned long lindex_t;
@@ -59,9 +59,6 @@ typedef rb_iseq_t *ISEQ;
59
59
  #define throwdebug if(0)printf
60
60
  /* #define throwdebug printf */
61
61
 
62
- #define SDR2(cfp) vm_stack_dump_raw(GET_THREAD(), (cfp))
63
-
64
-
65
62
  /************************************************/
66
63
  #if DISPATCH_XXX
67
64
  error !
@@ -184,4 +181,4 @@ default: \
184
181
 
185
182
  #define SCREG(r) (reg_##r)
186
183
 
187
- #endif /* RUBY_VM_H */
184
+ #endif /* RUBY_VM_EXEC_H */
@@ -2,7 +2,7 @@
2
2
 
3
3
  insnhelper.h - helper macros to implement each instructions
4
4
 
5
- $Author: ko1 $
5
+ $Author: yugui $
6
6
  created at: 04/01/01 15:50:34 JST
7
7
 
8
8
  Copyright (C) 2004-2007 Koichi Sasada
@@ -53,11 +53,12 @@ enum {
53
53
  BOP_NOT,
54
54
  BOP_NEQ,
55
55
 
56
- BOP_LAST_,
56
+ BOP_LAST_
57
57
  };
58
58
 
59
59
  extern char ruby_vm_redefined_flag[BOP_LAST_];
60
60
  extern VALUE ruby_vm_global_state_version;
61
+ extern VALUE ruby_vm_const_missing_count;
61
62
 
62
63
  #define GET_VM_STATE_VERSION() (ruby_vm_global_state_version)
63
64
  #define INC_VM_STATE_VERSION() \
@@ -158,8 +159,8 @@ extern VALUE ruby_vm_global_state_version;
158
159
  c1->nd_next = __tmp_c2->nd_next; \
159
160
  } while (0)
160
161
 
161
- #define CALL_METHOD(num, blockptr, flag, id, mn, recv, klass) do { \
162
- VALUE v = vm_call_method(th, GET_CFP(), num, blockptr, flag, id, mn, recv, klass); \
162
+ #define CALL_METHOD(num, blockptr, flag, id, mn, recv) do { \
163
+ VALUE v = vm_call_method(th, GET_CFP(), num, blockptr, flag, id, mn, recv); \
163
164
  if (v == Qundef) { \
164
165
  RESTORE_REGS(); \
165
166
  NEXT_INSN(); \
@@ -188,7 +189,7 @@ extern VALUE ruby_vm_global_state_version;
188
189
 
189
190
  #define CALL_SIMPLE_METHOD(num, id, recv) do { \
190
191
  VALUE klass = CLASS_OF(recv); \
191
- CALL_METHOD(num, 0, 0, id, rb_method_node(klass, id), recv, CLASS_OF(recv)); \
192
+ CALL_METHOD(num, 0, 0, id, rb_method_node(klass, id), recv); \
192
193
  } while (0)
193
194
 
194
195
  #endif /* RUBY_INSNHELPER_H */
@@ -0,0 +1,13 @@
1
+ #ifndef ruby_internal__module_cfp__h
2
+ #define ruby_internal__module_cfp__h
3
+
4
+ #include "vm_core.h"
5
+ #include "eval_intern.h"
6
+
7
+ rb_control_frame_t *
8
+ vm_get_ruby_level_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
9
+
10
+ rb_control_frame_t *
11
+ rb_vm_get_ruby_level_next_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
12
+
13
+ #endif // ruby_internal__module_cfp__h
@@ -1,8 +1,8 @@
1
1
  $: << '../..'
2
2
  require 'mkmf-ruby-internal'
3
3
 
4
- have_func('vm_get_ruby_level_cfp')
5
- have_func('vm_get_ruby_level_next_cfp')
4
+ have_func('vm_get_ruby_level_cfp', 'cfp.h')
5
+ have_func('rb_vm_get_ruby_level_next_cfp', 'cfp.h')
6
6
  have_header('ruby/node.h') or have_header('node.h')
7
7
 
8
8
  ruby_version_code = RUBY_VERSION.gsub(/\./, '').to_i
@@ -5,6 +5,7 @@
5
5
  #include <ruby/st.h>
6
6
  #include "vm_core.h"
7
7
  #include "eval_intern.h"
8
+ #include "cfp.h"
8
9
  #else
9
10
  #include <rubysig.h>
10
11
  #include <st.h>
@@ -335,17 +336,11 @@ static VALUE module_name_proc = Qnil;
335
336
 
336
337
  #ifdef RUBY_VM
337
338
 
338
- #if defined(HAVE_VM_GET_RUBY_LEVEL_NEXT_CFP)
339
- /* Declared and defined in vm.c */
340
- rb_control_frame_t *
341
- vm_get_ruby_level_next_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
342
- #endif
343
-
344
339
  static void set_cref_stack(rb_iseq_t * iseqdat, VALUE klass, VALUE noex)
345
340
  {
346
341
  rb_thread_t * th = GET_THREAD();
347
- #if defined(HAVE_VM_GET_RUBY_LEVEL_NEXT_CFP)
348
- rb_control_frame_t * cfp = vm_get_ruby_level_next_cfp(th, th->cfp);
342
+ #if defined(HAVE_RB_VM_GET_RUBY_LEVEL_NEXT_CFP)
343
+ rb_control_frame_t * cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
349
344
  #elif defined(HAVE_VM_GET_RUBY_LEVEL_CFP)
350
345
  rb_control_frame_t * cfp = vm_get_ruby_level_cfp(th, th->cfp);
351
346
  #else
@@ -48,6 +48,7 @@ class Nodes
48
48
  @nodes = {}
49
49
  nodes.each do |name, node|
50
50
  members = {}
51
+ # TODO: is there any way to enforce order here?
51
52
  (node['members'] || {}).each do |member_name, member|
52
53
  member ||= {}
53
54
  members[member_name] = MemberInfo.new(
@@ -64,7 +65,7 @@ class Nodes
64
65
  end
65
66
 
66
67
  def each(&block)
67
- @nodes.each(&block)
68
+ @nodes.sort.each(&block)
68
69
  end
69
70
 
70
71
  def [](name)
@@ -11,6 +11,8 @@
11
11
 
12
12
  #include "vm_core.h"
13
13
 
14
+ #include "iseq_load.inc"
15
+
14
16
  #ifdef HAVE_ISEQ_H
15
17
  #include "iseq.h"
16
18
  #endif
@@ -23,9 +25,6 @@
23
25
  #define RARRAY_PTR(a) RARRAY(a)->ptr
24
26
  #endif
25
27
 
26
- // Defined but not declared by ruby
27
- VALUE iseq_load(VALUE self, VALUE data, VALUE parent, VALUE opt);
28
-
29
28
  static VALUE rb_cModulePlaceholder;
30
29
 
31
30
  static VALUE rb_mMarshal;