Skip to content

Need a new phase, that will lift try bodies #742

Closed
@DarkDimius

Description

@DarkDimius

This is the current blocker for the bootstrap. I'm working on it

Exception in thread "main" java.lang.VerifyError: Inconsistent stackmap frames at branch target 54
Exception Details:
  Location:
    Test$.implicits()V @51: goto
  Reason:
    Current frame's stack size doesn't match stackmap.
  Current Frame:
    bci: @51
    flags: { }
    locals: { 'Test$', 'java/lang/Throwable', 'java/lang/Throwable', 'java/lang/Exception' }
    stack: { null }
  Stackmap Frame:
    bci: @54
    flags: { }
    locals: { 'Test$' }
    stack: { 'Test$', 'scala/runtime/Null$' }
  Bytecode:
    0x0000000: 2a2a b600 24a7 0031 4c2b 4da7 0025 2cc1
    0x0000010: 0026 9a00 06a7 000c 2cc0 0026 4e01 a700
    0x0000020: 0fa7 0009 2bbf 0000 00bf a7ff faa7 0006
    0x0000030: a7ff dea7 0003 b600 28b1
  Exception Handler Table:
    bci [1, 5] => handler: 8
  Stackmap Table:
    same_locals_1_stack_item_frame(@8,Object[#34])
    append_frame(@14,Object[#34],Object[#34])
    same_frame(@24)
    same_frame(@33)
    same_frame(@36)
    full_frame(@38,{},{Object[#34]})
    append_frame(@42,Object[#2],Object[#34],Object[#34])
    full_frame(@45,{Object[#2],Object[#34],Object[#34],Object[#38]},{Null})
    chop_frame(@48,1)
    full_frame(@51,{Object[#2],Object[#34],Object[#34],Object[#38]},{Null})
    full_frame(@54,{Object[#2]},{Object[#2],Object[#44]})

    at Test.main(StackMap.scala)

minimized source:

object Test {
  var implicitsCache = null

  def main(args: Array[String]): Unit = {
    implicits
  }

  def implicits = {
     implicitsCache = {
       try{ this.implicitsCache} catch { case ex: Exception => null }
     }
  }
}

happens for this classfile: https://yadi.sk/d/EZulESoWi8g4a

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions