Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 054235f14e25
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 52a1832eae60
Choose a head ref

Commits on Dec 12, 2017

  1. Bytelist more through IR

    enebo committed Dec 12, 2017
    Copy the full SHA
    c215a7a View commit details
  2. Copy the full SHA
    b0260a3 View commit details
  3. More getName removal

    enebo committed Dec 12, 2017
    Copy the full SHA
    a6fac6a View commit details

Commits on Dec 13, 2017

  1. Revert "More getName removal"

    This reverts commit a6fac6a.
    enebo committed Dec 13, 2017
    Copy the full SHA
    07224e1 View commit details
  2. Copy the full SHA
    59e8a6a View commit details
  3. Amazingly almost everything still passes (spec:ruby:fast totally does).

    This start changing all defined methods to use the raw (8859_1) string as the
    key in the method table.  Symbol StringLiteral both now properly use proper
    ByteList and does not muck with String.
    enebo committed Dec 13, 2017
    Copy the full SHA
    58557e8 View commit details

Commits on Dec 14, 2017

  1. Copy the full SHA
    63193b5 View commit details
  2. Unbreak AOT/persistence

    enebo committed Dec 14, 2017
    Copy the full SHA
    80f1f6e View commit details
  3. Simple regression in recent changes. Some trace instr will have a nul…

    …l name.
    
    Guard against it since it is a normal value.
    enebo committed Dec 14, 2017
    Copy the full SHA
    f39a9eb View commit details
  4. Copy the full SHA
    6d1577b View commit details
  5. Trying this. Seemingly now all symbol(String) in RubySymbol will be 8…

    …859_1 or
    
    a raw string.  So I made toString() decode to actual charset based on encoding.
    This may need another field if we discover toString() on RubySymbol is called
    all the time but let's roll with this made on-demand for now.
    enebo committed Dec 14, 2017
    Copy the full SHA
    4a07463 View commit details
  6. Copy the full SHA
    b071728 View commit details

Commits on Dec 19, 2017

  1. Copy the full SHA
    cf354ec View commit details
  2. Copy the full SHA
    7b3576e View commit details
  3. Copy the full SHA
    53d3517 View commit details

Commits on Jan 11, 2018

  1. Copy the full SHA
    f8e7e74 View commit details
  2. Copy the full SHA
    c920b1f View commit details
  3. Copy the full SHA
    6e25884 View commit details
  4. Make common place for common bytelists.

    Make and/or use isOr/isAnd and leverage AST being able to tell us this vs
      manually figuring it out.
    enebo committed Jan 11, 2018
    Copy the full SHA
    3ed229d View commit details
  5. argument parameters use bytelist now (mostly). This allows stuff like:

    ```text
    jruby -e 'p method(def foo(あ); end).parameters'
    [[:req, :あ]]
    ```
    
    to work.  Up til now this would confuse our impl and we may see an error like:
    
    ```text
    ArgumentError: invalid byte sequence in US-ASCII
      inspect at org/jruby/RubySymbol.java:283
      inspect at org/jruby/RubySymbol.java:268
      inspect at org/jruby/RubyArray.java:1659
      inspect at org/jruby/RubyArray.java:1659
            p at org/jruby/RubyKernel.java:492
       <main> at -e:1
    ```
    
    Pure ruby code should not properly be giving properly encoded values back. Java
    (e.g. native) methods mostly should not matter since they do not return names
    but if they do return names then they are all assumed to be UTF-8 encoded data.
    enebo committed Jan 11, 2018
    Copy the full SHA
    83d0c96 View commit details
  6. Copy the full SHA
    1ca3a82 View commit details
  7. Unbreak spec:compiler from merge with master. It was calling the raw …

    …field
    
    name but name changed from a String to a ByteList which make new frame read
    write code find nothing.
    enebo committed Jan 11, 2018
    Copy the full SHA
    0f96a52 View commit details
  8. Use raw strings so JIT at least finds the method. This uncovers a wri…

    …nkle in
    
    our strategy.  Errors are generated from the search deep in Module but it is a
    raw String.  This is somewhat ok for most strings because they just happen to be
    utf-8 so the display.  This is a big issue though since we want proper error
    message....
    enebo committed Jan 11, 2018
    Copy the full SHA
    fae1a96 View commit details

Commits on Jan 12, 2018

  1. Copy the full SHA
    ebb0f60 View commit details
  2. Made method storage backed by ByteList instead of String. I knew this…

    … day
    
    would come but I was hoping I could cheat with 8859_1 strings enough to merge
    for 9.2.  Unfortunately, lack of encoding through method methods means we cannot
    accurately throw properly encoded error messages since he have long lost the
    encoding of the method.
    
    So with that said, most people will not be able to notice this change.  All the
    String methods for methods still exist.  These methods will assume all data is
    UTF-8.  This could be a dicey gamble but since it is the default for Ruby it
    likely will not impact anyone.  Also since UTF-8 is 7bit clean for ASCII we
    should totally not have an issue there.
    
    Some API signatures have changed.  This means 9.2 might end up causing some
    issues if you are doing something very low-level with our code base (although
    changes up to this point have already broken some APIs within parsing and IR
    and that is unavoidable).  The method reader/writer maps needed their return
    type changed from <String, DynamicMethod> to <ByteList, DynamicMethod>.  It
    was an option to make a new name for methods which returned this but this is
    so far down in our APIs I think we should run with it.  Also ProfiledMethod
    has changed from String to ByteList (e.g. getName() -> ByteList from String).
    Ultimately ProfiledMethod needs to be properly encoded to be able to report
    the method in a properly encoded way...so there you have it.
    
    Next phase is to change interpreters and the JIT to stop from going:
    ByteList -> String -> ByteList.  I did not do that part here since this is
    pretty large already.
    enebo committed Jan 12, 2018
    Copy the full SHA
    7004a17 View commit details

Commits on Jan 17, 2018

  1. Copy the full SHA
    49b9caa View commit details

Commits on Jan 22, 2018

  1. Copy the full SHA
    914742c View commit details
  2. Symbols strings should be raw

    enebo committed Jan 22, 2018
    Copy the full SHA
    ffb23fc View commit details
  3. Copy the full SHA
    eaf9b95 View commit details

Commits on Jan 23, 2018

  1. Copy the full SHA
    9fe13cc View commit details

Commits on Jan 24, 2018

  1. Add more backtrace support properly printing out method name. This co…

    …mmit is
    
    a little off in that it assumes the String returned from the properly encoded
    symbol will be the same encoding as the String returned.  Generally this will
    be UTF-8 so it will almost always work.  Not perfect but better.
    enebo committed Jan 24, 2018
    Copy the full SHA
    b7ee8ea View commit details
  2. Copy the full SHA
    fea43fb View commit details
  3. local_variables needs to acquire properly encoded bytes to check thei…

    …r first
    
    and last character to see if it is a local variable.
    
    In truth, this is pretty weird code.  IdUtils only works with String and without
    doubling the code for ByteList there is a weakness since non Java Charset
    strings will not work here.  IdUtils itself is also pretty weird since we really
    just want variables which are not special and this method checks for all sorts
    of things we know these strings can never be.  (FIXME: added)
    enebo committed Jan 24, 2018
    Copy the full SHA
    cee507c View commit details

Commits on Jan 29, 2018

  1. Copy the full SHA
    308d4a2 View commit details
  2. Was I high? Mangled backtraces which broke our insanely slow and fragile

    require_relative implementation.
    enebo committed Jan 29, 2018
    Copy the full SHA
    e3478c8 View commit details

Commits on Feb 6, 2018

  1. Way too far down the hole but not back to fully green. Need to get th…

    …is saved
    
    somewhere!
    
    As systemic insulating design choice all identifiers are forced to construct
    an eager RubySymbol as constructor argument to the AST (note: parsing and IR
    APIs definitely are not backwards compat with 9.1).  This should future-
    proof things.  By forcing the AST to use symbols it means we cannot make idents
    which are not eager in making a symbol table entry.  This in turn means later
    on when we work with the raw string equivalent of these idents....we know there
    will be a symbol table entry.  As an aside MRI is eager on all idents/symbols
    so we are being a little more like them (which is not semantically important
    but who knows?).
    
    Constants, ivars, gvar, cvars all made to use raw strings.  This still has some
    fallout to deal with. For example const_get? will use the string and assume it
    can charAt but it cannot since it is now a raw string.  In cases like this
    we need to ask for properly encoded bytelist and perform same logic but in a
    mbc friendly way. This will likely be the next commit(s).
    
    Tons of error reporting corrections (with tons more needed).  Now that all
    identifiers are raw strings they look weird when they contain mbcs.  So I added
    a buildString which makes a RubyString which will do proper m17n stuff to make
    a byte coherent string.  I did many of these when I see them fail in the test
    suite but the pure lack of coverage in this regard is staggering.  My hope to
    limit an endless stream of reports is to lean on all errors which refer to
    idents using the same helper method as a visual cue that it will be properly
    handled.  Both this and the symbols in AST constructors are meant to help us
    at a glance not make an error or know why we have an error at a glance.
    
    All-in-all this last dump has had me work through many issues and I am still
    pretty happy.  Making older extensions continue to work has added a tough
    dimension but so far so good :)
    enebo committed Feb 6, 2018
    Copy the full SHA
    94d74e3 View commit details
  2. Copy the full SHA
    866def2 View commit details
  3. incidentally found error in ripper while looking for something else...

    $_foo would not ever parse....
    enebo committed Feb 6, 2018
    Copy the full SHA
    d1df87a View commit details

Commits on Feb 7, 2018

  1. Yeah these symbol IDs are identifiers and so should be hard similar t…

    …o how MRI
    
    works.  We do not want them going away since we may no longer have a reference
    in the AST nor IR (actually IR does not store symbols at all but even if it did
    I would like persistence to play a future role so we can save long uncalled or
    already JITd IR to save memory).
    enebo committed Feb 7, 2018
    Copy the full SHA
    1367812 View commit details

Commits on Feb 13, 2018

  1. Still a lot of missing changes for errors but more filled in.

    const_defined? totally changed and only broken now due to missing proper logic
    for printing out type names in error messages.  Outstanding is if the string
    contains something the encoding thinks is unprintable it will display the type
    in quotes and escape the unprintable character.  dumpString is nearly correct
    but it will not correctly pick up \u0000 for \0 but instead print out \x00.
    
    Landing for now since this is again a bigish delta and it advances things a bit
    more.
    enebo committed Feb 13, 2018
    Copy the full SHA
    790425c View commit details

Commits on Mar 1, 2018

  1. Copy the full SHA
    e5b3265 View commit details

Commits on Mar 2, 2018

  1. Copy the full SHA
    2b2c3a8 View commit details

Commits on Mar 6, 2018

  1. A lot of flux here in getting error reporting more correct:

    - new ids() method for an 'ID String'
    - Realization that any types reported in Ruby should call to_s ALWAYS if it
      has been defined.  We have a number of paths which will rely on name and
      baseName (rubyName and rubyBaseName).  I am still working through
      ramifications of this but toRubyString was added.  This site calls to_s
      and returns the string.  For types this will eventually either to_s on
      and overridden method OR it will fall back to calling rubyName (which will
      use a cached name it calculated once).  Not finished updating.
    
    Just making a cleaner slate for now.  There is only 2 errors left in test:mri
    but I think there is really poor coverage on m17n+error strings.
    enebo committed Mar 6, 2018
    Copy the full SHA
    cb48a21 View commit details
  2. Workaround NativeThread not being able to grab a TC yet. We really wa…

    …nt something here valid as a default name even if we explicitly add nil as explicit param to constructor.
    enebo committed Mar 6, 2018
    Copy the full SHA
    b2f7fbf View commit details
  3. Copy the full SHA
    5148f79 View commit details
  4. Copy the full SHA
    c94eeb8 View commit details
  5. Copy the full SHA
    35e3dcd View commit details

Commits on Mar 7, 2018

  1. Copy the full SHA
    7d8700b View commit details
  2. yay...we have all this jcodings data on alnum but Ruby ignores it. Id…

    …entifiers
    
    are ridiculously accepting of ALL non-ascii codepoints.
    enebo committed Mar 7, 2018
    Copy the full SHA
    6e76d1f View commit details

Commits on Mar 9, 2018

  1. Change buildString to str, add types() in additiona to ids() for prop…

    …er printing
    
    or types and non-types for error strings.
    enebo committed Mar 9, 2018
    Copy the full SHA
    b8bd2f1 View commit details
