#634 √ resolved
Brian Ford

Unable to compile language/def_spec.rb

Reported by Brian Ford | July 11th, 2008 @ 12:18 PM | in 0.10

The rubyspec HEAD has some code that rubinius cannot compile.

$ bin/mspec ci spec/ruby/1.8/language/def_spec.rb 
rubinius 0.9.0 (ruby 1.8.6 compatible) (04683a0f7) (07/11/2008) [i686-apple-darwin9.3.0]
Bytecode generation error: 
   No method 'bytecode' on an instance of NilClass. (NoMethodError)
   near ./spec/ruby/1.8/language/def_spec.rb:427

    Kernel(NilClass)#bytecode (method_missing_cv) at kernel/core/kernel.rb:652
       Compiler::Node::Arguments#bytecode {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:2147
                                  Array#each at kernel/core/array.rb:572
          Compiler::Node::Arguments#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:2140
      Compiler::Node::Define#compile_body {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:2199
                                   Proc#call at kernel/core/proc.rb:76
                        Compiler#show_errors at ./spec/compiler/../../lib/compiler/compiler.rb:252
    Compiler::Node(Compiler::Node::Define)#show_errors at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:49
      Compiler::Node::Define#compile_body {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:2198
                                   Proc#call at kernel/core/proc.rb:76
                                Compiler#set at ./spec/compiler/../../lib/compiler/compiler.rb:230
    Compiler::Node(Compiler::Node::Define)#set at /Users/brian/devel/rubinius/lib/compiler/nodes.rb:149
         Compiler::Node::Define#compile_body at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:2197
             Compiler::Node::Define#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:2227
            Compiler::Node::Newline#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:177
              Compiler::Node::Block#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:489
            Compiler::Node::Iter#bytecode {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:657
                                   Proc#call at kernel/core/proc.rb:76
                        Compiler#show_errors at ./spec/compiler/../../lib/compiler/compiler.rb:244
    Compiler::Node(Compiler::Node::Iter)#show_errors at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:49
               Compiler::Node::Iter#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:645
    Compiler::Node::Call(Compiler::Node::FCall)#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:1934
            Compiler::Node::Newline#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:177
              Compiler::Node::Block#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:495
          Compiler::Node::Script#bytecode {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:166
                                   Proc#call at kernel/core/proc.rb:76
                                Compiler#set at ./spec/compiler/../../lib/compiler/compiler.rb:230
    Compiler::Node(Compiler::Node::Script)#set at /Users/brian/devel/rubinius/lib/compiler/nodes.rb:149
             Compiler::Node::Script#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:164
                     Compiler::Generator#run at /Users/brian/devel/rubinius/lib/compiler/generator.rb:76
             Compiler::MethodDescription#run at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:24
    Compiler::Node::ClosedScope(Compiler::Node::Script)#to_description {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:64
                                   Proc#call at kernel/core/proc.rb:76
                        Compiler#show_errors at ./spec/compiler/../../lib/compiler/compiler.rb:244
    Compiler::Node(Compiler::Node::Script)#show_errors at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:49
    Compiler::Node::ClosedScope(Compiler::Node::Script)#to_description at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:63
                       Compiler.compile_file at ./spec/compiler/../../lib/compiler/compiler.rb:22
                        Compile.compile_file at kernel/core/compile.rb:66
                      Compile.single_load {} at kernel/core/compile.rb:212
                     Compile.compile_feature at kernel/core/compile.rb:171
                         Compile.single_load at kernel/core/compile.rb:211
                     Compile.unified_load {} at kernel/core/compile.rb:160
                                  Array#each at kernel/core/array.rb:572
                        Compile.unified_load at kernel/core/compile.rb:127
                                 Kernel.load at kernel/core/compile.rb:408
                    #<Object:0x131>.files {} at /Users/brian/devel/rubinius/mspec/lib/mspec/runner/mspec.rb:51
                Kernel(Object)#instance_eval at kernel/core/eval.rb:103
                               MSpec.protect at /Users/brian/devel/rubinius/mspec/lib/mspec/runner/mspec.rb:63
                              MSpec.files {} at /Users/brian/devel/rubinius/mspec/lib/mspec/runner/mspec.rb:51
                                  Array#each at kernel/core/array.rb:572
                                 MSpec.files at /Users/brian/devel/rubinius/mspec/lib/mspec/runner/mspec.rb:45
                               MSpec.process at /Users/brian/devel/rubinius/mspec/lib/mspec/runner/mspec.rb:37
                                 MSpecCI#run at /Users/brian/devel/rubinius/mspec/lib/mspec/commands/mspec-ci.rb:67
                                MSpecCI.main at /Users/brian/devel/rubinius/mspec/lib/mspec/utils/script.rb:86
                           Object#__script__ at /Users/brian/devel/rubinius/mspec/bin/mspec-ci:8
                    CompiledMethod#as_script at kernel/core/compiled_method.rb:407
                         Compile.single_load at kernel/core/compile.rb:248
                 Compile.load_from_extension at kernel/core/compile.rb:326
                           Object#__script__ at kernel/loader.rb:221


1)
An exception occurred during: loading spec/ruby/1.8/language/def_spec.rb ERROR
Compiler::GenerationError: unable to generate bytecode
                        Compiler#show_errors at ./spec/compiler/../../lib/compiler/compiler.rb:254
    Compiler::Node(Compiler::Node::Define)#show_errors at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:49
      Compiler::Node::Define#compile_body {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:2198
                                   Proc#call at kernel/core/proc.rb:76
                                Compiler#set at ./spec/compiler/../../lib/compiler/compiler.rb:232
    Compiler::Node(Compiler::Node::Define)#set at /Users/brian/devel/rubinius/lib/compiler/nodes.rb:149
         Compiler::Node::Define#compile_body at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:2197
             Compiler::Node::Define#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:2227
            Compiler::Node::Newline#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:177
              Compiler::Node::Block#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:489
            Compiler::Node::Iter#bytecode {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:657
                                   Proc#call at kernel/core/proc.rb:76
                        Compiler#show_errors at ./spec/compiler/../../lib/compiler/compiler.rb:246
    Compiler::Node(Compiler::Node::Iter)#show_errors at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:49
               Compiler::Node::Iter#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:645
    Compiler::Node::Call(Compiler::Node::FCall)#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:1934
            Compiler::Node::Newline#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:177
              Compiler::Node::Block#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:495
          Compiler::Node::Script#bytecode {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:166
                                   Proc#call at kernel/core/proc.rb:76
                                Compiler#set at ./spec/compiler/../../lib/compiler/compiler.rb:232
    Compiler::Node(Compiler::Node::Script)#set at /Users/brian/devel/rubinius/lib/compiler/nodes.rb:149
             Compiler::Node::Script#bytecode at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:164
                     Compiler::Generator#run at /Users/brian/devel/rubinius/lib/compiler/generator.rb:76
             Compiler::MethodDescription#run at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:24
    Compiler::Node::ClosedScope(Compiler::Node::Script)#to_description {} at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:64
                                   Proc#call at kernel/core/proc.rb:76
                        Compiler#show_errors at ./spec/compiler/../../lib/compiler/compiler.rb:246
    Compiler::Node(Compiler::Node::Script)#show_errors at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:49
    Compiler::Node::ClosedScope(Compiler::Node::Script)#to_description at /Users/brian/devel/rubinius/lib/compiler/bytecode.rb:63
                       Compiler.compile_file at ./spec/compiler/../../lib/compiler/compiler.rb:22
                        Compile.compile_file at kernel/core/compile.rb:66
                      Compile.single_load {} at kernel/core/compile.rb:212
                     Compile.compile_feature at kernel/core/compile.rb:174
                         Compile.single_load at kernel/core/compile.rb:211
                     Compile.unified_load {} at kernel/core/compile.rb:160
                                  Array#each at kernel/core/array.rb:572
                        Compile.unified_load at kernel/core/compile.rb:127
                                 Kernel.load at kernel/core/compile.rb:408
                Kernel(Object)#instance_eval at kernel/core/eval.rb:103
                                  Array#each at kernel/core/array.rb:572
                    CompiledMethod#as_script at kernel/core/compiled_method.rb:407
                         Compile.single_load at kernel/core/compile.rb:248
                 Compile.load_from_extension at kernel/core/compile.rb:326
                           Object#__script__ at kernel/loader.rb:221

Finished in 0.150853 seconds

1 file, 0 examples, 0 expectations, 0 failures, 1 error

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Tags