ytl 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/ytl.rb +6 -1
  2. data/test/looptest.rb +0 -12
  3. metadata +5 -5
data/lib/ytl.rb CHANGED
@@ -68,9 +68,14 @@ module YTL
68
68
  rf = File.read(fn)
69
69
  prog = eval(rf)
70
70
  progs.push prog
71
+ is = RubyVM::InstructionSequence.compile(prog, ARGV[0],
72
+ "", 0, ISEQ_OPTS).to_a
73
+ iseq = VMLib::InstSeqTree.new(nil, is)
74
+ tr = VM::YARVTranslatorCRubyObject.new([iseq])
75
+ tr.translate(tr_context)
71
76
  end
72
77
 
73
- prog = progs.join("\n") + File.read(ARGV[0])
78
+ prog = File.read(ARGV[0])
74
79
  is = RubyVM::InstructionSequence.compile(prog, ARGV[0],
75
80
  "", 0, ISEQ_OPTS).to_a
76
81
  iseq = VMLib::InstSeqTree.new(nil, is)
@@ -1,15 +1,3 @@
1
- class Fixnum
2
- def times
3
- i = 0
4
- while i < self
5
- yield i
6
- i = i + 1
7
- end
8
-
9
- self
10
- end
11
- end
12
-
13
1
  10.times do |i|
14
2
  i.times do |j|
15
3
  p i
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 0
9
- version: 0.0.0
8
+ - 1
9
+ version: 0.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Hideki Miura
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-10 00:00:00 +09:00
17
+ date: 2010-12-17 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -28,8 +28,8 @@ dependencies:
28
28
  segments:
29
29
  - 0
30
30
  - 0
31
- - 4
32
- version: 0.0.4
31
+ - 5
32
+ version: 0.0.5
33
33
  type: :runtime
34
34
  version_requirements: *id001
35
35
  description: