1# 2# Copyright (C) 2018 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16.class public LBadField; 17.super Ljava/lang/Object; 18 19# These are bad fields since there is no class Widget in this test. 20.field public static widget:LWidget; 21.field public iwidget:LWidget; 22 23.method public constructor <init>()V 24 .registers 2 25 invoke-direct {v1}, Ljava/lang/Object;-><init>()V 26 return-void 27.end method 28 29.method public static storeStaticObject()V 30 .registers 1 31 new-instance v0, Ljava/lang/Object; 32 invoke-direct {v0}, Ljava/lang/Object;-><init>()V 33 sput-object v0, LBadField;->widget:LWidget; 34 return-void 35.end method 36 37.method public static storeStaticNull()V 38 .registers 1 39 const/4 v0, 0 40 sput-object v0, LBadField;->widget:LWidget; 41 return-void 42.end method 43 44.method public static storeInstanceObject()V 45 .registers 2 46 new-instance v1, LBadField; 47 invoke-direct {v1}, LBadField;-><init>()V 48 new-instance v0, Ljava/lang/Object; 49 invoke-direct {v0}, Ljava/lang/Object;-><init>()V 50 iput-object v0, v1, LBadField;->iwidget:LWidget; 51 return-void 52.end method 53 54.method public static storeInstanceNull()V 55 .registers 2 56 new-instance v1, LBadField; 57 invoke-direct {v1}, LBadField;-><init>()V 58 const/4 v0, 0 59 iput-object v0, v1, LBadField;->iwidget:LWidget; 60 return-void 61.end method 62