bitescript 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ad63e1d004fe3792137024fbc18d196a48c45f8e
4
+ data.tar.gz: af79bb169bfbe125c33727c362072393bdedf2bc
5
+ SHA512:
6
+ metadata.gz: 07462b79ea3a862d4e26dbd62c9641278eb79dfa402564070b16ec26ad12924d182468ece5ee07a0f3b433b3230692fdcf62ed28810e137ad787a4cd38fd6952
7
+ data.tar.gz: 008fb13d91299931c3d334088509ce32670db84e3716a3386572356406e3de9145a482e0a040d90ab1bfffb745a8847fd09d52f811f6895792e72253e16069ed
@@ -1,3 +1,7 @@
1
+ === 0.1.3 / 2013-08-95
2
+
3
+ fc71fe7 make extended types persistent to avoid warning
4
+
1
5
  === 0.1.2 / 2013-02-24
2
6
 
3
7
  3ff2e52 ensure that frame setting is updated when bytecode version is
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{bitescript}
5
- s.version = "0.1.2"
5
+ s.version = "0.1.3"
6
6
  s.authors = ["Charles Oliver Nutter", "Ryan Brown"]
7
7
  s.date = Time.now.strftime('%Y-%m-%d')
8
8
  s.description = %q{BiteScript is a Ruby DSL for generating Java bytecode and classes.}
@@ -3,6 +3,11 @@ require 'bitescript/signature'
3
3
  require 'fileutils'
4
4
 
5
5
  module BiteScript
6
+ java_import org.jruby.org.objectweb.asm.FieldWriter
7
+ java_import org.jruby.org.objectweb.asm.AnnotationWriter
8
+ FieldWriter.__persistent__ = true
9
+ AnnotationWriter.__persistent__ = true
10
+
6
11
  module Util
7
12
  def type_from_dotted(dotted_name)
8
13
  JavaUtilities.get_proxy_class(dotted_name).java_class
@@ -253,7 +253,28 @@ module BiteScript::ASM
253
253
  end
254
254
 
255
255
  def getField(name)
256
- @fields[name]
256
+ field = @fields[name]
257
+ field ||= begin
258
+ ifaces = interfaces.map do |i|
259
+ wrap_it i
260
+ end
261
+ ifaces.map{|i| i.getField(name) }.compact.first
262
+ end
263
+ field ||= begin
264
+ s = wrap_it superclass
265
+ f, s = [s.getField(name), wrap_it(s.superclass)] until f || s.nil?
266
+ f
267
+ end
268
+ field
269
+ end
270
+
271
+ def wrap_it i
272
+ return unless i
273
+ if i.respond_to?(:getField)
274
+ i
275
+ else
276
+ ClassMirror.for_name i.class_name
277
+ end
257
278
  end
258
279
 
259
280
  def getDeclaredFields
metadata CHANGED
@@ -1,103 +1,96 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bitescript
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.1.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
6
5
  platform: ruby
7
- authors:
8
- - Charles Oliver Nutter
9
- - Ryan Brown
6
+ authors:
7
+ - Charles Oliver Nutter
8
+ - Ryan Brown
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
-
14
- date: 2013-02-25 00:00:00 Z
12
+ date: 2013-08-05 00:00:00.000000000 Z
15
13
  dependencies: []
16
-
17
14
  description: BiteScript is a Ruby DSL for generating Java bytecode and classes.
18
- email:
19
- - headius@headius.com
20
- - ribrdb@gmail.com
21
- executables:
22
- - bite
23
- - bitec
15
+ email:
16
+ - headius@headius.com
17
+ - ribrdb@gmail.com
18
+ executables:
19
+ - bite
20
+ - bitec
24
21
  extensions: []
