Skip to content

Commit fb88d1b

Browse files
committed
Fix mistaken attribution reading
1 parent 931c7ac commit fb88d1b

4 files changed

Lines changed: 8 additions & 32 deletions

File tree

src/Kernel/Attributes/CodeAttribute.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ public function execute(): void
4040
$exceptionTable = new \PHPJava\Kernel\Structures\_ExceptionTable($this->reader);
4141
$exceptionTable->setConstantPool($this->getConstantPool());
4242
$exceptionTable->setDebugTool($this->getDebugTool());
43-
$exceptionTable->setStartPc($this->readUnsignedShort())
44-
->setEndPc($this->readUnsignedShort())
45-
->setHandlerPc($this->readUnsignedShort())
46-
->setCatchType($this->readUnsignedShort())
47-
->execute();
43+
$exceptionTable->execute();
4844
$this->exceptionTables[] = $exceptionTable;
4945
}
5046

src/Kernel/Attributes/LineNumberTableAttribute.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ public function execute(): void
2020
$lineNumberTable = new \PHPJava\Kernel\Structures\_LineNumberTable($this->reader);
2121
$lineNumberTable->setConstantPool($this->getConstantPool());
2222
$lineNumberTable->setDebugTool($this->getDebugTool());
23-
$lineNumberTable->setStartPc($this->readUnsignedShort())
24-
->setLineNumber($this->readUnsignedShort())
25-
->execute();
23+
$lineNumberTable->execute();
2624
$this->lineNumberTables[] = $lineNumberTable;
2725
}
2826
}

src/Kernel/Structures/_ExceptionTable.php

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,10 @@ class _ExceptionTable implements StructureInterface
1717

1818
public function execute(): void
1919
{
20-
}
21-
22-
public function setStartPc($startPc)
23-
{
24-
$this->startPc = $startPc;
25-
return $this;
26-
}
27-
28-
public function setEndPc($endPc)
29-
{
30-
$this->endPc = $endPc;
31-
return $this;
32-
}
33-
34-
public function setHandlerPc($handlerPc)
35-
{
36-
$this->handlerPc = $handlerPc;
37-
return $this;
38-
}
39-
40-
public function setCatchType($catchType)
41-
{
42-
$this->catchType = $catchType;
43-
return $this;
20+
$this->startPc = $this->readUnsignedShort();
21+
$this->endPc = $this->readUnsignedShort();
22+
$this->handlerPc = $this->readUnsignedShort();
23+
$this->catchType = $this->readUnsignedShort();
4424
}
4525

4626
public function getStartPc()

src/Kernel/Structures/_LineNumberTable.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class _LineNumberTable implements StructureInterface
1515

1616
public function execute(): void
1717
{
18+
$this->startPc = $this->readUnsignedShort();
19+
$this->lineNumber = $this->readUnsignedShort();
1820
}
1921

2022
public function setStartPc($startPc)

0 commit comments

Comments
 (0)