ccebinger / SWPSoSe14

2 stars 1 forks source link

Wrong target jump (branching) #248

Closed kretzschi closed 10 years ago

kretzschi commented 10 years ago

Hab gerade weiter an der Type Methode geschrieben und erhalte folgende Ausgabe bei javap:

    43: ifeq          48
    46: ldc           #142                // String string
    48: astore_1      
    49: aload_1       
    50: getstatic     #139  

Jedoch soll er nicht auf 48 springen, sondern auf 49. Der conditional_body sieht nämlich so aus:

code->add_ldc_string("string", first_conditional_body);
first_conditional_body.push_back(codegen::MNEMONIC::ASTORE_1);

Wenn er richtig springt, müsste es laufen.

Testdatei:

---3?--#

Erwartete Ausgabe:

string
kretzschi commented 10 years ago

Ach mist, ich muss ja noch pushen xD

Zelldon commented 10 years ago

versuchs nochmal :)

kretzschi commented 10 years ago

Danke :+1: