Mercurial > hg > graal-compiler
changeset 7688:aa933ac2a7fa
removed interpreter api
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Mon, 04 Feb 2013 10:10:05 +0100 |
parents | 37b700379656 |
children | ed51e7237e94 |
files | graal/com.oracle.graal.api.interpreter/overview.html graal/com.oracle.graal.api.interpreter/src/com/oracle/graal/api/interpreter/Interpreter.java graal/com.oracle.graal.api.interpreter/src/com/oracle/graal/api/interpreter/RuntimeInterpreterInterface.java graal/com.oracle.graal.api.interpreter/src/com/oracle/graal/api/interpreter/VirtualMachineComponent.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotRuntimeInterpreterInterface.java |
diffstat | 6 files changed, 1 insertions(+), 205 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.interpreter/overview.html Mon Feb 04 10:06:08 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<html> -<head> -<!-- - -Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code 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 -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> - -</head> -<body> - -Documentation for the <code>com.oracle.graal.api.interpreter</code> project. - -</body> -</html>
--- a/graal/com.oracle.graal.api.interpreter/src/com/oracle/graal/api/interpreter/Interpreter.java Mon Feb 04 10:06:08 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code 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 - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.api.interpreter; - -import com.oracle.graal.api.meta.*; - -public interface Interpreter extends VirtualMachineComponent { - - boolean initialize(String args); - - Object execute(ResolvedJavaMethod method, Object... arguments) throws Throwable; -}
--- a/graal/com.oracle.graal.api.interpreter/src/com/oracle/graal/api/interpreter/RuntimeInterpreterInterface.java Mon Feb 04 10:06:08 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code 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 - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.api.interpreter; - -import com.oracle.graal.api.meta.*; - -/** - * Please note: The parameters of the interface are currently in reversed order since it was derived - * from the java ByteCodeInterpreter implementation. There it was simpler to use the parameters in - * reversed order since they are popped from the stack in reversed order. - */ -public interface RuntimeInterpreterInterface { - - Object invoke(ResolvedJavaMethod method, Object... args); - - void monitorEnter(Object value); - - void monitorExit(Object value); - - Object newObject(ResolvedJavaType type) throws InstantiationException; - - Object getFieldObject(Object base, ResolvedJavaField field); - - boolean getFieldBoolean(Object base, ResolvedJavaField field); - - byte getFieldByte(Object base, ResolvedJavaField field); - - char getFieldChar(Object base, ResolvedJavaField field); - - short getFieldShort(Object base, ResolvedJavaField field); - - int getFieldInt(Object base, ResolvedJavaField field); - - long getFieldLong(Object base, ResolvedJavaField field); - - double getFieldDouble(Object base, ResolvedJavaField field); - - float getFieldFloat(Object base, ResolvedJavaField field); - - void setFieldObject(Object value, Object base, ResolvedJavaField field); - - void setFieldInt(int value, Object base, ResolvedJavaField field); - - void setFieldFloat(float value, Object base, ResolvedJavaField field); - - void setFieldDouble(double value, Object base, ResolvedJavaField field); - - void setFieldLong(long value, Object base, ResolvedJavaField field); - - byte getArrayByte(long index, Object array); - - char getArrayChar(long index, Object array); - - short getArrayShort(long index, Object array); - - int getArrayInt(long index, Object array); - - long getArrayLong(long index, Object array); - - double getArrayDouble(long index, Object array); - - float getArrayFloat(long index, Object array); - - Object getArrayObject(long index, Object array); - - void setArrayByte(byte value, long index, Object array); - - void setArrayChar(char value, long index, Object array); - - void setArrayShort(short value, long index, Object array); - - void setArrayInt(int value, long index, Object array); - - void setArrayLong(long value, long index, Object array); - - void setArrayFloat(float value, long index, Object array); - - void setArrayDouble(double value, long index, Object array); - - void setArrayObject(Object value, long index, Object array); - - Class<?> getMirror(ResolvedJavaType type); -}
--- a/graal/com.oracle.graal.api.interpreter/src/com/oracle/graal/api/interpreter/VirtualMachineComponent.java Mon Feb 04 10:06:08 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2012, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code 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 - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.api.interpreter; - -public interface VirtualMachineComponent { - - void setOption(String name, String value); -}
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Mon Feb 04 10:06:08 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Mon Feb 04 10:10:05 2013 +0100 @@ -28,7 +28,6 @@ import java.util.*; import com.oracle.graal.api.code.*; -import com.oracle.graal.api.interpreter.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.api.runtime.*; import com.oracle.graal.compiler.*; @@ -265,9 +264,6 @@ if (clazz == GraalCompiler.class) { return (T) getCompiler(); } - if (clazz == RuntimeInterpreterInterface.class) { - return (T) getRuntimeInterpreterInterface(); - } return null; } }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotRuntimeInterpreterInterface.java Mon Feb 04 10:06:08 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotRuntimeInterpreterInterface.java Mon Feb 04 10:10:05 2013 +0100 @@ -28,11 +28,10 @@ import sun.misc.*; -import com.oracle.graal.api.interpreter.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.hotspot.meta.*; -public class HotSpotRuntimeInterpreterInterface implements RuntimeInterpreterInterface { +public class HotSpotRuntimeInterpreterInterface { private final MetaAccessProvider metaProvider;