BSHBinaryExpression.smali
.class Lbsh/BSHBinaryExpression;
.super Lbsh/SimpleNode;
# interfaces
.implements Lbsh/k;
# static fields
.field static b:Ljava/lang/Class;
# instance fields
.field public a:I
# direct methods
.method constructor <init>(I)V
.registers 2
invoke-direct {p0, p1}, Lbsh/SimpleNode;-><init>(I)V
return-void
.end method
.method static a(Ljava/lang/String;)Ljava/lang/Class;
.registers 3
:try_start_0
invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
:try_end_3
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_3} :catch_5
move-result-object v0
return-object v0
:catch_5
move-exception v0
new-instance v1, Ljava/lang/NoClassDefFoundError;
invoke-virtual {v0}, Ljava/lang/ClassNotFoundException;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/NoClassDefFoundError;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method private a(Ljava/lang/Object;)Z
.registers 3
instance-of v0, p1, Lbsh/Primitive;
if-eqz v0, :cond_e
sget-object v0, Lbsh/Primitive;->c:Lbsh/Primitive;
if-eq p1, v0, :cond_e
sget-object v0, Lbsh/Primitive;->b:Lbsh/Primitive;
if-eq p1, v0, :cond_e
const/4 v0, 0x1
:goto_d
return v0
:cond_e
const/4 v0, 0x0
goto :goto_d
.end method
.method private b(Ljava/lang/Object;)Z
.registers 3
instance-of v0, p1, Ljava/lang/Boolean;
if-nez v0, :cond_c
instance-of v0, p1, Ljava/lang/Character;
if-nez v0, :cond_c
instance-of v0, p1, Ljava/lang/Number;
if-eqz v0, :cond_e
:cond_c
const/4 v0, 0x1
:goto_d
return v0
:cond_e
const/4 v0, 0x0
goto :goto_d
.end method
# virtual methods
.method public a(Lbsh/c;Lbsh/Interpreter;)Ljava/lang/Object;
.registers 10
const/4 v3, 0x0
const/4 v2, 0x1
invoke-virtual {p0, v3}, Lbsh/BSHBinaryExpression;->a(I)Lbsh/Node;
move-result-object v0
check-cast v0, Lbsh/SimpleNode;
invoke-virtual {v0, p1, p2}, Lbsh/SimpleNode;->a(Lbsh/c;Lbsh/Interpreter;)Ljava/lang/Object;
move-result-object v1
iget v0, p0, Lbsh/BSHBinaryExpression;->a:I
const/16 v4, 0x23
if-ne v0, v4, :cond_56
sget-object v0, Lbsh/Primitive;->b:Lbsh/Primitive;
if-ne v1, v0, :cond_1c
new-instance v0, Lbsh/Primitive;
invoke-direct {v0, v3}, Lbsh/Primitive;-><init>(Z)V
:goto_1b
return-object v0
:cond_1c
invoke-virtual {p0, v2}, Lbsh/BSHBinaryExpression;->a(I)Lbsh/Node;
move-result-object v0
check-cast v0, Lbsh/BSHType;
invoke-virtual {v0, p1, p2}, Lbsh/BSHType;->b(Lbsh/c;Lbsh/Interpreter;)Ljava/lang/Class;
move-result-object v4
instance-of v0, v1, Lbsh/Primitive;
if-eqz v0, :cond_48
sget-object v0, Lbsh/BSHBinaryExpression;->b:Ljava/lang/Class;
if-nez v0, :cond_3f
const-string/jumbo v0, "bsh.Primitive"
invoke-static {v0}, Lbsh/BSHBinaryExpression;->a(Ljava/lang/String;)Ljava/lang/Class;
move-result-object v0
sput-object v0, Lbsh/BSHBinaryExpression;->b:Ljava/lang/Class;
:goto_37
if-ne v4, v0, :cond_42
new-instance v0, Lbsh/Primitive;
invoke-direct {v0, v2}, Lbsh/Primitive;-><init>(Z)V
goto :goto_1b
:cond_3f
sget-object v0, Lbsh/BSHBinaryExpression;->b:Ljava/lang/Class;
goto :goto_37
:cond_42
new-instance v0, Lbsh/Primitive;
invoke-direct {v0, v3}, Lbsh/Primitive;-><init>(Z)V
goto :goto_1b
:cond_48
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
invoke-static {v4, v0}, Lbsh/r;->b(Ljava/lang/Class;Ljava/lang/Class;)Z
move-result v1
new-instance v0, Lbsh/Primitive;
invoke-direct {v0, v1}, Lbsh/Primitive;-><init>(Z)V
goto :goto_1b
:cond_56
iget v0, p0, Lbsh/BSHBinaryExpression;->a:I
const/16 v4, 0x62
if-eq v0, v4, :cond_62
iget v0, p0, Lbsh/BSHBinaryExpression;->a:I
const/16 v4, 0x63
if-ne v0, v4, :cond_81
:cond_62
invoke-direct {p0, v1}, Lbsh/BSHBinaryExpression;->a(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_17b
move-object v0, v1
check-cast v0, Lbsh/Primitive;
invoke-virtual {v0}, Lbsh/Primitive;->a()Ljava/lang/Object;
move-result-object v0
:goto_6f
instance-of v4, v0, Ljava/lang/Boolean;
if-eqz v4, :cond_81
check-cast v0, Ljava/lang/Boolean;
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
move-result v0
if-nez v0, :cond_81
new-instance v0, Lbsh/Primitive;
invoke-direct {v0, v3}, Lbsh/Primitive;-><init>(Z)V
goto :goto_1b
:cond_81
iget v0, p0, Lbsh/BSHBinaryExpression;->a:I
const/16 v4, 0x60
if-eq v0, v4, :cond_8d
iget v0, p0, Lbsh/BSHBinaryExpression;->a:I
const/16 v4, 0x61
if-ne v0, v4, :cond_ad
:cond_8d
invoke-direct {p0, v1}, Lbsh/BSHBinaryExpression;->a(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_178
move-object v0, v1
check-cast v0, Lbsh/Primitive;
invoke-virtual {v0}, Lbsh/Primitive;->a()Ljava/lang/Object;
move-result-object v0
:goto_9a
instance-of v4, v0, Ljava/lang/Boolean;
if-eqz v4, :cond_ad
check-cast v0, Ljava/lang/Boolean;
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
move-result v0
if-ne v0, v2, :cond_ad
new-instance v0, Lbsh/Primitive;
invoke-direct {v0, v2}, Lbsh/Primitive;-><init>(Z)V
goto/16 :goto_1b
:cond_ad
invoke-direct {p0, v1}, Lbsh/BSHBinaryExpression;->b(Ljava/lang/Object;)Z
move-result v4
invoke-virtual {p0, v2}, Lbsh/BSHBinaryExpression;->a(I)Lbsh/Node;
move-result-object v0
check-cast v0, Lbsh/SimpleNode;
invoke-virtual {v0, p1, p2}, Lbsh/SimpleNode;->a(Lbsh/c;Lbsh/Interpreter;)Ljava/lang/Object;
move-result-object v5
invoke-direct {p0, v5}, Lbsh/BSHBinaryExpression;->b(Ljava/lang/Object;)Z
move-result v0
if-nez v4, :cond_c7
invoke-direct {p0, v1}, Lbsh/BSHBinaryExpression;->a(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_d9
:cond_c7
if-nez v0, :cond_cf
invoke-direct {p0, v5}, Lbsh/BSHBinaryExpression;->a(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_d9
:cond_cf
if-eqz v4, :cond_f7
if-eqz v0, :cond_f7
iget v0, p0, Lbsh/BSHBinaryExpression;->a:I
const/16 v4, 0x5a
if-ne v0, v4, :cond_f7
:cond_d9
iget v0, p0, Lbsh/BSHBinaryExpression;->a:I
sparse-switch v0, :sswitch_data_17e
:cond_de
instance-of v0, v1, Lbsh/Primitive;
if-nez v0, :cond_e6
instance-of v0, v5, Lbsh/Primitive;
if-eqz v0, :cond_151
:cond_e6
sget-object v0, Lbsh/Primitive;->c:Lbsh/Primitive;
if-eq v1, v0, :cond_ee
sget-object v0, Lbsh/Primitive;->c:Lbsh/Primitive;
if-ne v5, v0, :cond_140
:cond_ee
new-instance v0, Lbsh/EvalError;
const-string/jumbo v1, "illegal use of undefined variable, class, or \'void\' literal"
invoke-direct {v0, v1, p0, p1}, Lbsh/EvalError;-><init>(Ljava/lang/String;Lbsh/SimpleNode;Lbsh/c;)V
throw v0
:cond_f7
:try_start_f7
iget v0, p0, Lbsh/BSHBinaryExpression;->a:I
invoke-static {v1, v5, v0}, Lbsh/Primitive;->a(Ljava/lang/Object;Ljava/lang/Object;I)Ljava/lang/Object;
:try_end_fc
.catch Lbsh/UtilEvalError; {:try_start_f7 .. :try_end_fc} :catch_ff
move-result-object v0
goto/16 :goto_1b
:catch_ff
move-exception v0
invoke-virtual {v0, p0, p1}, Lbsh/UtilEvalError;->a(Lbsh/SimpleNode;Lbsh/c;)Lbsh/EvalError;
move-result-object v0
throw v0
:sswitch_105
new-instance v4, Lbsh/Primitive;
if-ne v1, v5, :cond_110
move v0, v2
:goto_10a
invoke-direct {v4, v0}, Lbsh/Primitive;-><init>(Z)V
move-object v0, v4
goto/16 :goto_1b
:cond_110
move v0, v3
goto :goto_10a
:sswitch_112
new-instance v0, Lbsh/Primitive;
if-eq v1, v5, :cond_11b
:goto_116
invoke-direct {v0, v2}, Lbsh/Primitive;-><init>(Z)V
goto/16 :goto_1b
:cond_11b
move v2, v3
goto :goto_116
:sswitch_11d
instance-of v0, v1, Ljava/lang/String;
if-nez v0, :cond_125
instance-of v0, v5, Ljava/lang/String;
if-eqz v0, :cond_de
:cond_125
new-instance v0, Ljava/lang/StringBuffer;
invoke-direct {v0}, Ljava/lang/StringBuffer;-><init>()V
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v0
invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
move-result-object v0
goto/16 :goto_1b
:cond_140
sget-object v0, Lbsh/Primitive;->b:Lbsh/Primitive;
if-eq v1, v0, :cond_148
sget-object v0, Lbsh/Primitive;->b:Lbsh/Primitive;
if-ne v5, v0, :cond_151
:cond_148
new-instance v0, Lbsh/EvalError;
const-string/jumbo v1, "illegal use of null value or \'null\' literal"
invoke-direct {v0, v1, p0, p1}, Lbsh/EvalError;-><init>(Ljava/lang/String;Lbsh/SimpleNode;Lbsh/c;)V
throw v0
:cond_151
new-instance v0, Lbsh/EvalError;
new-instance v1, Ljava/lang/StringBuffer;
invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V
const-string/jumbo v2, "Operator: \'"
invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v1
sget-object v2, Lbsh/k;->a_:[Ljava/lang/String;
iget v3, p0, Lbsh/BSHBinaryExpression;->a:I
aget-object v2, v2, v3
invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v1
const-string/jumbo v2, "\' inappropriate for objects"
invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1, p0, p1}, Lbsh/EvalError;-><init>(Ljava/lang/String;Lbsh/SimpleNode;Lbsh/c;)V
throw v0
:cond_178
move-object v0, v1
goto/16 :goto_9a
:cond_17b
move-object v0, v1
goto/16 :goto_6f
:sswitch_data_17e
.sparse-switch
0x5a -> :sswitch_105
0x5f -> :sswitch_112
0x66 -> :sswitch_11d
.end sparse-switch
.end method