Showing with 2,647 additions and 2,383 deletions.
  1. +5 −2 core/src/main/java/org/jruby/BasicObjectStub.java
  2. +4 −4 core/src/main/java/org/jruby/IncludedModuleWrapper.java
  3. +3 −3 core/src/main/java/org/jruby/PrependedModule.java
  4. +48 −37 core/src/main/java/org/jruby/Ruby.java
  5. +4 −2 core/src/main/java/org/jruby/RubyArray.java
  6. +65 −45 core/src/main/java/org/jruby/RubyBasicObject.java
  7. +26 −26 core/src/main/java/org/jruby/RubyClass.java
  8. +10 −6 core/src/main/java/org/jruby/RubyComplex.java
  9. +2 −2 core/src/main/java/org/jruby/RubyConverter.java
  10. +7 −4 core/src/main/java/org/jruby/RubyIO.java
  11. +8 −6 core/src/main/java/org/jruby/RubyKernel.java
  12. +1 −1 core/src/main/java/org/jruby/RubyMatchData.java
  13. +270 −202 core/src/main/java/org/jruby/RubyModule.java
  14. +9 −7 core/src/main/java/org/jruby/RubyNumeric.java
  15. +12 −3 core/src/main/java/org/jruby/RubyObject.java
  16. +10 −7 core/src/main/java/org/jruby/RubyProc.java
  17. +4 −15 core/src/main/java/org/jruby/RubyRegexp.java
  18. +1 −2 core/src/main/java/org/jruby/RubyStruct.java
  19. +125 −3 core/src/main/java/org/jruby/RubySymbol.java
  20. +39 −29 core/src/main/java/org/jruby/RubyThread.java
  21. +7 −4 core/src/main/java/org/jruby/RubyTime.java
  22. +1 −1 core/src/main/java/org/jruby/anno/AnnotationBinder.java
  23. +2 −2 core/src/main/java/org/jruby/ast/ArgsNode.java
  24. +4 −26 core/src/main/java/org/jruby/ast/ArgumentNode.java
  25. +4 −15 core/src/main/java/org/jruby/ast/AttrAssignNode.java
  26. +5 −21 core/src/main/java/org/jruby/ast/BlockArgNode.java
  27. +4 −20 core/src/main/java/org/jruby/ast/CallNode.java
  28. +4 −14 core/src/main/java/org/jruby/ast/ClassVarAsgnNode.java
  29. +4 −14 core/src/main/java/org/jruby/ast/ClassVarDeclNode.java
  30. +4 −19 core/src/main/java/org/jruby/ast/ClassVarNode.java
  31. +2 −9 core/src/main/java/org/jruby/ast/Colon2ConstNode.java
  32. +2 −7 core/src/main/java/org/jruby/ast/Colon2ImplicitNode.java
  33. +2 −8 core/src/main/java/org/jruby/ast/Colon2Node.java
  34. +5 −19 core/src/main/java/org/jruby/ast/Colon3Node.java
  35. +5 −15 core/src/main/java/org/jruby/ast/ConstDeclNode.java
  36. +4 −19 core/src/main/java/org/jruby/ast/ConstNode.java
  37. +4 −19 core/src/main/java/org/jruby/ast/DAsgnNode.java
  38. +4 −23 core/src/main/java/org/jruby/ast/DVarNode.java
  39. +2 −9 core/src/main/java/org/jruby/ast/DefnNode.java
  40. +2 −13 core/src/main/java/org/jruby/ast/DefsNode.java
  41. +5 −20 core/src/main/java/org/jruby/ast/FCallNode.java
  42. +1 −16 core/src/main/java/org/jruby/ast/FalseNode.java
  43. +4 −14 core/src/main/java/org/jruby/ast/GlobalAsgnNode.java
  44. +4 −14 core/src/main/java/org/jruby/ast/GlobalVarNode.java
  45. +4 −19 core/src/main/java/org/jruby/ast/InstAsgnNode.java
  46. +4 −19 core/src/main/java/org/jruby/ast/InstVarNode.java
  47. +2 −7 core/src/main/java/org/jruby/ast/KeywordRestArgNode.java
  48. +13 −8 core/src/main/java/org/jruby/ast/LiteralNode.java
  49. +4 −23 core/src/main/java/org/jruby/ast/LocalAsgnNode.java
  50. +4 −23 core/src/main/java/org/jruby/ast/LocalVarNode.java
  51. +7 −14 core/src/main/java/org/jruby/ast/MethodDefNode.java
  52. +1 −15 core/src/main/java/org/jruby/ast/NilNode.java
  53. +19 −7 core/src/main/java/org/jruby/ast/OpAsgnConstDeclNode.java
  54. +43 −14 core/src/main/java/org/jruby/ast/OpAsgnNode.java
  55. +15 −10 core/src/main/java/org/jruby/ast/OpElementAsgnNode.java
  56. +4 −8 core/src/main/java/org/jruby/ast/OptArgNode.java
  57. +8 −1 core/src/main/java/org/jruby/ast/RestArgNode.java
  58. +1 −16 core/src/main/java/org/jruby/ast/SelfNode.java
  59. +5 −23 core/src/main/java/org/jruby/ast/SymbolNode.java
  60. +1 −16 core/src/main/java/org/jruby/ast/TrueNode.java
  61. +1 −0 core/src/main/java/org/jruby/ast/UndefNode.java
  62. +3 −7 core/src/main/java/org/jruby/ast/UnnamedRestArgNode.java
  63. +9 −13 core/src/main/java/org/jruby/ast/VAliasNode.java
  64. +4 −14 core/src/main/java/org/jruby/ast/VCallNode.java
  65. +5 −1 core/src/main/java/org/jruby/ast/executable/RuntimeCache.java
  66. +2 −3 core/src/main/java/org/jruby/ast/types/INameNode.java
  67. +1 −1 core/src/main/java/org/jruby/ast/util/SexpMaker.java
  68. +5 −3 core/src/main/java/org/jruby/ast/visitor/InstanceVariableFinder.java
  69. +1 −1 core/src/main/java/org/jruby/exceptions/RaiseException.java
  70. +1 −1 core/src/main/java/org/jruby/ext/io/wait/IOWaitLibrary.java
  71. +2 −2 core/src/main/java/org/jruby/ext/jruby/JRubyLibrary.java
  72. +1 −1 core/src/main/java/org/jruby/ext/ripper/RipperLexer.java
  73. +1 −1 core/src/main/java/org/jruby/ext/ripper/RipperParserBase.java
  74. +4 −4 core/src/main/java/org/jruby/internal/runtime/AbstractIRMethod.java
  75. +8 −13 core/src/main/java/org/jruby/internal/runtime/NativeThread.java
  76. +7 −2 core/src/main/java/org/jruby/internal/runtime/methods/AliasMethod.java
  77. +2 −2 core/src/main/java/org/jruby/internal/runtime/methods/InterpretedIRBodyMethod.java
  78. +3 −3 core/src/main/java/org/jruby/internal/runtime/methods/InterpretedIRMethod.java
  79. +2 −1 core/src/main/java/org/jruby/internal/runtime/methods/InvocationMethodFactory.java
  80. +2 −2 core/src/main/java/org/jruby/internal/runtime/methods/MixedModeIRMethod.java
  81. +1 −1 core/src/main/java/org/jruby/ir/Compiler.java
  82. +127 −121 core/src/main/java/org/jruby/ir/IRBuilder.java
  83. +3 −1 core/src/main/java/org/jruby/ir/IRClassBody.java
  84. +37 −21 core/src/main/java/org/jruby/ir/IRClosure.java
  85. +9 −4 core/src/main/java/org/jruby/ir/IREvalScript.java
  86. +15 −6 core/src/main/java/org/jruby/ir/IRFor.java
  87. +17 −4 core/src/main/java/org/jruby/ir/IRManager.java
  88. +2 −1 core/src/main/java/org/jruby/ir/IRMetaClassBody.java
  89. +4 −3 core/src/main/java/org/jruby/ir/IRMethod.java
  90. +2 −1 core/src/main/java/org/jruby/ir/IRModuleBody.java
  91. +36 −19 core/src/main/java/org/jruby/ir/IRScope.java
  92. +6 −4 core/src/main/java/org/jruby/ir/IRScriptBody.java
  93. +3 −3 core/src/main/java/org/jruby/ir/dataflow/analyses/UnboxableOpsAnalysisNode.java
  94. +1 −0 core/src/main/java/org/jruby/ir/dataflow/analyses/UnboxableOpsAnalysisProblem.java
  95. +10 −7 core/src/main/java/org/jruby/ir/instructions/ArrayDerefInstr.java
  96. +4 −6 core/src/main/java/org/jruby/ir/instructions/AttrAssignInstr.java
  97. +5 −4 core/src/main/java/org/jruby/ir/instructions/BreakInstr.java
  98. +23 −23 core/src/main/java/org/jruby/ir/instructions/CallBase.java
  99. +9 −9 core/src/main/java/org/jruby/ir/instructions/CallInstr.java
  100. +6 −5 core/src/main/java/org/jruby/ir/instructions/ClassSuperInstr.java
  101. +9 −6 core/src/main/java/org/jruby/ir/instructions/ConstMissingInstr.java
  102. +1 −1 core/src/main/java/org/jruby/ir/instructions/DefineClassInstr.java
  103. +1 −1 core/src/main/java/org/jruby/ir/instructions/DefineClassMethodInstr.java
  104. +1 −1 core/src/main/java/org/jruby/ir/instructions/DefineInstanceMethodInstr.java
  105. +1 −1 core/src/main/java/org/jruby/ir/instructions/DefineMetaClassInstr.java
  106. +1 −1 core/src/main/java/org/jruby/ir/instructions/DefineModuleInstr.java
  107. +6 −6 core/src/main/java/org/jruby/ir/instructions/GetClassVariableInstr.java
  108. +13 −7 core/src/main/java/org/jruby/ir/instructions/GetFieldInstr.java
  109. +3 −2 core/src/main/java/org/jruby/ir/instructions/GetGlobalVariableInstr.java
  110. +12 −7 core/src/main/java/org/jruby/ir/instructions/GetInstr.java
  111. +15 −14 core/src/main/java/org/jruby/ir/instructions/InheritanceSearchConstInstr.java
  112. +1 −1 core/src/main/java/org/jruby/ir/instructions/InlinedLineNumberInstr.java
  113. +6 −5 core/src/main/java/org/jruby/ir/instructions/InstanceSuperInstr.java
  114. +17 −11 core/src/main/java/org/jruby/ir/instructions/LexicalSearchConstInstr.java
  115. +1 −1 core/src/main/java/org/jruby/ir/instructions/LoadLocalVarInstr.java
  116. +7 −4 core/src/main/java/org/jruby/ir/instructions/MatchInstr.java
  117. +6 −5 core/src/main/java/org/jruby/ir/instructions/NoResultCallInstr.java
  118. +4 −3 core/src/main/java/org/jruby/ir/instructions/NonlocalReturnInstr.java
  119. +5 −4 core/src/main/java/org/jruby/ir/instructions/PushBlockFrameInstr.java
  120. +6 −4 core/src/main/java/org/jruby/ir/instructions/PushMethodFrameInstr.java
  121. +6 −5 core/src/main/java/org/jruby/ir/instructions/PutClassVariableInstr.java
  122. +6 −5 core/src/main/java/org/jruby/ir/instructions/PutConstInstr.java
  123. +5 −4 core/src/main/java/org/jruby/ir/instructions/PutFieldInstr.java
  124. +4 −3 core/src/main/java/org/jruby/ir/instructions/PutGlobalVarInstr.java
  125. +12 −7 core/src/main/java/org/jruby/ir/instructions/PutInstr.java
  126. +10 −5 core/src/main/java/org/jruby/ir/instructions/RaiseRequiredKeywordArgumentError.java
  127. +17 −8 core/src/main/java/org/jruby/ir/instructions/ReceiveKeywordArgInstr.java
  128. +20 −14 core/src/main/java/org/jruby/ir/instructions/SearchConstInstr.java
  129. +20 −14 core/src/main/java/org/jruby/ir/instructions/SearchModuleForConstInstr.java
  130. +16 −10 core/src/main/java/org/jruby/ir/instructions/SetCapturedVarInstr.java
  131. +1 −1 core/src/main/java/org/jruby/ir/instructions/StoreLocalVarInstr.java
  132. +5 −4 core/src/main/java/org/jruby/ir/instructions/TraceInstr.java
  133. +9 −7 core/src/main/java/org/jruby/ir/instructions/UnresolvedSuperInstr.java
  134. +4 −4 core/src/main/java/org/jruby/ir/instructions/ZSuperInstr.java
  135. +2 −1 core/src/main/java/org/jruby/ir/instructions/specialized/OneArgOperandAttrAssignInstr.java
  136. +2 −1 core/src/main/java/org/jruby/ir/instructions/specialized/OneFixnumArgNoBlockCallInstr.java
  137. +2 −1 core/src/main/java/org/jruby/ir/instructions/specialized/OneFloatArgNoBlockCallInstr.java
  138. +2 −1 core/src/main/java/org/jruby/ir/instructions/specialized/OneOperandArgBlockCallInstr.java
  139. +3 −2 core/src/main/java/org/jruby/ir/instructions/specialized/OneOperandArgNoBlockCallInstr.java
  140. +2 −1 core/src/main/java/org/jruby/ir/instructions/specialized/OneOperandArgNoBlockNoResultCallInstr.java
  141. +3 −2 core/src/main/java/org/jruby/ir/instructions/specialized/TwoOperandArgNoBlockCallInstr.java
  142. +2 −2 core/src/main/java/org/jruby/ir/instructions/specialized/ZeroOperandArgNoBlockCallInstr.java
  143. +1 −1 core/src/main/java/org/jruby/ir/interpreter/FullInterpreterContext.java
  144. +1 −1 core/src/main/java/org/jruby/ir/interpreter/Interpreter.java
  145. +2 −2 core/src/main/java/org/jruby/ir/interpreter/InterpreterContext.java
  146. +1 −1 core/src/main/java/org/jruby/ir/interpreter/Profiler.java
  147. +5 −4 core/src/main/java/org/jruby/ir/interpreter/StartupInterpreterEngine.java
  148. +2 −2 core/src/main/java/org/jruby/ir/operands/ClosureLocalVariable.java
  149. +5 −0 core/src/main/java/org/jruby/ir/operands/FrozenString.java
  150. +4 −3 core/src/main/java/org/jruby/ir/operands/GlobalVariable.java
  151. +10 −5 core/src/main/java/org/jruby/ir/operands/LocalVariable.java
  152. +4 −3 core/src/main/java/org/jruby/ir/operands/NthRef.java
  153. +9 −4 core/src/main/java/org/jruby/ir/operands/Reference.java
  154. +1 −2 core/src/main/java/org/jruby/ir/operands/Self.java
  155. +5 −0 core/src/main/java/org/jruby/ir/operands/StringLiteral.java
  156. +17 −22 core/src/main/java/org/jruby/ir/operands/Symbol.java
  157. +12 −17 core/src/main/java/org/jruby/ir/operands/SymbolProc.java
  158. +1 −2 core/src/main/java/org/jruby/ir/operands/TemporaryCurrentModuleVariable.java
  159. +1 −1 core/src/main/java/org/jruby/ir/operands/TemporaryCurrentScopeVariable.java
  160. +1 −0 core/src/main/java/org/jruby/ir/operands/TemporaryLocalReplacementVariable.java
  161. +1 −2 core/src/main/java/org/jruby/ir/operands/TemporaryLocalVariable.java
  162. +4 −7 core/src/main/java/org/jruby/ir/operands/TemporaryVariable.java
  163. +2 −1 core/src/main/java/org/jruby/ir/operands/Variable.java
  164. +1 −1 core/src/main/java/org/jruby/ir/passes/BasicCompilerPassListener.java
  165. +12 −10 core/src/main/java/org/jruby/ir/persistence/IRDumper.java
  166. +11 −7 core/src/main/java/org/jruby/ir/persistence/IRReader.java
  167. +2 −0 core/src/main/java/org/jruby/ir/persistence/IRReaderDecoder.java
  168. +7 −0 core/src/main/java/org/jruby/ir/persistence/IRReaderStream.java
  169. +8 −3 core/src/main/java/org/jruby/ir/persistence/IRWriter.java
  170. +4 −1 core/src/main/java/org/jruby/ir/persistence/IRWriterAnalyzer.java
  171. +2 −1 core/src/main/java/org/jruby/ir/persistence/IRWriterEncoder.java
  172. +5 −0 core/src/main/java/org/jruby/ir/persistence/IRWriterStream.java
  173. +69 −60 core/src/main/java/org/jruby/ir/runtime/IRRuntimeHelpers.java
  174. +2 −3 core/src/main/java/org/jruby/ir/targets/IRBytecodeAdapter.java
  175. +3 −4 core/src/main/java/org/jruby/ir/targets/IRBytecodeAdapter6.java
  176. +27 −27 core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
  177. +1 −1 core/src/main/java/org/jruby/ir/targets/MethodData.java
  178. +3 −3 core/src/main/java/org/jruby/ir/transformations/inlining/InlineCloneInfo.java
  179. +4 −3 core/src/main/java/org/jruby/javasupport/JavaClass.java
  180. +3 −2 core/src/main/java/org/jruby/javasupport/JavaMethod.java
  181. +5 −7 core/src/main/java/org/jruby/javasupport/JavaPackage.java
  182. +9 −12 core/src/main/java/org/jruby/javasupport/proxy/JavaProxyClass.java
  183. +3 −2 core/src/main/java/org/jruby/lexer/LexingCommon.java
  184. +8 −4 core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
  185. +96 −206 core/src/main/java/org/jruby/parser/ParserSupport.java
  186. +39 −38 core/src/main/java/org/jruby/parser/RubyParser.java
  187. +38 −37 core/src/main/java/org/jruby/parser/RubyParser.y
  188. +48 −103 core/src/main/java/org/jruby/parser/StaticScope.java
  189. +5 −28 core/src/main/java/org/jruby/parser/StaticScopeFactory.java
  190. +7 −16 core/src/main/java/org/jruby/runtime/ArgumentDescriptor.java
  191. +21 −28 core/src/main/java/org/jruby/runtime/ArgumentType.java
  192. +43 −50 core/src/main/java/org/jruby/runtime/Helpers.java
  193. +1 −1 core/src/main/java/org/jruby/runtime/InterpretedIRBlockBody.java
  194. +3 −3 core/src/main/java/org/jruby/runtime/MixedModeIRBlockBody.java
  195. +2 −3 core/src/main/java/org/jruby/runtime/ThreadContext.java
  196. +21 −0 core/src/main/java/org/jruby/runtime/backtrace/RubyStackTraceElement.java
  197. +12 −22 core/src/main/java/org/jruby/runtime/backtrace/TraceType.java
  198. +4 −4 core/src/main/java/org/jruby/runtime/ivars/VariableAccessor.java
  199. +1 −1 core/src/main/java/org/jruby/runtime/load/LoadService.java
  200. +18 −13 core/src/main/java/org/jruby/runtime/marshal/MarshalStream.java
  201. +1 −1 core/src/main/java/org/jruby/runtime/marshal/UnmarshalStream.java
  202. +2 −2 core/src/main/java/org/jruby/runtime/profile/MethodEnhancer.java
  203. +5 −4 core/src/main/java/org/jruby/runtime/profile/builtin/BuiltinProfilingService.java
  204. +20 −20 core/src/main/java/org/jruby/runtime/profile/builtin/ProfilePrinter.java
  205. +5 −5 core/src/main/java/org/jruby/runtime/profile/builtin/ProfiledMethod.java
  206. +5 −4 core/src/main/java/org/jruby/runtime/profile/builtin/ProfiledMethods.java
  207. +1 −1 core/src/main/java/org/jruby/runtime/profile/package-info.java
  208. +90 −0 core/src/main/java/org/jruby/util/ByteListHelper.java
  209. +30 −0 core/src/main/java/org/jruby/util/CommonByteLists.java
  210. +5 −4 core/src/main/java/org/jruby/util/JavaNameMangler.java
  211. +248 −0 core/src/main/java/org/jruby/util/RubyStringBuilder.java
  212. +8 −36 core/src/main/java/org/jruby/util/StringSupport.java
  213. +29 −12 core/src/main/java/org/jruby/util/TypeConverter.java
  214. +1 −1 core/src/main/java/org/jruby/util/io/PopenExecutor.java
  215. +1 −1 core/src/test/java/org/jruby/embed/MultipleScriptsRunner.java
  216. +1 −1 core/src/test/java/org/jruby/embed/jsr223/JRubyEngineFactoryTest.java
  217. +1 −1 core/src/test/java/org/jruby/javasupport/TestJavaClass.java
  218. +1 −1 core/src/test/java/org/jruby/runtime/profile/TestProfilingService.java
  219. +29 −29 lib/ruby/stdlib/jruby/compiler/java_class.rb
  220. +1 −1 lib/ruby/stdlib/jruby/compiler/java_signature.rb
