fastruby 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/CHANGELOG +10 -0
  2. data/Rakefile +4 -2
  3. data/benchmarks/benchmark.rb +20 -44
  4. data/benchmarks/benchmark.rb~ +47 -0
  5. data/benchmarks/benchmark2.rb +19 -45
  6. data/benchmarks/benchmark2.rb~ +46 -0
  7. data/benchmarks/benchmark3.rb +19 -45
  8. data/benchmarks/benchmark3.rb~ +46 -0
  9. data/benchmarks/benchmark4.rb +30 -65
  10. data/benchmarks/benchmark4.rb~ +61 -0
  11. data/benchmarks/benchmark5.rb +25 -55
  12. data/benchmarks/benchmark5.rb~ +54 -0
  13. data/benchmarks/benchmark6.rb +19 -40
  14. data/benchmarks/benchmark6.rb~ +41 -0
  15. data/benchmarks/benchmark7.rb +23 -52
  16. data/benchmarks/benchmark7.rb~ +48 -0
  17. data/ext/fastruby_base/fastruby_base.inl +1 -0
  18. data/lib/fastruby/builder.rb +128 -76
  19. data/lib/fastruby/cache/cache.rb +9 -5
  20. data/lib/fastruby/fastruby_sexp.rb +18 -0
  21. data/lib/fastruby/inliner/inliner.rb +68 -0
  22. data/lib/fastruby/inliner/modules/call.rb +150 -0
  23. data/lib/fastruby/inliner/modules/recursive.rb +35 -0
  24. data/lib/fastruby/object.rb +17 -32
  25. data/lib/fastruby/reductor/modules/case.rb +49 -0
  26. data/lib/{fastruby.rb~ → fastruby/reductor/modules/for.rb} +11 -13
  27. data/lib/fastruby/reductor/modules/nontree.rb +31 -0
  28. data/lib/fastruby/reductor/modules/recursive.rb +31 -0
  29. data/lib/fastruby/reductor/reductor.rb +39 -0
  30. data/lib/fastruby/set_tree.rb +7 -1
  31. data/lib/fastruby/sexp_extension.rb +6 -0
  32. data/lib/fastruby/translator/modules/block.rb +4 -4
  33. data/lib/fastruby/translator/modules/call.rb +9 -26
  34. data/lib/fastruby/translator/modules/defn.rb +5 -3
  35. data/lib/fastruby/translator/modules/directive.rb +42 -0
  36. data/lib/fastruby/translator/modules/exceptions.rb +12 -30
  37. data/lib/fastruby/translator/modules/flow.rb +33 -83
  38. data/lib/fastruby/translator/modules/iter.rb +4 -7
  39. data/lib/fastruby/translator/modules/literal.rb +11 -25
  40. data/lib/fastruby/translator/modules/logical.rb +5 -3
  41. data/lib/fastruby/translator/modules/method_group.rb +4 -3
  42. data/lib/fastruby/translator/modules/nonlocal.rb +7 -5
  43. data/lib/fastruby/translator/modules/static.rb +242 -0
  44. data/lib/fastruby/translator/modules/variable.rb +16 -9
  45. data/lib/fastruby/translator/scope_mode_helper.rb +2 -27
  46. data/lib/fastruby/translator/translator.rb +131 -60
  47. data/lib/fastruby/translator/translator_modules.rb +6 -2
  48. data/lib/fastruby.rb +1 -1
  49. data/spec/reductor/base_spec.rb +46 -0
  50. data/spec/ruby/base_spec.rb~ +394 -0
  51. data/spec/ruby/block/arguments_spec.rb~ +214 -0
  52. data/spec/ruby/block/proc_as_block_spec.rb~ +23 -0
  53. data/spec/ruby/block/retry_spec.rb~ +43 -0
  54. data/spec/ruby/block_spec.rb~ +520 -0
  55. data/spec/ruby/defn/replacement_spec.rb~ +102 -0
  56. data/spec/ruby/integrity_spec.rb~ +40 -0
  57. data/spec/ruby/singleton_spec.rb~ +76 -0
  58. data/spec/scope_mode/base_spec.rb +14 -5
  59. data/spec/scope_mode/block_spec.rb +18 -9
  60. data/spec/scope_mode/call_spec.rb +11 -2
  61. data/spec/scope_mode/exception_spec.rb +11 -2
  62. data/spec/scope_mode/flow_spec.rb +18 -8
  63. data/spec/scope_mode/optimization_spec.rb +21 -13
  64. data/spec/static/base_spec.rb +54 -0
  65. data/spec/static/flow_spec.rb +48 -0
  66. data/spec/static/operator_spec.rb +104 -0
  67. metadata +58 -8
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-23 00:00:00.000000000Z
12
+ date: 2012-02-05 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: RubyInline
16
- requirement: &73589340 !ruby/object:Gem::Requirement
16
+ requirement: &82092610 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
@@ -21,18 +21,40 @@ dependencies:
21
21
  version: 3.11.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *73589340
24
+ version_requirements: *82092610
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: ruby_parser
27
- requirement: &73588480 !ruby/object:Gem::Requirement
27
+ requirement: &82092320 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
- - - =
30
+ - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.0.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *73588480
35
+ version_requirements: *82092320
36
+ - !ruby/object:Gem::Dependency
37
+ name: define_method_handler
38
+ requirement: &82092060 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 0.0.5
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *82092060
47
+ - !ruby/object:Gem::Dependency
48
+ name: method_source
49
+ requirement: &82091800 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.6.7
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *82091800
36
58
  description:
