fastruby 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +17 -1
- data/Rakefile +1 -1
- data/ext/fastruby_base/fastruby_base.inl +81 -3
- data/lib/fastruby/fastruby_sexp.rb +21 -0
- data/lib/fastruby/getlocals.rb +2 -1
- data/lib/fastruby/object.rb +1 -1
- data/lib/fastruby/sexp_extension.rb +189 -0
- data/lib/fastruby/sexp_extension_edges.rb +210 -0
- data/lib/fastruby/translator/modules/block.rb +29 -22
- data/lib/fastruby/translator/modules/call.rb +211 -34
- data/lib/fastruby/translator/modules/defn.rb +64 -29
- data/lib/fastruby/translator/modules/exceptions.rb +1 -1
- data/lib/fastruby/translator/modules/flow.rb +93 -31
- data/lib/fastruby/translator/modules/iter.rb +277 -340
- data/lib/fastruby/translator/modules/literal.rb +97 -20
- data/lib/fastruby/translator/modules/logical.rb +40 -5
- data/lib/fastruby/translator/modules/method_group.rb +41 -19
- data/lib/fastruby/translator/modules/nonlocal.rb +74 -29
- data/lib/fastruby/translator/modules/variable.rb +151 -42
- data/lib/fastruby/translator/scope_mode_helper.rb +161 -0
- data/lib/fastruby/translator/translator.rb +389 -302
- data/lib/fastruby.rb +1 -1
- data/lib/fastruby.rb~ +36 -0
- data/spec/edges_helper.rb +91 -0
- data/spec/graph/base_spec.rb +35 -0
- data/spec/graph/path_spec.rb +48 -0
- data/spec/graph/vertex_spec.rb +58 -0
- data/spec/ruby/block/proc_as_block_spec.rb +214 -0
- data/spec/ruby/block/redo_spec.rb +133 -0
- data/spec/ruby/defn/single_function_spec.rb +50 -0
- data/spec/scope_mode/base_spec.rb +55 -0
- data/spec/scope_mode/block_spec.rb +105 -0
- data/spec/scope_mode/call_spec.rb +24 -0
- data/spec/scope_mode/exception_spec.rb +34 -0
- data/spec/scope_mode/flow_spec.rb +99 -0
- data/spec/scope_mode/optimization_spec.rb +130 -0
- data/spec/sexp2graph/base_spec.rb +36 -0
- data/spec/sexp2graph/exception_spec.rb +172 -0
- data/spec/sexp2graph/flow_spec.rb +67 -0
- data/spec/sexp2graph/logical_spec.rb +21 -0
- data/spec/sexp2graph/variable_spec.rb +26 -0
- metadata +110 -120
- data/lib/fastruby/self +0 -82
- data/lib/len +0 -280
- data/spec/block/proc_as_block_spec.rb +0 -111
- data/spec/block/redo_spec.rb +0 -67
- /data/spec/{base_spec.rb → ruby/base_spec.rb} +0 -0
- /data/spec/{block → ruby/block}/arguments_spec.rb +0 -0
- /data/spec/{block → ruby/block}/block_as_proc_spec.rb +0 -0
- /data/spec/{block → ruby/block}/break_spec.rb +0 -0
- /data/spec/{block → ruby/block}/callcc_spec.rb +0 -0
- /data/spec/{block → ruby/block}/lambda_spec.rb +0 -0
- /data/spec/{block → ruby/block}/next_spec.rb +0 -0
- /data/spec/{block → ruby/block}/proc_spec.rb +0 -0
- /data/spec/{block → ruby/block}/retry_spec.rb +0 -0
- /data/spec/{block_spec.rb → ruby/block_spec.rb} +0 -0
- /data/spec/{call → ruby/call}/base_call_spec.rb +0 -0
- /data/spec/{call → ruby/call}/multiple_args_spec.rb +0 -0
- /data/spec/{control_spec.rb → ruby/control_spec.rb} +0 -0
- /data/spec/{defn → ruby/defn}/default_args_spec.rb +0 -0
- /data/spec/{defn → ruby/defn}/multiple_args_spec.rb +0 -0
- /data/spec/{defn → ruby/defn}/replacement_spec.rb +0 -0
- /data/spec/{exception → ruby/exception}/base_spec.rb +0 -0
- /data/spec/{exception → ruby/exception}/ensure_spec.rb +0 -0
- /data/spec/{exception → ruby/exception}/exc_trap_spec.rb +0 -0
- /data/spec/{exception → ruby/exception}/internal_ex_spec.rb +0 -0
- /data/spec/{exception → ruby/exception}/syntaxis_spec.rb +0 -0
- /data/spec/{expression_spec.rb → ruby/expression_spec.rb} +0 -0
- /data/spec/{flow_control → ruby/flow_control}/case_spec.rb +0 -0
- /data/spec/{flow_control → ruby/flow_control}/for_spec.rb +0 -0
- /data/spec/{integrity_spec.rb → ruby/integrity_spec.rb} +0 -0
- /data/spec/{jump → ruby/jump}/next_spec.rb +0 -0
- /data/spec/{literal_spec.rb → ruby/literal_spec.rb} +0 -0
- /data/spec/{module_spec.rb → ruby/module_spec.rb} +0 -0
- /data/spec/{return_spec.rb → ruby/return_spec.rb} +0 -0
- /data/spec/{singleton_spec.rb → ruby/singleton_spec.rb} +0 -0
- /data/spec/{sugar_spec.rb → ruby/sugar_spec.rb} +0 -0
- /data/spec/{variable_spec.rb → ruby/variable_spec.rb} +0 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
require "fastruby"
|
2
|
+
require "fastruby/sexp_extension"
|
3
|
+
require "sexp"
|
4
|
+
require "ruby_parser"
|
5
|
+
require "edges_helper"
|
6
|
+
|
7
|
+
describe FastRuby::FastRubySexp, "FastRubySexp" do
|
8
|
+
include EdgesHelper
|
9
|
+
|
10
|
+
assert_graph("should have two edges for if","if a; b; else; c; end",4) do |sexp, edges|
|
11
|
+
{:a => [:b,:c], :b => sexp, :c => sexp}
|
12
|
+
end
|
13
|
+
|
14
|
+
assert_graph("should have only one edge for if without else","if a; b; end",3) do |sexp, edges|
|
15
|
+
{:a => [:b,sexp], :b => sexp}
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_graph("should have only one edge for unless","unless a; b; end",3) do |sexp, edges|
|
19
|
+
{:a => [:b,sexp], :b => sexp}
|
20
|
+
end
|
21
|
+
|
22
|
+
assert_graph("should connect with the first node","if a; b.foo(x); end") do |sexp, edges|
|
23
|
+
if_body = sexp.find_tree(:if)[2]
|
24
|
+
{:a => :b, :b => :x, :x => if_body, if_body => sexp }
|
25
|
+
end
|
26
|
+
|
27
|
+
assert_graph("should connect previous call on block with condition of next if","foo; if a; b; end") do |sexp, edges|
|
28
|
+
{:foo => :a }
|
29
|
+
end
|
30
|
+
|
31
|
+
assert_graph("should create circular connection from while nodes",
|
32
|
+
"while(a); foo; bar; end",5) do |sexp, edges|
|
33
|
+
{ :a => :foo, sexp.find_tree(:block) => :a, :a => sexp}
|
34
|
+
end
|
35
|
+
|
36
|
+
assert_graph("should connect break inside while nodes with while", "while(a); foo; break; bar; end", 7) do |sexp,edges|
|
37
|
+
{:a => [:foo,sexp], sexp.find_tree(:break) => sexp, sexp.find_tree(:block) => :a}
|
38
|
+
end
|
39
|
+
|
40
|
+
assert_graph("should connect previous call on block with condition of next while",
|
41
|
+
"foo; while(a); b; end") do |sexp,edges|
|
42
|
+
{:foo => :a }
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
assert_graph("should create circular connection from until nodes",
|
47
|
+
"until(a); foo; bar; end",5) do |sexp, edges|
|
48
|
+
{ :a => :foo, sexp.find_tree(:block) => :a, :a => sexp}
|
49
|
+
end
|
50
|
+
|
51
|
+
assert_graph("should connect break inside until nodes with until", "until(a); foo; break; bar; end", 7) do |sexp,edges|
|
52
|
+
{:a => [:foo,sexp], sexp.find_tree(:break) => sexp, sexp.find_tree(:block) => :a}
|
53
|
+
end
|
54
|
+
|
55
|
+
assert_graph("should connect previous call on block with condition of next until",
|
56
|
+
"foo; until(a); b; end") do |sexp,edges|
|
57
|
+
{:foo => :a }
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
assert_graph("literals, literals everywhere","
|
62
|
+
1; 2; 3; 4
|
63
|
+
") do |sexp, edges|
|
64
|
+
|
65
|
+
{}
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "fastruby"
|
2
|
+
require "fastruby/sexp_extension"
|
3
|
+
require "sexp"
|
4
|
+
require "ruby_parser"
|
5
|
+
require "edges_helper"
|
6
|
+
|
7
|
+
describe FastRuby::FastRubySexp, "FastRubySexp" do
|
8
|
+
include EdgesHelper
|
9
|
+
|
10
|
+
assert_graph("should generate edges for or","a or b",2) do |sexp, edges|
|
11
|
+
{:a => :b, :b => sexp}
|
12
|
+
end
|
13
|
+
|
14
|
+
assert_graph("should generate edges for and","a and b",2) do |sexp, edges|
|
15
|
+
{:a => :b, :b => sexp}
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_graph("should generate edges for if with or condition","if (a or b); c; else; d; end",6) do |sexp, edges|
|
19
|
+
{:a => :b, :b => sexp.find_tree(:or), sexp.find_tree(:or) => [:c,:d], :c => sexp, :d => sexp }
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "fastruby"
|
2
|
+
require "fastruby/sexp_extension"
|
3
|
+
require "sexp"
|
4
|
+
require "ruby_parser"
|
5
|
+
require "edges_helper"
|
6
|
+
|
7
|
+
describe FastRuby::FastRubySexp, "FastRubySexp" do
|
8
|
+
include EdgesHelper
|
9
|
+
|
10
|
+
assert_graph("should generate edges for local assignment","a = b",1) do |sexp, edges|
|
11
|
+
{:b => sexp}
|
12
|
+
end
|
13
|
+
|
14
|
+
assert_graph("should generate edges for global assignment","$a = b",1) do |sexp, edges|
|
15
|
+
{:b => sexp}
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_graph("should generate edges for instance assignment","@a = b",1) do |sexp, edges|
|
19
|
+
{:b => sexp}
|
20
|
+
end
|
21
|
+
|
22
|
+
assert_graph("should generate edges for const assignment","A = b",1) do |sexp, edges|
|
23
|
+
{:b => sexp}
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
metadata
CHANGED
@@ -1,137 +1,137 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastruby
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.17
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 16
|
10
|
-
version: 0.0.16
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Dario Seminara
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-01-23 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: RubyInline
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &73589340 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 43
|
29
|
-
segments:
|
30
|
-
- 3
|
31
|
-
- 11
|
32
|
-
- 0
|
18
|
+
requirements:
|
19
|
+
- - =
|
20
|
+
- !ruby/object:Gem::Version
|
33
21
|
version: 3.11.0
|
34
22
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: ruby_parser
|
38
23
|
prerelease: false
|
39
|
-
|
24
|
+
version_requirements: *73589340
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: ruby_parser
|
27
|
+
requirement: &73588480 !ruby/object:Gem::Requirement
|
40
28
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
hash: 3
|
45
|
-
segments:
|
46
|
-
- 2
|
47
|
-
- 0
|
48
|
-
- 6
|
29
|
+
requirements:
|
30
|
+
- - =
|
31
|
+
- !ruby/object:Gem::Version
|
49
32
|
version: 2.0.6
|
50
33
|
type: :runtime
|
51
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *73588480
|
52
36
|
description:
|
53
37
|
email: robertodarioseminara@gmail.com
|
54
38
|
executables: []
|
55
|
-
|
56
|
-
extensions:
|
39
|
+
extensions:
|
57
40
|
- ext/fastruby_base/extconf.rb
|
58
|
-
extra_rdoc_files:
|
41
|
+
extra_rdoc_files:
|
59
42
|
- README
|
60
|
-
files:
|
61
|
-
- benchmarks/benchmark7.rb
|
43
|
+
files:
|
62
44
|
- benchmarks/benchmark5.rb
|
63
45
|
- benchmarks/benchmark2.rb
|
64
|
-
- benchmarks/
|
46
|
+
- benchmarks/benchmark.rb
|
65
47
|
- benchmarks/benchmark6.rb
|
66
48
|
- benchmarks/benchmark3.rb
|
67
|
-
- benchmarks/
|
68
|
-
-
|
49
|
+
- benchmarks/benchmark7.rb
|
50
|
+
- benchmarks/benchmark4.rb
|
51
|
+
- examples/example2.rb
|
69
52
|
- examples/example3.rb
|
70
53
|
- examples/example4.rb
|
71
|
-
- examples/
|
72
|
-
- lib/
|
73
|
-
- lib/fastruby/
|
74
|
-
- lib/fastruby/set_tree.rb
|
54
|
+
- examples/example1.rb
|
55
|
+
- lib/fastruby/sexp_extension.rb
|
56
|
+
- lib/fastruby/object.rb
|
75
57
|
- lib/fastruby/builder.rb
|
76
|
-
- lib/fastruby/
|
58
|
+
- lib/fastruby/inline_extension.rb
|
77
59
|
- lib/fastruby/logging.rb
|
60
|
+
- lib/fastruby/sexp_extension_edges.rb
|
78
61
|
- lib/fastruby/exceptions.rb
|
79
|
-
- lib/fastruby/
|
80
|
-
- lib/fastruby/
|
81
|
-
- lib/fastruby/object.rb
|
82
|
-
- lib/fastruby/translator/translator_modules.rb
|
83
|
-
- lib/fastruby/translator/modules/logical.rb
|
84
|
-
- lib/fastruby/translator/modules/flow.rb
|
85
|
-
- lib/fastruby/translator/modules/variable.rb
|
86
|
-
- lib/fastruby/translator/modules/exceptions.rb
|
62
|
+
- lib/fastruby/translator/scope_mode_helper.rb
|
63
|
+
- lib/fastruby/translator/translator.rb
|
87
64
|
- lib/fastruby/translator/modules/defn.rb
|
88
|
-
- lib/fastruby/translator/modules/method_group.rb
|
89
65
|
- lib/fastruby/translator/modules/iter.rb
|
66
|
+
- lib/fastruby/translator/modules/exceptions.rb
|
67
|
+
- lib/fastruby/translator/modules/method_group.rb
|
68
|
+
- lib/fastruby/translator/modules/nonlocal.rb
|
69
|
+
- lib/fastruby/translator/modules/variable.rb
|
90
70
|
- lib/fastruby/translator/modules/call.rb
|
91
71
|
- lib/fastruby/translator/modules/block.rb
|
92
|
-
- lib/fastruby/translator/modules/
|
72
|
+
- lib/fastruby/translator/modules/flow.rb
|
73
|
+
- lib/fastruby/translator/modules/logical.rb
|
93
74
|
- lib/fastruby/translator/modules/literal.rb
|
94
|
-
- lib/fastruby/translator/
|
95
|
-
- lib/fastruby/
|
96
|
-
- lib/fastruby/method_extension.rb
|
97
|
-
- lib/fastruby/self
|
75
|
+
- lib/fastruby/translator/translator_modules.rb
|
76
|
+
- lib/fastruby/set_tree.rb
|
98
77
|
- lib/fastruby/cache/cache.rb
|
78
|
+
- lib/fastruby/method_extension.rb
|
79
|
+
- lib/fastruby/custom_require.rb
|
80
|
+
- lib/fastruby/getlocals.rb
|
81
|
+
- lib/fastruby/fastruby_sexp.rb
|
82
|
+
- lib/fastruby.rb~
|
83
|
+
- lib/fastruby_load_path.rb
|
99
84
|
- lib/fastruby.rb
|
100
|
-
-
|
101
|
-
- spec/
|
102
|
-
- spec/
|
103
|
-
- spec/
|
104
|
-
- spec/
|
105
|
-
- spec/
|
106
|
-
- spec/
|
107
|
-
- spec/
|
108
|
-
- spec/
|
109
|
-
- spec/
|
110
|
-
- spec/
|
111
|
-
- spec/
|
112
|
-
- spec/block/retry_spec.rb
|
113
|
-
- spec/block/
|
114
|
-
- spec/block/
|
115
|
-
- spec/block/break_spec.rb
|
116
|
-
- spec/block/
|
117
|
-
- spec/block/
|
118
|
-
- spec/block/
|
119
|
-
- spec/block/
|
120
|
-
- spec/block/
|
121
|
-
- spec/
|
122
|
-
- spec/
|
123
|
-
- spec/exception/
|
124
|
-
- spec/exception/
|
125
|
-
- spec/exception/
|
126
|
-
- spec/
|
127
|
-
- spec/
|
128
|
-
- spec/
|
129
|
-
- spec/
|
130
|
-
- spec/
|
131
|
-
- spec/
|
132
|
-
- spec/
|
133
|
-
- spec/
|
134
|
-
- spec/
|
85
|
+
- spec/edges_helper.rb
|
86
|
+
- spec/scope_mode/base_spec.rb
|
87
|
+
- spec/scope_mode/exception_spec.rb
|
88
|
+
- spec/scope_mode/flow_spec.rb
|
89
|
+
- spec/scope_mode/block_spec.rb
|
90
|
+
- spec/scope_mode/optimization_spec.rb
|
91
|
+
- spec/scope_mode/call_spec.rb
|
92
|
+
- spec/sexp2graph/base_spec.rb
|
93
|
+
- spec/sexp2graph/variable_spec.rb
|
94
|
+
- spec/sexp2graph/exception_spec.rb
|
95
|
+
- spec/sexp2graph/flow_spec.rb
|
96
|
+
- spec/sexp2graph/logical_spec.rb
|
97
|
+
- spec/ruby/block/retry_spec.rb
|
98
|
+
- spec/ruby/block/arguments_spec.rb
|
99
|
+
- spec/ruby/block/proc_spec.rb
|
100
|
+
- spec/ruby/block/break_spec.rb
|
101
|
+
- spec/ruby/block/proc_as_block_spec.rb
|
102
|
+
- spec/ruby/block/next_spec.rb
|
103
|
+
- spec/ruby/block/lambda_spec.rb
|
104
|
+
- spec/ruby/block/redo_spec.rb
|
105
|
+
- spec/ruby/block/block_as_proc_spec.rb
|
106
|
+
- spec/ruby/block/callcc_spec.rb
|
107
|
+
- spec/ruby/literal_spec.rb
|
108
|
+
- spec/ruby/exception/internal_ex_spec.rb
|
109
|
+
- spec/ruby/exception/base_spec.rb
|
110
|
+
- spec/ruby/exception/exc_trap_spec.rb
|
111
|
+
- spec/ruby/exception/ensure_spec.rb
|
112
|
+
- spec/ruby/exception/syntaxis_spec.rb
|
113
|
+
- spec/ruby/base_spec.rb
|
114
|
+
- spec/ruby/singleton_spec.rb
|
115
|
+
- spec/ruby/variable_spec.rb
|
116
|
+
- spec/ruby/module_spec.rb
|
117
|
+
- spec/ruby/jump/next_spec.rb
|
118
|
+
- spec/ruby/sugar_spec.rb
|
119
|
+
- spec/ruby/return_spec.rb
|
120
|
+
- spec/ruby/flow_control/for_spec.rb
|
121
|
+
- spec/ruby/flow_control/case_spec.rb
|
122
|
+
- spec/ruby/call/base_call_spec.rb
|
123
|
+
- spec/ruby/call/multiple_args_spec.rb
|
124
|
+
- spec/ruby/integrity_spec.rb
|
125
|
+
- spec/ruby/block_spec.rb
|
126
|
+
- spec/ruby/defn/multiple_args_spec.rb
|
127
|
+
- spec/ruby/defn/default_args_spec.rb
|
128
|
+
- spec/ruby/defn/single_function_spec.rb
|
129
|
+
- spec/ruby/defn/replacement_spec.rb
|
130
|
+
- spec/ruby/expression_spec.rb
|
131
|
+
- spec/ruby/control_spec.rb
|
132
|
+
- spec/graph/base_spec.rb
|
133
|
+
- spec/graph/vertex_spec.rb
|
134
|
+
- spec/graph/path_spec.rb
|
135
135
|
- ext/fastruby_base/fastruby_base.inl
|
136
136
|
- ext/fastruby_base/fastruby_base.c
|
137
137
|
- ext/fastruby_base/extconf.rb
|
@@ -143,36 +143,26 @@ files:
|
|
143
143
|
- CHANGELOG
|
144
144
|
homepage: http://github.com/tario/fastruby
|
145
145
|
licenses: []
|
146
|
-
|
147
146
|
post_install_message:
|
148
147
|
rdoc_options: []
|
149
|
-
|
150
|
-
require_paths:
|
148
|
+
require_paths:
|
151
149
|
- lib
|
152
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
150
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
153
151
|
none: false
|
154
|
-
requirements:
|
155
|
-
- -
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
|
158
|
-
|
159
|
-
- 0
|
160
|
-
version: "0"
|
161
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ! '>='
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
157
|
none: false
|
163
|
-
requirements:
|
164
|
-
- -
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
|
167
|
-
segments:
|
168
|
-
- 0
|
169
|
-
version: "0"
|
158
|
+
requirements:
|
159
|
+
- - ! '>='
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0'
|
170
162
|
requirements: []
|
171
|
-
|
172
163
|
rubyforge_project:
|
173
|
-
rubygems_version: 1.8.
|
164
|
+
rubygems_version: 1.8.10
|
174
165
|
signing_key:
|
175
166
|
specification_version: 3
|
176
167
|
summary: fast execution of ruby code
|
177
168
|
test_files: []
|
178
|
-
|
data/lib/fastruby/self
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
translator/modules/variable.rb 27| "rb_cvar_get(CLASS_OF(plocals->self) != rb_cClass ? CLASS_OF(plocals->self) : plocals->self,#{intern_num tree[1]})"
|
2
|
-
translator/modules/variable.rb 31| "__rb_cvar_set(CLASS_OF(plocals->self) != rb_cClass ? CLASS_OF(plocals->self) : plocals->self,#{intern_num tree[1]},#{to_c tree[2]},Qfalse)"
|
3
|
-
translator/modules/variable.rb 55| "rb_const_get(CLASS_OF(plocals->self), #{intern_num(tree[1])})"
|
4
|
-
translator/modules/variable.rb 170| "rb_ivar_defined(plocals->self,#{intern_num tree[1][1]}) ? #{literal_value "instance-variable"} : Qnil"
|
5
|
-
translator/modules/defn.rb 46| rb_define_method(plocals->self, #{method_name.to_s.inspect}, #{anonymous_method_name}, -1);
|
6
|
-
translator/modules/defn.rb 48| #{global_klass_variable} = plocals->self;
|
7
|
-
translator/modules/method_group.rb 115| plocals->parent_locals = LONG2FIX(frame.thread_data->last_plocals);
|
8
|
-
translator/modules/method_group.rb 120| plocals->active = Qtrue;
|
9
|
-
translator/modules/method_group.rb 121| plocals->self = self;
|
10
|
-
translator/modules/method_group.rb 122| plocals->targetted = Qfalse;
|
11
|
-
translator/modules/method_group.rb 123| plocals->call_frame = LONG2FIX(0);
|
12
|
-
translator/modules/method_group.rb 134| plocals->active = Qfalse;
|
13
|
-
translator/modules/iter.rb 107| str_arg_initialization << "plocals->#{args_tree[1]} = arg;"
|
14
|
-
translator/modules/iter.rb 111| plocals->#{args_tree[1]} = arg;
|
15
|
-
translator/modules/iter.rb 113| plocals->#{args_tree[1]} = rb_ary_entry(arg,0);
|
16
|
-
translator/modules/iter.rb 138| str_arg_initialization << "plocals->#{arguments[i].last} = rb_ary_entry(arg,#{i});\n"
|
17
|
-
translator/modules/iter.rb 140| str_arg_initialization << "plocals->#{arg.last.last} = rb_ary_new2(_RARRAY_LEN(arg)-#{i});\n
|
18
|
-
translator/modules/iter.rb 144| rb_ary_store(plocals->#{arg.last.last},i-#{i},rb_ary_entry(arg,i));
|
19
|
-
translator/modules/iter.rb 156| str_recv = "plocals->self" unless recv_tree
|
20
|
-
translator/modules/iter.rb 209| str_recv = "plocals->self" unless recv_tree
|
21
|
-
translator/modules/iter.rb 286| if (plocals->targetted == 1) {
|
22
|
-
translator/modules/iter.rb 341| if (plocals->targetted == 1) {
|
23
|
-
translator/modules/iter.rb 342| if (plocals->active == Qfalse) {
|
24
|
-
translator/modules/iter.rb 451| fastruby_str_arg_initialization = "plocals->#{args_tree[1]} = argv[0];"
|
25
|
-
translator/modules/iter.rb 458| fastruby_str_arg_initialization << "plocals->#{arg.last} = #{i} < argc ? argv[#{i}] : Qnil;\n"
|
26
|
-
translator/modules/iter.rb 460| fastruby_str_arg_initialization << "plocals->#{arg.last.last} = rb_ary_new2(#{arguments.size-1-i});\n
|
27
|
-
translator/modules/iter.rb 464| rb_ary_store(plocals->#{arg.last.last},i-#{i},argv[i]);
|
28
|
-
translator/modules/iter.rb 513| str_recv = "plocals->self"
|
29
|
-
translator/modules/iter.rb 537| VALUE old_call_frame = plocals->call_frame;
|
30
|
-
translator/modules/iter.rb 538| plocals->call_frame = LONG2FIX(&call_frame);
|
31
|
-
translator/modules/iter.rb 551| plocals->call_frame = old_call_frame;
|
32
|
-
translator/modules/iter.rb 561| pframe->next_recv = #{recv_tree ? to_c(recv_tree) : "plocals->self"};
|
33
|
-
translator/modules/iter.rb 646| current_plocals->active = Qfalse;
|
34
|
-
translator/modules/iter.rb 647| current_plocals = (typeof(current_plocals))FIX2LONG(current_plocals->parent_locals);
|
35
|
-
translator/modules/iter.rb 657| current_plocals->active = Qtrue;
|
36
|
-
translator/modules/iter.rb 658| current_plocals = (typeof(current_plocals))FIX2LONG(current_plocals->parent_locals);
|
37
|
-
translator/modules/iter.rb 684| plocals->call_frame = old_call_frame;
|
38
|
-
translator/modules/iter.rb 693| plocals->call_frame = old_call_frame;
|
39
|
-
translator/modules/block.rb 36| if (FIX2LONG(plocals->block_function_address) == 0) {
|
40
|
-
translator/modules/block.rb 39| return ((VALUE(*)(int,VALUE*,VALUE,VALUE))FIX2LONG(plocals->block_function_address))(size, block_args, FIX2LONG(plocals->block_function_param), (VALUE)pframe);
|
41
|
-
translator/modules/nonlocal.rb 27| plocals->return_value = #{to_c(tree[1])};
|
42
|
-
translator/modules/nonlocal.rb 28| plocals->targetted = 1;
|
43
|
-
translator/modules/nonlocal.rb 41| target_frame_ = (void*)FIX2LONG(plocals->call_frame);
|
44
|
-
translator/modules/nonlocal.rb 47| plocals->call_frame = LONG2FIX(0);
|
45
|
-
translator/modules/nonlocal.rb 60| target_frame_ = (void*)FIX2LONG(plocals->call_frame);
|
46
|
-
translator/translator.rb 213| VALUE old_call_frame = plocals->call_frame;
|
47
|
-
translator/translator.rb 214| plocals->call_frame = LONG2FIX(&call_frame);
|
48
|
-
translator/translator.rb 226| plocals->call_frame = old_call_frame;
|
49
|
-
translator/translator.rb 232| plocals->call_frame = old_call_frame;
|
50
|
-
translator/translator.rb 243| plocals->call_frame = old_call_frame;
|
51
|
-
translator/translator.rb 398| plocals->parent_locals = LONG2FIX(frame.thread_data->last_plocals);
|
52
|
-
translator/translator.rb 402| plocals->active = Qtrue;
|
53
|
-
translator/translator.rb 403| plocals->targetted = Qfalse;
|
54
|
-
translator/translator.rb 404| plocals->pframe = LONG2FIX(&frame);
|
55
|
-
translator/translator.rb 420| plocals->active = Qfalse;
|
56
|
-
translator/translator.rb 422| return plocals->return_value;
|
57
|
-
translator/translator.rb 425| plocals->self = self;
|
58
|
-
translator/translator.rb 430| "plocals->#{arg} = #{arg};\n"
|
59
|
-
translator/translator.rb 433| plocals->block_function_address = LONG2FIX(0);
|
60
|
-
translator/translator.rb 434| plocals->block_function_param = LONG2FIX(Qnil);
|
61
|
-
translator/translator.rb 435| plocals->call_frame = LONG2FIX(0);
|
62
|
-
translator/translator.rb 445| plocals->active = Qfalse;
|
63
|
-
translator/translator.rb 525| "plocals->#{arg} = argv[#{i}];\n"
|
64
|
-
translator/translator.rb 547| plocals->#{splat_arg.to_s.gsub("*","")} = rb_ary_new3(0);
|
65
|
-
translator/translator.rb 551| plocals->#{splat_arg.to_s.gsub("*","")} = rb_ary_new4(
|
66
|
-
translator/translator.rb 570| plocals->#{block_argument.to_s.gsub("&","")} = #{to_c FastRuby::FastRubySexp.from_sexp(proc_reyield_block_tree)};
|
67
|
-
translator/translator.rb 616| plocals->parent_locals = LONG2FIX(frame.thread_data->last_plocals);
|
68
|
-
translator/translator.rb 621| plocals->active = Qtrue;
|
69
|
-
translator/translator.rb 622| plocals->targetted = Qfalse;
|
70
|
-
translator/translator.rb 623| plocals->pframe = LONG2FIX(&frame);
|
71
|
-
translator/translator.rb 624| plocals->call_frame = LONG2FIX(0);
|
72
|
-
translator/translator.rb 633| plocals->active = Qfalse;
|
73
|
-
translator/translator.rb 642| if (plocals->targetted == Qfalse || aux != FASTRUBY_TAG_RETURN) {
|
74
|
-
translator/translator.rb 650| return plocals->return_value;
|
75
|
-
translator/translator.rb 653| plocals->self = self;
|
76
|
-
translator/translator.rb 659| plocals->block_function_address = LONG2FIX(pblock->block_function_address);
|
77
|
-
translator/translator.rb 660| plocals->block_function_param = LONG2FIX(pblock->block_function_param);
|
78
|
-
translator/translator.rb 662| plocals->block_function_address = LONG2FIX(0);
|
79
|
-
translator/translator.rb 663| plocals->block_function_param = LONG2FIX(Qnil);
|
80
|
-
translator/translator.rb 674| plocals->active = Qfalse;
|
81
|
-
translator/translator.rb 693| "plocals->"
|
82
|
-
translator/translator.rb 759| return "FIX2LONG(plocals->block_function_address) == 0 ? Qfalse : Qtrue"
|