From 83eb6d5ef26bb63ccac58e1ad053a223a588ec11 Mon Sep 17 00:00:00 2001 From: Wen HU Date: Thu, 6 Jan 2022 18:42:38 -0500 Subject: [PATCH] remove files no longer used --- src/MapleFE/java/include/ast2mpl_java.h | 40 ------------ src/MapleFE/java/src/ast2mpl_java.cpp | 64 ------------------- .../test/java/java2mpl/illegal-expr-2.java | 15 ----- .../test/java/java2mpl/illegal-expr.java | 18 ------ 4 files changed, 137 deletions(-) delete mode 100644 src/MapleFE/java/include/ast2mpl_java.h delete mode 100644 src/MapleFE/java/src/ast2mpl_java.cpp delete mode 100644 src/MapleFE/test/java/java2mpl/illegal-expr-2.java delete mode 100644 src/MapleFE/test/java/java2mpl/illegal-expr.java diff --git a/src/MapleFE/java/include/ast2mpl_java.h b/src/MapleFE/java/include/ast2mpl_java.h deleted file mode 100644 index 088a13fea2..0000000000 --- a/src/MapleFE/java/include/ast2mpl_java.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -* Copyright (C) [2020] Futurewei Technologies, Inc. All rights reverved. -* -* OpenArkFE is licensed under the Mulan PSL v2. -* You can use this software according to the terms and conditions of the Mulan PSL v2. -* You may obtain a copy of Mulan PSL v2 at: -* -* http://license.coscl.org.cn/MulanPSL2 -* -* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -* FIT FOR A PARTICULAR PURPOSE. -* See the Mulan PSL v2 for more details. -*/ - -///////////////////////////////////////////////////////////////////////////////// -// Java Specific AST2MPL // -///////////////////////////////////////////////////////////////////////////////// - -#ifndef __AST2MPL_JAVA_H__ -#define __AST2MPL_JAVA_H__ - -#include "ast2mpl.h" - -namespace maplefe { - -class A2MJava : public A2M { -private: -public: - A2MJava(ModuleNode *m) : A2M(m) { } - - const char *Type2Label(const maple::MIRType *type); - - maple::PrimType MapPrim(TypeId id); - maple::MIRType *MapPrimType(TypeId id); - maple::MIRType *MapPrimType(PrimTypeNode *ptnode); -}; - -} -#endif diff --git a/src/MapleFE/java/src/ast2mpl_java.cpp b/src/MapleFE/java/src/ast2mpl_java.cpp deleted file mode 100644 index 7a61e67610..0000000000 --- a/src/MapleFE/java/src/ast2mpl_java.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright (C) [2020] Futurewei Technologies, Inc. All rights reverved. -* -* OpenArkFE is licensed under the Mulan PSL v2. -* You can use this software according to the terms and conditions of the Mulan PSL v2. -* You may obtain a copy of Mulan PSL v2 at: -* -* http://license.coscl.org.cn/MulanPSL2 -* -* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -* FIT FOR A PARTICULAR PURPOSE. -* See the Mulan PSL v2 for more details. -*/ - -#include "ast2mpl_java.h" - -namespace maplefe { - -maple::PrimType A2MJava::MapPrim(TypeId id) { - maple::PrimType prim; - switch (id) { - case TY_Boolean: prim = maple::PTY_u1; break; - case TY_Byte: prim = maple::PTY_u8; break; - case TY_Short: prim = maple::PTY_i16; break; - case TY_Int: prim = maple::PTY_i32; break; - case TY_Long: prim = maple::PTY_i64; break; - case TY_Char: prim = maple::PTY_u16; break; - case TY_Float: prim = maple::PTY_f32; break; - case TY_Double: prim = maple::PTY_f64; break; - case TY_Void: prim = maple::PTY_void; break; - case TY_Null: prim = maple::PTY_void; break; - default: MASSERT("Unsupported PrimType"); break; - } - return prim; -} - -maple::MIRType *A2MJava::MapPrimType(TypeId id) { - maple::PrimType prim = MapPrim(id); - maple::TyIdx tid(prim); - return maple::GlobalTables::GetTypeTable().GetTypeFromTyIdx(tid); -} - -maple::MIRType *A2MJava::MapPrimType(PrimTypeNode *ptnode) { - return MapPrimType(ptnode->GetPrimType()); -} - -const char *A2MJava::Type2Label(const maple::MIRType *type) { - maple::PrimType pty = type->GetPrimType(); - switch (pty) { - case maple::PTY_u1: return "Z"; - case maple::PTY_u8: return "B"; - case maple::PTY_i16: return "S"; - case maple::PTY_u16: return "C"; - case maple::PTY_i32: return "I"; - case maple::PTY_i64: return "J"; - case maple::PTY_f32: return "F"; - case maple::PTY_f64: return "D"; - case maple::PTY_void: return "V"; - default: return "L"; - } -} - -} diff --git a/src/MapleFE/test/java/java2mpl/illegal-expr-2.java b/src/MapleFE/test/java/java2mpl/illegal-expr-2.java deleted file mode 100644 index 3dc2d8291b..0000000000 --- a/src/MapleFE/test/java/java2mpl/illegal-expr-2.java +++ /dev/null @@ -1,15 +0,0 @@ -// -//Copyright (C) [2020] Futurewei Technologies, Inc. All rights reverved. -// -//OpenArkFE is licensed under the Mulan PSL v2. -//You can use this software according to the terms and conditions of the Mulan PSL v2. -//You may obtain a copy of Mulan PSL v2 at: -// -// http://license.coscl.org.cn/MulanPSL2 -// -//THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -//EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -//FIT FOR A PARTICULAR PURPOSE. -//See the Mulan PSL v2 for more details. -// -a+b; diff --git a/src/MapleFE/test/java/java2mpl/illegal-expr.java b/src/MapleFE/test/java/java2mpl/illegal-expr.java deleted file mode 100644 index d204cbb332..0000000000 --- a/src/MapleFE/test/java/java2mpl/illegal-expr.java +++ /dev/null @@ -1,18 +0,0 @@ -// -//Copyright (C) [2020] Futurewei Technologies, Inc. All rights reverved. -// -//OpenArkFE is licensed under the Mulan PSL v2. -//You can use this software according to the terms and conditions of the Mulan PSL v2. -//You may obtain a copy of Mulan PSL v2 at: -// -// http://license.coscl.org.cn/MulanPSL2 -// -//THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER -//EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR -//FIT FOR A PARTICULAR PURPOSE. -//See the Mulan PSL v2 for more details. -// -a+b; -c=a+b; -a=(a+b); -int a=(a+b); -- Gitee