37
59
  email: robertodarioseminara@gmail.com
38
60
  executables: []
@@ -43,10 +65,17 @@ extra_rdoc_files:
43
65
  files:
44
66
  - benchmarks/benchmark5.rb
45
67
  - benchmarks/benchmark2.rb
68
+ - benchmarks/benchmark2.rb~
69
+ - benchmarks/benchmark7.rb~
70
+ - benchmarks/benchmark4.rb~
71
+ - benchmarks/benchmark5.rb~
46
72
  - benchmarks/benchmark.rb
73
+ - benchmarks/benchmark3.rb~
47
74
  - benchmarks/benchmark6.rb
75
+ - benchmarks/benchmark.rb~
48
76
  - benchmarks/benchmark3.rb
49
77
  - benchmarks/benchmark7.rb
78
+ - benchmarks/benchmark6.rb~
50
79
  - benchmarks/benchmark4.rb
51
80
  - examples/example2.rb
52
81
  - examples/example3.rb
@@ -63,7 +92,9 @@ files:
63
92
  - lib/fastruby/translator/translator.rb
64
93
  - lib/fastruby/translator/modules/defn.rb
65
94
  - lib/fastruby/translator/modules/iter.rb
95
+ - lib/fastruby/translator/modules/directive.rb
66
96
  - lib/fastruby/translator/modules/exceptions.rb
97
+ - lib/fastruby/translator/modules/static.rb
67
98
  - lib/fastruby/translator/modules/method_group.rb
68
99
  - lib/fastruby/translator/modules/nonlocal.rb
69
100
  - lib/fastruby/translator/modules/variable.rb
@@ -79,7 +110,14 @@ files:
79
110
  - lib/fastruby/custom_require.rb
80
111
  - lib/fastruby/getlocals.rb
81
112
  - lib/fastruby/fastruby_sexp.rb
82
- - lib/fastruby.rb~
113
+ - lib/fastruby/inliner/inliner.rb
114
+ - lib/fastruby/inliner/modules/recursive.rb
115
+ - lib/fastruby/inliner/modules/call.rb
116
+ - lib/fastruby/reductor/modules/for.rb
117
+ - lib/fastruby/reductor/modules/recursive.rb
118
+ - lib/fastruby/reductor/modules/nontree.rb
119
+ - lib/fastruby/reductor/modules/case.rb
120
+ - lib/fastruby/reductor/reductor.rb
83
121
  - lib/fastruby_load_path.rb
84
122
  - lib/fastruby.rb
85
123
  - spec/edges_helper.rb
@@ -95,6 +133,7 @@ files:
95
133
  - spec/sexp2graph/flow_spec.rb
96
134
  - spec/sexp2graph/logical_spec.rb
97
135
  - spec/ruby/block/retry_spec.rb
136
+ - spec/ruby/block/arguments_spec.rb~
98
137
  - spec/ruby/block/arguments_spec.rb
99
138
  - spec/ruby/block/proc_spec.rb
100
139
  - spec/ruby/block/break_spec.rb
@@ -103,8 +142,12 @@ files:
103
142
  - spec/ruby/block/lambda_spec.rb
104
143
  - spec/ruby/block/redo_spec.rb
105
144
  - spec/ruby/block/block_as_proc_spec.rb
145
+ - spec/ruby/block/retry_spec.rb~
146
+ - spec/ruby/block/proc_as_block_spec.rb~
106
147
  - spec/ruby/block/callcc_spec.rb
148
+ - spec/ruby/base_spec.rb~
107
149
  - spec/ruby/literal_spec.rb
150
+ - spec/ruby/integrity_spec.rb~
108
151
  - spec/ruby/exception/internal_ex_spec.rb
109
152
  - spec/ruby/exception/base_spec.rb
110
153
  - spec/ruby/exception/exc_trap_spec.rb
@@ -113,8 +156,10 @@ files:
113
156
  - spec/ruby/base_spec.rb
114
157
  - spec/ruby/singleton_spec.rb
115
158
  - spec/ruby/variable_spec.rb
159
+ - spec/ruby/block_spec.rb~
116
160
  - spec/ruby/module_spec.rb
117
161
  - spec/ruby/jump/next_spec.rb
162
+ - spec/ruby/singleton_spec.rb~
118
163
  - spec/ruby/sugar_spec.rb
119
164
  - spec/ruby/return_spec.rb
120
165
  - spec/ruby/flow_control/for_spec.rb
@@ -127,11 +172,16 @@ files:
127
172
  - spec/ruby/defn/default_args_spec.rb
128
173
  - spec/ruby/defn/single_function_spec.rb
129
174
  - spec/ruby/defn/replacement_spec.rb
175
+ - spec/ruby/defn/replacement_spec.rb~
130
176
  - spec/ruby/expression_spec.rb
131
177
  - spec/ruby/control_spec.rb
132
178
  - spec/graph/base_spec.rb
133
179
  - spec/graph/vertex_spec.rb
134
180
  - spec/graph/path_spec.rb
181
+ - spec/static/operator_spec.rb
182
+ - spec/static/base_spec.rb
183
+ - spec/static/flow_spec.rb
184
+ - spec/reductor/base_spec.rb
135
185
  - ext/fastruby_base/fastruby_base.inl
136
186
  - ext/fastruby_base/fastruby_base.c
137
187
  - ext/fastruby_base/extconf.rb