7 changes: 5 additions & 2 deletions core/src/main/java/org/jruby/BasicObjectStub.java
Original file line number Diff line number Diff line change
@@ -42,6 +42,8 @@

import static org.jruby.runtime.invokedynamic.MethodNames.INSPECT;
import static org.jruby.runtime.Helpers.invokedynamic;
import static org.jruby.util.RubyStringBuilder.str;

import org.jruby.util.TypeConverter;

public final class BasicObjectStub {
@@ -146,8 +148,9 @@ public static Class getJavaClass(IRubyObject self) {

public static String asJavaString(IRubyObject self) {
IRubyObject asString = checkStringType(self);
if(!asString.isNil()) return ((RubyString)asString).asJavaString();
throw getRuntime(self).newTypeError(inspect(self).toString() + " is not a string");
if(!asString.isNil()) return asString.asJavaString();
Ruby runtime = getRuntime(self);
throw runtime.newTypeError(str(runtime, "", inspect(self), " is not a string"));
}

public static RubyString asString(IRubyObject self) {
8 changes: 4 additions & 4 deletions core/src/main/java/org/jruby/IncludedModuleWrapper.java
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ public IncludedModuleWrapper newIncludeClass(RubyClass superClass) {
}

@Override
public void addMethod(String name, DynamicMethod method) {
public void addMethod(String id, DynamicMethod method) {
throw new UnsupportedOperationException("An included class is only a wrapper for a module");
}

@@ -208,18 +208,18 @@ protected IRubyObject getAutoloadConstant(String name, boolean forceLoad) {
}

@Override
protected DynamicMethod searchMethodCommon(String name) {
protected DynamicMethod searchMethodCommon(String id) {
// IncludedModuleWrapper needs to search prepended modules too, so search until we find methodLocation
RubyModule module = origin;
RubyModule methodLoc = origin.getMethodLocation();

for (; module != methodLoc; module = module.getSuperClass()) {
DynamicMethod method = module.getMethods().get(name);
DynamicMethod method = module.getMethods().get(id);
if (method != null) return method.isNull() ? null : method;
}

// one last search for method location
DynamicMethod method = module.getMethods().get(name);
DynamicMethod method = module.getMethods().get(id);
if (method != null) return method.isNull() ? null : method;

return null;
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/PrependedModule.java
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ public class PrependedModule extends IncludedModule {
public PrependedModule(Ruby runtime, RubyClass superClass, RubyModule origin) {
super(runtime, superClass, origin);
methods = origin.methods;
origin.methods = new ConcurrentHashMap<String, DynamicMethod>(0, 0.9f, 1);
origin.methods = new ConcurrentHashMap<>(0, 0.9f, 1);
origin.methodLocation = this;
for (Map.Entry<String, DynamicMethod> entry : methods.entrySet()) {
DynamicMethod method = entry.getValue();
@@ -55,8 +55,8 @@ public PrependedModule(Ruby runtime, RubyClass superClass, RubyModule origin) {
}

@Override
public void addMethod(String name, DynamicMethod method) {
super.addMethod(name, method);
public void addMethod(String id, DynamicMethod method) {
super.addMethod(id, method);
method.setDefinedClass(origin);
}

85 changes: 48 additions & 37 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -66,6 +66,7 @@
import org.jruby.parser.StaticScope;
import org.jruby.runtime.JavaSites;
import org.jruby.runtime.invokedynamic.InvokeDynamicSupport;
import org.jruby.util.CommonByteLists;
import org.jruby.util.MRIRecursionGuard;
import org.jruby.util.StringSupport;
import org.jruby.util.StrptimeParser;
@@ -208,6 +209,9 @@
import static java.lang.invoke.MethodHandles.insertArguments;
import static java.lang.invoke.MethodType.methodType;
import static org.jruby.internal.runtime.GlobalVariable.Scope.GLOBAL;
import static org.jruby.util.RubyStringBuilder.str;
import static org.jruby.util.RubyStringBuilder.ids;
import static org.jruby.util.RubyStringBuilder.types;

/**
* The Ruby object represents the top-level of a JRuby "instance" in a given VM.
@@ -716,25 +720,26 @@ public IRubyObject runWithGetsLoop(RootNode scriptNode, boolean printing, boolea
private RootNode addGetsLoop(RootNode oldRoot, boolean printing, boolean processLineEndings, boolean split) {
ISourcePosition pos = oldRoot.getPosition();
BlockNode newBody = new BlockNode(pos);
newBody.add(new GlobalAsgnNode(pos, "$/", new StrNode(pos, ((RubyString) globalVariables.get("$/")).getByteList())));
RubySymbol dollarSlash = newSymbol(CommonByteLists.DOLLAR_SLASH);
newBody.add(new GlobalAsgnNode(pos, dollarSlash, new StrNode(pos, ((RubyString) globalVariables.get("$/")).getByteList())));

if (processLineEndings) newBody.add(new GlobalAsgnNode(pos, "$\\", new GlobalVarNode(pos, "$/")));
if (processLineEndings) newBody.add(new GlobalAsgnNode(pos, newSymbol(CommonByteLists.DOLLAR_BACKSLASH), new GlobalVarNode(pos, dollarSlash)));

GlobalVarNode dollarUnderscore = new GlobalVarNode(pos, "$_");
GlobalVarNode dollarUnderscore = new GlobalVarNode(pos, newSymbol("$_"));

BlockNode whileBody = new BlockNode(pos);
newBody.add(new WhileNode(pos, new VCallNode(pos, "gets"), whileBody));
newBody.add(new WhileNode(pos, new VCallNode(pos, newSymbol("gets")), whileBody));

if (processLineEndings) whileBody.add(new CallNode(pos, dollarUnderscore, "chomp!", null, null));
if (split) whileBody.add(new GlobalAsgnNode(pos, "$F", new CallNode(pos, dollarUnderscore, "split", null, null)));
if (processLineEndings) whileBody.add(new CallNode(pos, dollarUnderscore, newSymbol("chomp!"), null, null, false));
if (split) whileBody.add(new GlobalAsgnNode(pos, newSymbol("$F"), new CallNode(pos, dollarUnderscore, newSymbol("split"), null, null, false)));

if (oldRoot.getBodyNode() instanceof BlockNode) { // common case n stmts
whileBody.addAll(((BlockNode) oldRoot.getBodyNode()));
} else { // single expr script
whileBody.add(oldRoot.getBodyNode());
}

if (printing) whileBody.add(new FCallNode(pos, "puts", new ArrayNode(pos, dollarUnderscore), null));
if (printing) whileBody.add(new FCallNode(pos, newSymbol("puts"), new ArrayNode(pos, dollarUnderscore), null));

return new RootNode(pos, oldRoot.getScope(), newBody, oldRoot.getFile());
}
@@ -1030,22 +1035,22 @@ public RubyClass defineClassUnder(String name, RubyClass superClass, ObjectAlloc
* A variation of defineClassUnder that allows passing in an array of
* supplementary call sites to improve dynamic invocation.
*
* @param name The name for the new class
* @param id The name for the new class as an ISO-8859_1 String (id-value)
* @param superClass The super class for the new class
* @param allocator An ObjectAllocator instance that can construct
* instances of the new class.
* @param parent The namespace under which to define the new class
* @param callSites The array of call sites to add
* @return The new class
*/
public RubyClass defineClassUnder(String name, RubyClass superClass, ObjectAllocator allocator, RubyModule parent, CallSite[] callSites) {
IRubyObject classObj = parent.getConstantAt(name);
public RubyClass defineClassUnder(String id, RubyClass superClass, ObjectAllocator allocator, RubyModule parent, CallSite[] callSites) {
IRubyObject classObj = parent.getConstantAt(id);

if (classObj != null) {
if (!(classObj instanceof RubyClass)) throw newTypeError(name + " is not a class");
if (!(classObj instanceof RubyClass)) throw newTypeError(str(this, ids(this, id), " is not a class"));
RubyClass klazz = (RubyClass)classObj;
if (klazz.getSuperClass().getRealClass() != superClass) {
throw newNameError(name + " is already defined", name);
throw newNameError(str(this, ids(this, id), " is already defined"), id);
}
// If we define a class in Ruby, but later want to allow it to be defined in Java,
// the allocator needs to be updated
@@ -1058,13 +1063,14 @@ public RubyClass defineClassUnder(String name, RubyClass superClass, ObjectAlloc
boolean parentIsObject = parent == objectClass;

if (superClass == null) {
String className = parentIsObject ? name : parent.getName() + "::" + name;
warnings.warn(ID.NO_SUPER_CLASS, "no super class for `" + className + "', Object assumed");
IRubyObject className = parentIsObject ? ids(this, id) :
parent.toRubyString(getCurrentContext()).append(newString("::")).append(ids(this, id));
warnings.warn(ID.NO_SUPER_CLASS, str(this, "no super class for `", className, "', Object assumed"));

superClass = objectClass;
}

return RubyClass.newClass(this, superClass, name, allocator, parent, !parentIsObject, callSites);
return RubyClass.newClass(this, superClass, id, allocator, parent, !parentIsObject, callSites);
}

/**
@@ -1097,11 +1103,10 @@ public RubyModule defineModuleUnder(String name, RubyModule parent) {
if (moduleObj != null ) {
if (moduleObj.isModule()) return (RubyModule)moduleObj;

if (parentIsObject) {
throw newTypeError(moduleObj.getMetaClass().getName() + " is not a module");
} else {
throw newTypeError(parent.getName() + "::" + moduleObj.getMetaClass().getName() + " is not a module");
}
RubyString typeName = parentIsObject ?
types(this, moduleObj.getMetaClass()) : types(this, parent, moduleObj.getMetaClass());

throw newTypeError(str(this, typeName, " is not a module"));
}

return RubyModule.newModule(this, name, parent, !parentIsObject);
@@ -1111,15 +1116,15 @@ public RubyModule defineModuleUnder(String name, RubyModule parent) {
* From Object, retrieve the named module. If it doesn't exist a
* new module is created.
*
* @param name The name of the module
* @param id The name of the module
* @returns The existing or new module
*/
public RubyModule getOrCreateModule(String name) {
IRubyObject module = objectClass.getConstantAt(name);
public RubyModule getOrCreateModule(String id) {
IRubyObject module = objectClass.getConstantAt(id);
if (module == null) {
module = defineModule(name);
module = defineModule(id);
} else if (!module.isModule()) {
throw newTypeError(name + " is not a Module");
throw newTypeError(str(this, ids(this, id), " is not a Module"));
}

return (RubyModule) module;
@@ -1208,11 +1213,11 @@ private void init() {
initThreadStatuses();

// Create an IR manager and a top-level IR scope and bind it to the top-level static-scope object
irManager = new IRManager(getInstanceConfig());
irManager = new IRManager(this, getInstanceConfig());
// FIXME: This registers itself into static scope as a side-effect. Let's make this
// relationship handled either more directly or through a descriptice method
// FIXME: We need a failing test case for this since removing it did not regress tests
IRScope top = new IRScriptBody(irManager, "", context.getCurrentScope().getStaticScope());
IRScope top = new IRScriptBody(irManager, newSymbol(""), context.getCurrentScope().getStaticScope());
top.allocateInterpreterContext(new ArrayList<Instr>());

// Initialize the "dummy" class used as a marker
@@ -2873,7 +2878,7 @@ public PrintStream getOutputStream() {

public RubyModule getClassFromPath(final String path) {
if (path.length() == 0 || path.charAt(0) == '#') {
throw newTypeError("can't retrieve anonymous class " + path);
throw newTypeError(str(this, "can't retrieve anonymous class ", ids(this, path)));
}

RubyModule c = getObject();
@@ -2885,14 +2890,14 @@ public RubyModule getClassFromPath(final String path) {

if ( p < l && path.charAt(p) == ':' ) {
if ( ++p < l && path.charAt(p) != ':' ) {
throw newTypeError("undefined class/module " + str);
throw newTypeError(str(this, "undefined class/module ", ids(this, str)));
}
pbeg = ++p;
}

IRubyObject cc = c.getConstant(str);
if ( ! ( cc instanceof RubyModule ) ) {
throw newTypeError(path + " does not refer to class/module");
throw newTypeError(str(this, ids(this, path), " does not refer to class/module"));
}
c = (RubyModule) cc;
}
@@ -3613,7 +3618,7 @@ public RaiseException newArgumentError(int got, int expected) {
}

public RaiseException newArgumentError(String name, int got, int expected) {
return newRaiseException(getArgumentError(), "wrong number of arguments calling `" + name + "` (" + got + " for " + expected + ")");
return newRaiseException(getArgumentError(), str(this, "wrong number of arguments calling `", ids(this, name), ("` (" + got + " for " + expected + ")")));
}

public RaiseException newErrnoEBADFError() {
@@ -4115,8 +4120,12 @@ public RaiseException newFrozenError(String objectType) {
return newFrozenError(objectType, false);
}

public RaiseException newFrozenError(RubyModule type) {
return newRaiseException(getFrozenError(), str(this, "can't modify frozen ", types(this, type)));
}

public RaiseException newFrozenError(String objectType, boolean runtimeError) {
return newRaiseException(getFrozenError(), "can't modify frozen " + objectType);
return newRaiseException(getFrozenError(), str(this, "can't modify frozen ", ids(this, objectType)));
}

public RaiseException newSystemStackError(String message) {
@@ -4164,8 +4173,10 @@ public RaiseException newTypeError(IRubyObject receivedObject, RubyModule expect
}

public RaiseException newTypeError(IRubyObject receivedObject, String expectedType) {
return newRaiseException(getTypeError(), "wrong argument type " +
receivedObject.getMetaClass().getRealClass() + " (expected " + expectedType + ")");
return newRaiseException(getTypeError(),
str(this, "wrong argument type ",
receivedObject.getMetaClass().getRealClass().toRubyString(getCurrentContext()),
" (expected ", ids(this, expectedType), ")"));
}

public RaiseException newEOFError() {
@@ -4524,13 +4535,13 @@ public List<StrptimeToken> getCachedStrptimePattern(String pattern) {
/**
* Add a method, so it can be printed out later.
*
* @param name the name of the method
* @param id raw name String of the method to be profiled
* @param method
*/
void addProfiledMethod(final String name, final DynamicMethod method) {
void addProfiledMethod(final String id, final DynamicMethod method) {
if (!config.isProfiling() || method.isUndefined()) return;

getProfilingService().addProfiledMethod( name, method );
getProfilingService().addProfiledMethod(id, method);
}

/**
6 changes: 4 additions & 2 deletions core/src/main/java/org/jruby/RubyArray.java
Original file line number Diff line number Diff line change
@@ -89,6 +89,8 @@
import static org.jruby.runtime.Helpers.hashEnd;
import static org.jruby.runtime.Helpers.murmurCombine;
import static org.jruby.runtime.Visibility.PRIVATE;
import static org.jruby.util.RubyStringBuilder.str;
import static org.jruby.util.RubyStringBuilder.types;

/**
* The implementation of the built-in class Array in Ruby.
@@ -2398,7 +2400,7 @@ private int bsearch_index_internal(ThreadContext context, Block block) {
case -1: smaller = false;
}
} else {
throw runtime.newTypeError("wrong argument type " + v.getType().getName() + " (must be numeric, true, false or nil");
throw runtime.newTypeError(str(runtime, "wrong argument type ", types(runtime, v.getType()), " (must be numeric, true, false or nil"));
}
if (smaller) {
high = mid;
@@ -4786,7 +4788,7 @@ public RubyString pack(ThreadContext context, IRubyObject obj, IRubyObject maybe
if (!opts.isNil()) {
buffer = ArgsUtil.extractKeywordArg(context, "buffer", opts);
if (!buffer.isNil() && !(buffer instanceof RubyString)) {
throw runtime.newTypeError("buffer must be String, not " + buffer.getType().getName());
throw runtime.newTypeError(str(runtime, "buffer must be String, not ", types(runtime, buffer.getType())));
}
}

Loading