Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Introducing OldStackMapper for pre-JDK1.6 class files
- Loading branch information
Jaroslav Tulach
committed
Sep 9, 2021
1 parent
017465e
commit d2100cf0278d989ab483516457c95212bb016486
Showing
27 changed files
with
1,909 additions
and
578 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,55 @@ | ||
| /** | ||
| * Back 2 Browser Bytecode Translator | ||
| * Copyright (C) 2012-2018 Jaroslav Tulach <jaroslav.tulach@apidesign.org> | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. Look for COPYING file in the top folder. | ||
| * If not, see http://opensource.org/licenses/GPL-2.0. | ||
| */ | ||
| package org.apidesign.bck2brwsr.compact.tck; | ||
|
|
||
| import org.apidesign.bck2brwsr.vmtest.Compare; | ||
| import org.apidesign.bck2brwsr.vmtest.VMTest; | ||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.slf4j.impl.StaticLoggerBinder; | ||
| import org.slf4j.spi.LoggerFactoryBinder; | ||
| import org.testng.annotations.Factory; | ||
|
|
||
| public class Target15Test { | ||
| @Compare | ||
| public String loadLoggerFactoryBinder() { | ||
| Class<LoggerFactoryBinder> c = LoggerFactoryBinder.class; | ||
| return c.getName(); | ||
| } | ||
|
|
||
| @Compare | ||
| public String hasBinder() { | ||
| StaticLoggerBinder binder = StaticLoggerBinder.getSingleton(); | ||
| if (binder == null) { | ||
| throw new IllegalStateException("No binder: " + binder); | ||
| } | ||
| return binder.getClass().getName(); | ||
| } | ||
|
|
||
| @Compare | ||
| public String log() { | ||
| Logger log = LoggerFactory.getLogger(Target15Test.class); | ||
| log.trace("Hi there!"); | ||
| return log.getName(); | ||
| } | ||
|
|
||
| @Factory | ||
| public static Object[] create() { | ||
| return VMTest.create(Target15Test.class); | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,53 @@ | ||
| /** | ||
| * Back 2 Browser Bytecode Translator | ||
| * Copyright (C) 2012-2018 Jaroslav Tulach <jaroslav.tulach@apidesign.org> | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. Look for COPYING file in the top folder. | ||
| * If not, see http://opensource.org/licenses/GPL-2.0. | ||
| */ | ||
| package org.apidesign.bck2brwsr.tck; | ||
|
|
||
| import org.apidesign.bck2brwsr.vmtest.Compare; | ||
| import org.apidesign.bck2brwsr.vmtest.VMTest; | ||
| import org.testng.annotations.Factory; | ||
|
|
||
| /** | ||
| * | ||
| * @author Jaroslav Tulach <jtulach@netbeans.org> | ||
| */ | ||
| public class PackagesTest { | ||
| class Inner { | ||
| } | ||
|
|
||
| @Compare | ||
| public String topMostPackage() { | ||
| return getClass().getPackage().getName(); | ||
| } | ||
|
|
||
| @Compare | ||
| public String innerPackage() { | ||
| return new Inner().getClass().getPackage().getName(); | ||
| } | ||
|
|
||
| @Compare | ||
| public boolean areTheSame() { | ||
| Package p1 = getClass().getPackage(); | ||
| Package p2 = new Inner().getClass().getPackage(); | ||
| return p1 == p2; | ||
| } | ||
|
|
||
| @Factory | ||
| public static Object[] create() { | ||
| return VMTest.create(PackagesTest.class); | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Back 2 Browser Bytecode Translator | ||
| * Copyright (C) 2012-2018 Jaroslav Tulach <jaroslav.tulach@apidesign.org> | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. Look for COPYING file in the top folder. | ||
| * If not, see http://opensource.org/licenses/GPL-2.0. | ||
| */ | ||
| package java.lang; | ||
|
|
||
| public final class Package { | ||
| private Package() { | ||
| } | ||
|
|
||
| public static Package getPackage(String name) { | ||
| return null; | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Back 2 Browser Bytecode Translator | ||
| * Copyright (C) 2012-2018 Jaroslav Tulach <jaroslav.tulach@apidesign.org> | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. Look for COPYING file in the top folder. | ||
| * If not, see http://opensource.org/licenses/GPL-2.0. | ||
| */ | ||
| package org.apidesign.bck2brwsr.emul.fake; | ||
|
|
||
| import org.testng.annotations.Test; | ||
|
|
||
| public class JavaLangTest { | ||
| @Test | ||
| public void checkPackage() throws Exception { | ||
| JavaUtilTest.assertSignatures(Package.class); | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.