25
-
26
- extra_rdoc_files:
27
- - History.txt
28
- - LICENSE.txt
29
- - README.txt
30
- files:
31
- - bin/bite
32
- - bin/bitec
33
- - bin/bitep
34
- - examples/fib.bs
35
- - examples/hello_world.bs
36
- - examples/hello_world_macro.bs
37
- - examples/indy.bs
38
- - examples/instanceof.bs
39
- - examples/invokedynamic.bs
40
- - examples/mixed_bag.rb
41
- - examples/simple_loop.rb
42
- - examples/using_ruby.bs
43
- - lib/bitescript.rb
44
- - lib/bitescript/asm.rb
45
- - lib/bitescript/builder.rb
46
- - lib/bitescript/bytecode.rb
47
- - lib/bitescript/mirror.rb
48
- - lib/bitescript/signature.rb
49
- - lib/bitescript/asm3/asm.rb
50
- - lib/bitescript/asm3/builder.rb
51
- - lib/bitescript/asm3/bytecode.rb
52
- - lib/bitescript/asm3/mirror.rb
53
- - lib/bitescript/asm3/signature.rb
54
- - nbproject/project.properties
55
- - nbproject/project.xml
56
- - test/test_bitescript.rb
57
- - test/test_builder.rb
58
- - test/test_bytecode.rb
59
- - test/test_generics.rb
60
- - test/test_java_class.rb
61
- - test/test_mirror.rb
62
- - test/test_signature.rb
63
- - History.txt
64
- - LICENSE.txt
65
- - README.txt
66
- - bitescript.gemspec
67
- - Rakefile
22
+ extra_rdoc_files:
23
+ - History.txt
24
+ - LICENSE.txt
25
+ - README.txt
26
+ files:
27
+ - bin/bite
28
+ - bin/bitec
29
+ - bin/bitep
30
+ - examples/fib.bs
31
+ - examples/hello_world.bs
32
+ - examples/hello_world_macro.bs
33
+ - examples/indy.bs
34
+ - examples/instanceof.bs
35
+ - examples/invokedynamic.bs
36
+ - examples/mixed_bag.rb
37
+ - examples/simple_loop.rb
38
+ - examples/using_ruby.bs
39
+ - lib/bitescript/asm.rb
40
+ - lib/bitescript/asm3/asm.rb
41
+ - lib/bitescript/asm3/builder.rb
42
+ - lib/bitescript/asm3/bytecode.rb
43
+ - lib/bitescript/asm3/mirror.rb
44
+ - lib/bitescript/asm3/signature.rb
45
+ - lib/bitescript/builder.rb
46
+ - lib/bitescript/bytecode.rb
47
+ - lib/bitescript/mirror.rb
48
+ - lib/bitescript/signature.rb
49
+ - lib/bitescript.rb
50
+ - nbproject/project.properties
51
+ - nbproject/project.xml
52
+ - test/test_bitescript.rb
53
+ - test/test_builder.rb
54
+ - test/test_bytecode.rb
55
+ - test/test_generics.rb
56
+ - test/test_java_class.rb
57
+ - test/test_mirror.rb
58
+ - test/test_signature.rb
59
+ - History.txt
60
+ - LICENSE.txt
61
+ - README.txt
62
+ - bitescript.gemspec
63
+ - Rakefile
68
64
  homepage: http://github.com/headius/bitescript
69
65
  licenses: []
70
-
66
+ metadata: {}
71
67
  post_install_message:
72
- rdoc_options:
73
- - --main
74
- - README.txt
75
- require_paths:
76
- - lib
77
- required_ruby_version: !ruby/object:Gem::Requirement
78
- none: false
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: "0"
83
- required_rubygems_version: !ruby/object:Gem::Requirement
84
- none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: "0"
68
+ rdoc_options:
69
+ - --main
70
+ - README.txt
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
89
83
  requirements: []
90
-
91
84
  rubyforge_project: jruby-extras
92
- rubygems_version: 1.8.24
85
+ rubygems_version: 2.0.3
93
86
  signing_key:
94
- specification_version: 3
87
+ specification_version: 4
95
88
  summary: BiteScript is a Ruby DSL for generating Java bytecode.
96
- test_files:
97
- - test/test_bitescript.rb
98
- - test/test_builder.rb
99
- - test/test_bytecode.rb
100
- - test/test_generics.rb
101
- - test/test_java_class.rb
102
- - test/test_mirror.rb
103
- - test/test_signature.rb
89
+ test_files:
90
+ - test/test_bitescript.rb
91
+ - test/test_builder.rb
92
+ - test/test_bytecode.rb
93
+ - test/test_generics.rb
94
+ - test/test_java_class.rb
95
+ - test/test_mirror.rb
96
+ - test/test_signature.rb