changeset 22548:02fc27dc1da7

Rename jvmciJavaAccess.* to jvmciJavaClasses.*
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 09 Sep 2015 17:56:30 -0700
parents 10a9e989850e
children f39ccee58e7a
files src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp src/cpu/sparc/vm/sharedRuntime_sparc.cpp src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp src/cpu/x86/vm/sharedRuntime_x86_64.cpp src/share/vm/code/nmethod.cpp src/share/vm/jvmci/jvmciCodeInstaller.cpp src/share/vm/jvmci/jvmciCompiler.cpp src/share/vm/jvmci/jvmciCompilerToVM.cpp src/share/vm/jvmci/jvmciCompilerToVM.hpp src/share/vm/jvmci/jvmciEnv.cpp src/share/vm/jvmci/jvmciJavaAccess.cpp src/share/vm/jvmci/jvmciJavaAccess.hpp src/share/vm/jvmci/jvmciJavaClasses.cpp src/share/vm/jvmci/jvmciJavaClasses.hpp src/share/vm/jvmci/jvmciRuntime.cpp src/share/vm/runtime/deoptimization.cpp src/share/vm/runtime/javaCalls.cpp
diffstat 17 files changed, 473 insertions(+), 473 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -24,7 +24,7 @@
 #include "jvmci/jvmciCodeInstaller.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #include "jvmci/jvmciCompilerToVM.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #include "vmreg_sparc.inline.hpp"
 
 jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, oop method) {
--- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -44,7 +44,7 @@
 #include "shark/sharkCompiler.hpp"
 #endif
 #if INCLUDE_JVMCI
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #endif
 
 #define __ masm->
--- a/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -26,7 +26,7 @@
 #include "runtime/javaCalls.hpp"
 #include "jvmci/jvmciEnv.hpp"
 #include "jvmci/jvmciCodeInstaller.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #include "asm/register.hpp"
--- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -41,7 +41,7 @@
 #include "opto/runtime.hpp"
 #endif
 #if INCLUDE_JVMCI
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #endif
 
 #define __ masm->
--- a/src/share/vm/code/nmethod.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/share/vm/code/nmethod.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -62,7 +62,7 @@
 #include "shark/sharkCompiler.hpp"
 #endif
 #if INCLUDE_JVMCI
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #endif
 
 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
--- a/src/share/vm/jvmci/jvmciCodeInstaller.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/share/vm/jvmci/jvmciCodeInstaller.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -29,7 +29,7 @@
 #include "jvmci/jvmciEnv.hpp"
 #include "jvmci/jvmciCompiler.hpp"
 #include "jvmci/jvmciCodeInstaller.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #include "asm/register.hpp"
--- a/src/share/vm/jvmci/jvmciCompiler.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/share/vm/jvmci/jvmciCompiler.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -24,7 +24,7 @@
 #include "precompiled.hpp"
 #include "memory/oopFactory.hpp"
 #include "runtime/javaCalls.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #include "jvmci/jvmciCompiler.hpp"
 #include "jvmci/jvmciEnv.hpp"
 #include "jvmci/jvmciRuntime.hpp"
--- a/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/share/vm/jvmci/jvmciCompilerToVM.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -35,7 +35,7 @@
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciCompiler.hpp"
 #include "jvmci/jvmciEnv.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #include "jvmci/jvmciCodeInstaller.hpp"
 #include "gc_implementation/g1/heapRegion.hpp"
 #include "runtime/javaCalls.hpp"
--- a/src/share/vm/jvmci/jvmciCompilerToVM.hpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/share/vm/jvmci/jvmciCompilerToVM.hpp	Wed Sep 09 17:56:30 2015 -0700
@@ -26,7 +26,7 @@
 
 #include "prims/jni.h"
 #include "runtime/javaCalls.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 
 class CompilerToVM {
 public:
--- a/src/share/vm/jvmci/jvmciEnv.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/share/vm/jvmci/jvmciEnv.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -46,7 +46,7 @@
 #include "runtime/sharedRuntime.hpp"
 #include "utilities/dtrace.hpp"
 #include "jvmci/jvmciRuntime.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 
 JVMCIEnv::JVMCIEnv(CompileTask* task, int system_dictionary_modification_counter) {
   _task = task;
--- a/src/share/vm/jvmci/jvmciJavaAccess.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2011, 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.
- */
-
-#include "precompiled.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
-#include "runtime/jniHandles.hpp"
-#include "classfile/symbolTable.hpp"
-// This function is similar to javaClasses.cpp, it computes the field offset of a (static or instance) field.
-// It looks up the name and signature symbols without creating new ones, all the symbols of these classes need to be already loaded.
-
-void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field) {
-  InstanceKlass* ik = InstanceKlass::cast(klass);
-  Symbol* name_symbol = SymbolTable::probe(name, (int)strlen(name));
-  Symbol* signature_symbol = SymbolTable::probe(signature, (int)strlen(signature));
-  if (name_symbol == NULL || signature_symbol == NULL) {
-#ifndef PRODUCT
-    ik->print_on(tty);
-#endif
-    fatal(err_msg("symbol with name %s and signature %s was not found in symbol table (klass=%s)", name, signature, klass->name()->as_C_string()));
-  }
-
-  fieldDescriptor fd;
-  if (!ik->find_field(name_symbol, signature_symbol, &fd)) {
-    ResourceMark rm;
-    fatal(err_msg("Invalid layout of %s at %s", name_symbol->as_C_string(), ik->external_name()));
-  }
-  guarantee(fd.is_static() == static_field, "static/instance mismatch");
-  dest_offset = fd.offset();
-  assert(dest_offset != 0, "must be valid offset");
-}
-
-// This piece of macro magic creates the contents of the jvmci_compute_offsets method that initializes the field indices of all the access classes.
-
-#define START_CLASS(name) { Klass* k = SystemDictionary::name##_klass(); assert(k != NULL, "Could not find class " #name "");
-
-#define END_CLASS }
-
-#define FIELD(klass, name, signature, static_field) compute_offset(klass::_##name##_offset, k, #name, signature, static_field);
-#define CHAR_FIELD(klass, name) FIELD(klass, name, "C", false)
-#define INT_FIELD(klass, name) FIELD(klass, name, "I", false)
-#define BOOLEAN_FIELD(klass, name) FIELD(klass, name, "Z", false)
-#define LONG_FIELD(klass, name) FIELD(klass, name, "J", false)
-#define FLOAT_FIELD(klass, name) FIELD(klass, name, "F", false)
-#define OOP_FIELD(klass, name, signature) FIELD(klass, name, signature, false)
-#define STATIC_OOP_FIELD(klass, name, signature) FIELD(klass, name, signature, true)
-#define STATIC_INT_FIELD(klass, name) FIELD(klass, name, "I", true)
-#define STATIC_BOOLEAN_FIELD(klass, name) FIELD(klass, name, "Z", true)
-
-
-void jvmci_compute_offsets() {
-  COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, OOP_FIELD, OOP_FIELD, STATIC_OOP_FIELD, STATIC_OOP_FIELD, STATIC_INT_FIELD, STATIC_BOOLEAN_FIELD)
-  guarantee(InstalledCode::_address_offset == sizeof(oopDesc), "codeBlob must be first field!");
-}
-
-#define EMPTY0
-#define EMPTY1(x)
-#define EMPTY2(x,y)
-#define FIELD2(klass, name) int klass::_##name##_offset = 0;
-#define FIELD3(klass, name, sig) FIELD2(klass, name)
-
-COMPILER_CLASSES_DO(EMPTY1, EMPTY0, FIELD2, FIELD2, FIELD2, FIELD2, FIELD2, FIELD3, FIELD3, FIELD3, FIELD3, FIELD3, FIELD2, FIELD2)
-
-
-
-
-
--- a/src/share/vm/jvmci/jvmciJavaAccess.hpp	Wed Sep 09 22:12:31 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,374 +0,0 @@
-/*
- * Copyright (c) 2011, 2015, 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.
- */
-
-#ifndef SHARE_VM_JVMCI_JVMCI_JAVA_ACCESS_HPP
-#define SHARE_VM_JVMCI_JVMCI_JAVA_ACCESS_HPP
-
-void jvmci_compute_offsets();
-
-#include "classfile/systemDictionary.hpp"
-#include "oops/instanceMirrorKlass.hpp"
-
-/* This macro defines the structure of the CompilationResult - classes.
- * It will generate classes with accessors similar to javaClasses.hpp, but with specializations for oops, Handles and jni handles.
- *
- * The public interface of these classes will look like this:
-
- * class StackSlot : AllStatic {
- * public:
- *   static Klass* klass();
- *   static jint  index(oop obj);
- *   static jint  index(Handle obj);
- *   static jint  index(jobject obj);
- *   static void set_index(oop obj, jint x);
- *   static void set_index(Handle obj, jint x);
- *   static void set_index(jobject obj, jint x);
- * };
- *
- */
-
-#define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, boolean_field, long_field, float_field, oop_field, typeArrayOop_field, objArrayOop_field, static_oop_field, static_objArrayOop_field, static_int_field, static_boolean_field) \
-  start_class(Architecture)                                                                                                                                    \
-    oop_field(Architecture, wordKind, "Ljdk/internal/jvmci/meta/PlatformKind;")                                                                                \
-  end_class                                                                                                                                                    \
-  start_class(TargetDescription)                                                                                                                               \
-    oop_field(TargetDescription, arch, "Ljdk/internal/jvmci/code/Architecture;")                                                                               \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotResolvedObjectTypeImpl)                                                                                                                   \
-    oop_field(HotSpotResolvedObjectTypeImpl, javaClass, "Ljava/lang/Class;")                                                                                   \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotResolvedJavaMethodImpl)                                                                                                                   \
-    long_field(HotSpotResolvedJavaMethodImpl, metaspaceMethod)                                                                                                 \
-  end_class                                                                                                                                                    \
-  start_class(InstalledCode)                                                                                                                                   \
-    long_field(InstalledCode, address)                                                                                                                         \
-    long_field(InstalledCode, version)                                                                                                                         \
-    oop_field(InstalledCode, name, "Ljava/lang/String;")                                                                                                       \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotInstalledCode)                                                                                                                            \
-    int_field(HotSpotInstalledCode, size)                                                                                                                      \
-    long_field(HotSpotInstalledCode, codeStart)                                                                                                                \
-    int_field(HotSpotInstalledCode, codeSize)                                                                                                                  \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotNmethod)                                                                                                                                  \
-    boolean_field(HotSpotNmethod, isDefault)                                                                                                                   \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotCompiledCode)                                                                                                                             \
-    oop_field(HotSpotCompiledCode, name, "Ljava/lang/String;")                                                                                                 \
-    objArrayOop_field(HotSpotCompiledCode, sites, "[Ljdk/internal/jvmci/code/CompilationResult$Site;")                                                           \
-    objArrayOop_field(HotSpotCompiledCode, exceptionHandlers, "[Ljdk/internal/jvmci/code/CompilationResult$ExceptionHandler;")                                   \
-    objArrayOop_field(HotSpotCompiledCode, comments, "[Ljdk/internal/jvmci/hotspot/HotSpotCompiledCode$Comment;")                                                \
-    objArrayOop_field(HotSpotCompiledCode, assumptions, "[Ljdk/internal/jvmci/meta/Assumptions$Assumption;")                                                     \
-    typeArrayOop_field(HotSpotCompiledCode, targetCode, "[B")                                                                                                  \
-    int_field(HotSpotCompiledCode, targetCodeSize)                                                                                                             \
-    typeArrayOop_field(HotSpotCompiledCode, dataSection, "[B")                                                                                                 \
-    int_field(HotSpotCompiledCode, dataSectionAlignment)                                                                                                       \
-    objArrayOop_field(HotSpotCompiledCode, dataSectionPatches, "[Ljdk/internal/jvmci/code/CompilationResult$DataPatch;")                                         \
-    int_field(HotSpotCompiledCode, totalFrameSize)                                                                                                             \
-    int_field(HotSpotCompiledCode, customStackAreaOffset)                                                                                                      \
-    objArrayOop_field(HotSpotCompiledCode, methods, "[Ljdk/internal/jvmci/meta/ResolvedJavaMethod;")                                                             \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotCompiledCode_Comment)                                                                                                                     \
-    oop_field(HotSpotCompiledCode_Comment, text, "Ljava/lang/String;")                                                                                         \
-    int_field(HotSpotCompiledCode_Comment, pcOffset)                                                                                                           \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotCompiledNmethod)                                                                                                                          \
-    oop_field(HotSpotCompiledNmethod, method, "Ljdk/internal/jvmci/hotspot/HotSpotResolvedJavaMethod;")                                                          \
-    oop_field(HotSpotCompiledNmethod, installationFailureMessage, "Ljava/lang/String;")                                                                        \
-    int_field(HotSpotCompiledNmethod, entryBCI)                                                                                                                \
-    int_field(HotSpotCompiledNmethod, id)                                                                                                                      \
-    long_field(HotSpotCompiledNmethod, jvmciEnv)                                                                                                               \
-    boolean_field(HotSpotCompiledNmethod, hasUnsafeAccess)                                                                                                     \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotJVMCIMetaAccessContext)                                                                                                                      \
-    static_objArrayOop_field(HotSpotJVMCIMetaAccessContext, allContexts, "[Ljava/lang/ref/WeakReference;")                                                        \
-    objArrayOop_field(HotSpotJVMCIMetaAccessContext, metadataRoots, "[Ljava/lang/Object;")                                                                        \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotForeignCallTarget)                                                                                                                        \
-    long_field(HotSpotForeignCallTarget, address)                                                                                                              \
-  end_class                                                                                                                                                    \
-  start_class(Assumptions_NoFinalizableSubclass)                                                                                                               \
-    oop_field(Assumptions_NoFinalizableSubclass, receiverType, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                     \
-  end_class                                                                                                                                                    \
-  start_class(Assumptions_ConcreteSubtype)                                                                                                                     \
-    oop_field(Assumptions_ConcreteSubtype, context, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                \
-    oop_field(Assumptions_ConcreteSubtype, subtype, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                \
-  end_class                                                                                                                                                    \
-  start_class(Assumptions_LeafType)                                                                                                                            \
-    oop_field(Assumptions_LeafType, context, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                       \
-  end_class                                                                                                                                                    \
-  start_class(Assumptions_ConcreteMethod)                                                                                                                      \
-    oop_field(Assumptions_ConcreteMethod, method, "Ljdk/internal/jvmci/meta/ResolvedJavaMethod;")                                                                \
-    oop_field(Assumptions_ConcreteMethod, context, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                 \
-    oop_field(Assumptions_ConcreteMethod, impl, "Ljdk/internal/jvmci/meta/ResolvedJavaMethod;")                                                                  \
-  end_class                                                                                                                                                    \
-  start_class(Assumptions_CallSiteTargetValue)                                                                                                                 \
-    oop_field(Assumptions_CallSiteTargetValue, callSite, "Ljava/lang/invoke/CallSite;")                                                                        \
-    oop_field(Assumptions_CallSiteTargetValue, methodHandle, "Ljava/lang/invoke/MethodHandle;")                                                                \
-  end_class                                                                                                                                                    \
-  start_class(CompilationResult_Site)                                                                                                                          \
-    int_field(CompilationResult_Site, pcOffset)                                                                                                                \
-  end_class                                                                                                                                                    \
-  start_class(CompilationResult_Call)                                                                                                                          \
-    oop_field(CompilationResult_Call, target, "Ljdk/internal/jvmci/meta/InvokeTarget;")                                                                          \
-    oop_field(CompilationResult_Call, debugInfo, "Ljdk/internal/jvmci/code/DebugInfo;")                                                                          \
-  end_class                                                                                                                                                    \
-  start_class(CompilationResult_DataPatch)                                                                                                                     \
-    oop_field(CompilationResult_DataPatch, reference, "Ljdk/internal/jvmci/code/CompilationResult$Reference;")                                                   \
-  end_class                                                                                                                                                    \
-  start_class(CompilationResult_ConstantReference)                                                                                                             \
-    oop_field(CompilationResult_ConstantReference, constant, "Ljdk/internal/jvmci/meta/VMConstant;")                                                             \
-  end_class                                                                                                                                                    \
-  start_class(CompilationResult_DataSectionReference)                                                                                                          \
-    int_field(CompilationResult_DataSectionReference, offset)                                                                                                  \
-  end_class                                                                                                                                                    \
-  start_class(InfopointReason)                                                                                                                                 \
-    static_oop_field(InfopointReason, UNKNOWN, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                      \
-    static_oop_field(InfopointReason, SAFEPOINT, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                    \
-    static_oop_field(InfopointReason, CALL, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                         \
-    static_oop_field(InfopointReason, IMPLICIT_EXCEPTION, "Ljdk/internal/jvmci/code/InfopointReason;")                                                           \
-    static_oop_field(InfopointReason, METHOD_START, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                 \
-    static_oop_field(InfopointReason, METHOD_END, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                   \
-    static_oop_field(InfopointReason, LINE_NUMBER, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                  \
-  end_class                                                                                                                                                    \
-  start_class(CompilationResult_Infopoint)                                                                                                                     \
-    oop_field(CompilationResult_Infopoint, debugInfo, "Ljdk/internal/jvmci/code/DebugInfo;")                                                                     \
-    oop_field(CompilationResult_Infopoint, reason, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                  \
-  end_class                                                                                                                                                    \
-  start_class(CompilationResult_ExceptionHandler)                                                                                                              \
-    int_field(CompilationResult_ExceptionHandler, handlerPos)                                                                                                  \
-  end_class                                                                                                                                                    \
-  start_class(CompilationResult_Mark)                                                                                                                          \
-    oop_field(CompilationResult_Mark, id, "Ljava/lang/Object;")                                                                                                \
-  end_class                                                                                                                                                    \
-  start_class(DebugInfo)                                                                                                                                       \
-    oop_field(DebugInfo, bytecodePosition, "Ljdk/internal/jvmci/code/BytecodePosition;")                                                                         \
-    oop_field(DebugInfo, referenceMap, "Ljdk/internal/jvmci/code/ReferenceMap;")                                                                                 \
-    oop_field(DebugInfo, calleeSaveInfo, "Ljdk/internal/jvmci/code/RegisterSaveLayout;")                                                                         \
-    objArrayOop_field(DebugInfo, virtualObjectMapping, "[Ljdk/internal/jvmci/code/VirtualObject;")                                                               \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotReferenceMap)                                                                                                                             \
-    objArrayOop_field(HotSpotReferenceMap, objects, "[Ljdk/internal/jvmci/code/Location;")                                                                       \
-    objArrayOop_field(HotSpotReferenceMap, derivedBase, "[Ljdk/internal/jvmci/code/Location;")                                                                   \
-    typeArrayOop_field(HotSpotReferenceMap, sizeInBytes, "[I")                                                                                                 \
-    int_field(HotSpotReferenceMap, maxRegisterSize)                                                                                                            \
-  end_class                                                                                                                                                    \
-  start_class(RegisterSaveLayout)                                                                                                                              \
-    objArrayOop_field(RegisterSaveLayout, registers, "[Ljdk/internal/jvmci/code/Register;")                                                                      \
-    typeArrayOop_field(RegisterSaveLayout, slots, "[I")                                                                                                        \
-  end_class                                                                                                                                                    \
-  start_class(BytecodeFrame)                                                                                                                                   \
-    objArrayOop_field(BytecodeFrame, values, "[Ljdk/internal/jvmci/meta/JavaValue;")                                                                           \
-    objArrayOop_field(BytecodeFrame, slotKinds, "[Ljdk/internal/jvmci/meta/JavaKind;")                                                                         \
-    int_field(BytecodeFrame, numLocals)                                                                                                                        \
-    int_field(BytecodeFrame, numStack)                                                                                                                         \
-    int_field(BytecodeFrame, numLocks)                                                                                                                         \
-    boolean_field(BytecodeFrame, rethrowException)                                                                                                             \
-    boolean_field(BytecodeFrame, duringCall)                                                                                                                   \
-    static_int_field(BytecodeFrame, BEFORE_BCI)                                                                                                                \
-  end_class                                                                                                                                                    \
-  start_class(BytecodePosition)                                                                                                                                \
-    oop_field(BytecodePosition, caller, "Ljdk/internal/jvmci/code/BytecodePosition;")                                                                            \
-    oop_field(BytecodePosition, method, "Ljdk/internal/jvmci/meta/ResolvedJavaMethod;")                                                                          \
-    int_field(BytecodePosition, bci)                                                                                                                           \
-  end_class                                                                                                                                                    \
-  start_class(JavaConstant)                                                                                                                                    \
-  end_class                                                                                                                                                    \
-  start_class(PrimitiveConstant)                                                                                                                               \
-    oop_field(PrimitiveConstant, kind, "Ljdk/internal/jvmci/meta/JavaKind;")                                                                                   \
-    long_field(PrimitiveConstant, primitive)                                                                                                                   \
-  end_class                                                                                                                                                    \
-  start_class(RawConstant)                                                                                                                                     \
-    long_field(RawConstant, primitive)                                                                                                                         \
-  end_class                                                                                                                                                    \
-  start_class(NullConstant)                                                                                                                                    \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotCompressedNullConstant)                                                                                                                   \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotObjectConstantImpl)                                                                                                                       \
-    oop_field(HotSpotObjectConstantImpl, object, "Ljava/lang/Object;")                                                                                         \
-    boolean_field(HotSpotObjectConstantImpl, compressed)                                                                                                       \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotMetaspaceConstantImpl)                                                                                                                    \
-    long_field(HotSpotMetaspaceConstantImpl, primitive)                                                                                                        \
-    oop_field(HotSpotMetaspaceConstantImpl, metaspaceObject, "Ljava/lang/Object;")                                                                             \
-    boolean_field(HotSpotMetaspaceConstantImpl, compressed)                                                                                                    \
-  end_class                                                                                                                                                    \
-  start_class(JavaKind)                                                                                                                                        \
-    char_field(JavaKind, typeChar)                                                                                                                             \
-    static_oop_field(JavaKind, Boolean, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                 \
-    static_oop_field(JavaKind, Byte, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                    \
-    static_oop_field(JavaKind, Char, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                    \
-    static_oop_field(JavaKind, Short, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                   \
-    static_oop_field(JavaKind, Int, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                     \
-    static_oop_field(JavaKind, Long, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                    \
-  end_class                                                                                                                                                    \
-  start_class(LIRKind)                                                                                                                                         \
-    oop_field(LIRKind, platformKind, "Ljdk/internal/jvmci/meta/PlatformKind;")                                                                                   \
-    int_field(LIRKind, referenceMask)                                                                                                                          \
-  end_class                                                                                                                                                    \
-  start_class(Value)                                                                                                                                           \
-    oop_field(Value, lirKind, "Ljdk/internal/jvmci/meta/LIRKind;")                                                                                             \
-    static_oop_field(Value, ILLEGAL, "Ljdk/internal/jvmci/meta/AllocatableValue;");                                                                            \
-  end_class                                                                                                                                                    \
-  start_class(RegisterValue)                                                                                                                                   \
-    oop_field(RegisterValue, reg, "Ljdk/internal/jvmci/code/Register;")                                                                                          \
-  end_class                                                                                                                                                    \
-  start_class(code_Location)                                                                                                                                   \
-    oop_field(code_Location, reg, "Ljdk/internal/jvmci/code/Register;")                                                                                          \
-    int_field(code_Location, offset)                                                                                                                           \
-  end_class                                                                                                                                                    \
-  start_class(code_Register)                                                                                                                                   \
-    int_field(code_Register, number)                                                                                                                           \
-    int_field(code_Register, encoding)                                                                                                                         \
-  end_class                                                                                                                                                    \
-  start_class(StackSlot)                                                                                                                                       \
-    int_field(StackSlot, offset)                                                                                                                               \
-    boolean_field(StackSlot, addFrameSize)                                                                                                                     \
-  end_class                                                                                                                                                    \
-  start_class(VirtualObject)                                                                                                                                   \
-    int_field(VirtualObject, id)                                                                                                                               \
-    oop_field(VirtualObject, type, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                               \
-    objArrayOop_field(VirtualObject, values, "[Ljdk/internal/jvmci/meta/JavaValue;")                                                                           \
-    objArrayOop_field(VirtualObject, slotKinds, "[Ljdk/internal/jvmci/meta/JavaKind;")                                                                         \
-  end_class                                                                                                                                                    \
-  start_class(StackLockValue)                                                                                                                                  \
-    oop_field(StackLockValue, owner, "Ljdk/internal/jvmci/meta/JavaValue;")                                                                                    \
-    oop_field(StackLockValue, slot, "Ljdk/internal/jvmci/code/StackSlotValue;")                                                                                \
-    boolean_field(StackLockValue, eliminated)                                                                                                                  \
-  end_class                                                                                                                                                    \
-  start_class(SpeculationLog)                                                                                                                                  \
-    oop_field(SpeculationLog, lastFailed, "Ljava/lang/Object;")                                                                                                \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotStackFrameReference)                                                                                                                      \
-    oop_field(HotSpotStackFrameReference, compilerToVM, "Ljdk/internal/jvmci/hotspot/CompilerToVM;")                                                             \
-    long_field(HotSpotStackFrameReference, stackPointer)                                                                                                       \
-    int_field(HotSpotStackFrameReference, frameNumber)                                                                                                         \
-    int_field(HotSpotStackFrameReference, bci)                                                                                                                 \
-    oop_field(HotSpotStackFrameReference, method, "Ljdk/internal/jvmci/hotspot/HotSpotResolvedJavaMethod;")                                                    \
-    objArrayOop_field(HotSpotStackFrameReference, locals, "[Ljava/lang/Object;")                                                                               \
-    typeArrayOop_field(HotSpotStackFrameReference, localIsVirtual, "[Z")                                                                                       \
-  end_class                                                                                                                                                    \
-  start_class(HotSpotConstantPool)                                                                                                                             \
-    long_field(HotSpotConstantPool, metaspaceConstantPool)                                                                                                     \
-  end_class                                                                                                                                                    \
-  /* end*/
-
-#define START_CLASS(name)                                                                                                                                      \
-class name : AllStatic {                                                                                                                                       \
-  private:                                                                                                                                                     \
-    friend class JVMCICompiler;                                                                                                                                \
-    static void check(oop obj, const char* field_name, int offset) {                                                                                           \
-        assert(obj != NULL, err_msg("NULL field access of %s.%s", #name, field_name));                                                                         \
-        assert(obj->is_a(SystemDictionary::name##_klass()), err_msg("wrong class, " #name " expected, found %s", obj->klass()->external_name())); \
-        assert(offset != 0, "must be valid offset");                                                                                                           \
-    }                                                                                                                                                          \
-    static void compute_offsets();                                                                                                                             \
-  public:                                                                                                                                                      \
-    static InstanceKlass* klass() { return SystemDictionary::name##_klass() == NULL ? NULL : InstanceKlass::cast(SystemDictionary::name##_klass()); }
-
-#define END_CLASS };
-
-#define FIELD(name, type, accessor, cast)                                                                                                                         \
-    static int _##name##_offset;                                                                                                                                  \
-    static type name(oop obj)                   { check(obj, #name, _##name##_offset); return cast obj->accessor(_##name##_offset); }                                               \
-    static type name(Handle& obj)                { check(obj(), #name, _##name##_offset); return cast obj->accessor(_##name##_offset); }                                            \
-    static type name(jobject obj)               { check(JNIHandles::resolve(obj), #name, _##name##_offset); return cast JNIHandles::resolve(obj)->accessor(_##name##_offset); }     \
-    static void set_##name(oop obj, type x)     { check(obj, #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); }                                                  \
-    static void set_##name(Handle& obj, type x)  { check(obj(), #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); }                                               \
-    static void set_##name(jobject obj, type x) { check(JNIHandles::resolve(obj), #name, _##name##_offset); JNIHandles::resolve(obj)->accessor##_put(_##name##_offset, x); }
-
-#define EMPTY_CAST 
-#define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field, EMPTY_CAST)
-#define INT_FIELD(klass, name) FIELD(name, jint, int_field, EMPTY_CAST)
-#define BOOLEAN_FIELD(klass, name) FIELD(name, jboolean, bool_field, EMPTY_CAST)
-#define LONG_FIELD(klass, name) FIELD(name, jlong, long_field, EMPTY_CAST)
-#define FLOAT_FIELD(klass, name) FIELD(name, jfloat, float_field, EMPTY_CAST)
-#define OOP_FIELD(klass, name, signature) FIELD(name, oop, obj_field, EMPTY_CAST)
-#define OBJARRAYOOP_FIELD(klass, name, signature) FIELD(name, objArrayOop, obj_field, (objArrayOop))
-#define TYPEARRAYOOP_FIELD(klass, name, signature) FIELD(name, typeArrayOop, obj_field, (typeArrayOop))
-#define STATIC_OOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, oop, signature)
-#define STATIC_OBJARRAYOOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, objArrayOop, signature)
-#define STATIC_OOPISH_FIELD(klassName, name, type, signature)                                                  \
-    static int _##name##_offset;                                                                               \
-    static type name() {                                                                                       \
-      assert(klassName::klass() != NULL && klassName::klass()->is_linked(), "Class not yet linked: " #klassName); \
-      InstanceKlass* ik = klassName::klass();                                                                  \
-      address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
-      if (UseCompressedOops) {                                                                                 \
-        return (type) oopDesc::load_decode_heap_oop((narrowOop *)addr);                                        \
-      } else {                                                                                                 \
-        return (type) oopDesc::load_decode_heap_oop((oop*)addr);                                               \
-      }                                                                                                        \
-    }                                                                                                          \
-    static void set_##name(type x) {                                                                           \
-      assert(klassName::klass() != NULL && klassName::klass()->is_linked(), "Class not yet linked: " #klassName); \
-      assert(klassName::klass() != NULL, "Class not yet loaded: " #klassName);                                 \
-      InstanceKlass* ik = klassName::klass();                                                                  \
-      address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
-      if (UseCompressedOops) {                                                                                 \
-        oop_store((narrowOop *)addr, x);                                                                       \
-      } else {                                                                                                 \
-        oop_store((oop*)addr, x);                                                                              \
-      }                                                                                                        \
-    }
-#define STATIC_PRIMITIVE_FIELD(klassName, name, jtypename)                                                     \
-    static int _##name##_offset;                                                                               \
-    static jtypename name() {                                                                                  \
-      assert(klassName::klass() != NULL && klassName::klass()->is_linked(), "Class not yet linked: " #klassName); \
-      InstanceKlass* ik = klassName::klass();                                                                  \
-      address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
-      return *((jtypename *)addr);                                                                             \
-    }                                                                                                          \
-    static void set_##name(jtypename x) {                                                                      \
-      assert(klassName::klass() != NULL && klassName::klass()->is_linked(), "Class not yet linked: " #klassName); \
-      InstanceKlass* ik = klassName::klass();                                                                  \
-      address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
-      *((jtypename *)addr) = x;                                                                                \
-    }
-
-#define STATIC_INT_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, jint)
-#define STATIC_BOOLEAN_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, jboolean)
-
-COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, TYPEARRAYOOP_FIELD, OBJARRAYOOP_FIELD, STATIC_OOP_FIELD, STATIC_OBJARRAYOOP_FIELD, STATIC_INT_FIELD, STATIC_BOOLEAN_FIELD)
-#undef START_CLASS
-#undef END_CLASS
-#undef FIELD
-#undef CHAR_FIELD
-#undef INT_FIELD
-#undef BOOLEAN_FIELD
-#undef LONG_FIELD
-#undef FLOAT_FIELD
-#undef OOP_FIELD
-#undef TYPEARRAYOOP_FIELD
-#undef OBJARRAYOOP_FIELD
-#undef STATIC_OOPISH_FIELD
-#undef STATIC_OOP_FIELD
-#undef STATIC_OBJARRAYOOP_FIELD
-#undef STATIC_INT_FIELD
-#undef STATIC_BOOLEAN_FIELD
-#undef EMPTY_CAST
-
-void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field);
-
-#endif // SHARE_VM_JVMCI_JVMCI_JAVA_ACCESS_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/vm/jvmci/jvmciJavaClasses.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2011, 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.
+ */
+
+#include "precompiled.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
+#include "runtime/jniHandles.hpp"
+#include "classfile/symbolTable.hpp"
+// This function is similar to javaClasses.cpp, it computes the field offset of a (static or instance) field.
+// It looks up the name and signature symbols without creating new ones, all the symbols of these classes need to be already loaded.
+
+void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field) {
+  InstanceKlass* ik = InstanceKlass::cast(klass);
+  Symbol* name_symbol = SymbolTable::probe(name, (int)strlen(name));
+  Symbol* signature_symbol = SymbolTable::probe(signature, (int)strlen(signature));
+  if (name_symbol == NULL || signature_symbol == NULL) {
+#ifndef PRODUCT
+    ik->print_on(tty);
+#endif
+    fatal(err_msg("symbol with name %s and signature %s was not found in symbol table (klass=%s)", name, signature, klass->name()->as_C_string()));
+  }
+
+  fieldDescriptor fd;
+  if (!ik->find_field(name_symbol, signature_symbol, &fd)) {
+    ResourceMark rm;
+    fatal(err_msg("Invalid layout of %s at %s", name_symbol->as_C_string(), ik->external_name()));
+  }
+  guarantee(fd.is_static() == static_field, "static/instance mismatch");
+  dest_offset = fd.offset();
+  assert(dest_offset != 0, "must be valid offset");
+}
+
+// This piece of macro magic creates the contents of the jvmci_compute_offsets method that initializes the field indices of all the access classes.
+
+#define START_CLASS(name) { Klass* k = SystemDictionary::name##_klass(); assert(k != NULL, "Could not find class " #name "");
+
+#define END_CLASS }
+
+#define FIELD(klass, name, signature, static_field) compute_offset(klass::_##name##_offset, k, #name, signature, static_field);
+#define CHAR_FIELD(klass, name) FIELD(klass, name, "C", false)
+#define INT_FIELD(klass, name) FIELD(klass, name, "I", false)
+#define BOOLEAN_FIELD(klass, name) FIELD(klass, name, "Z", false)
+#define LONG_FIELD(klass, name) FIELD(klass, name, "J", false)
+#define FLOAT_FIELD(klass, name) FIELD(klass, name, "F", false)
+#define OOP_FIELD(klass, name, signature) FIELD(klass, name, signature, false)
+#define STATIC_OOP_FIELD(klass, name, signature) FIELD(klass, name, signature, true)
+#define STATIC_INT_FIELD(klass, name) FIELD(klass, name, "I", true)
+#define STATIC_BOOLEAN_FIELD(klass, name) FIELD(klass, name, "Z", true)
+
+
+void jvmci_compute_offsets() {
+  COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, OOP_FIELD, OOP_FIELD, STATIC_OOP_FIELD, STATIC_OOP_FIELD, STATIC_INT_FIELD, STATIC_BOOLEAN_FIELD)
+  guarantee(InstalledCode::_address_offset == sizeof(oopDesc), "codeBlob must be first field!");
+}
+
+#define EMPTY0
+#define EMPTY1(x)
+#define EMPTY2(x,y)
+#define FIELD2(klass, name) int klass::_##name##_offset = 0;
+#define FIELD3(klass, name, sig) FIELD2(klass, name)
+
+COMPILER_CLASSES_DO(EMPTY1, EMPTY0, FIELD2, FIELD2, FIELD2, FIELD2, FIELD2, FIELD3, FIELD3, FIELD3, FIELD3, FIELD3, FIELD2, FIELD2)
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/vm/jvmci/jvmciJavaClasses.hpp	Wed Sep 09 17:56:30 2015 -0700
@@ -0,0 +1,374 @@
+/*
+ * Copyright (c) 2011, 2015, 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.
+ */
+
+#ifndef SHARE_VM_JVMCI_JVMCIJAVACLASSES_HPP
+#define SHARE_VM_JVMCI_JVMCIJAVACLASSES_HPP
+
+void jvmci_compute_offsets();
+
+#include "classfile/systemDictionary.hpp"
+#include "oops/instanceMirrorKlass.hpp"
+
+/* This macro defines the structure of the CompilationResult - classes.
+ * It will generate classes with accessors similar to javaClasses.hpp, but with specializations for oops, Handles and jni handles.
+ *
+ * The public interface of these classes will look like this:
+
+ * class StackSlot : AllStatic {
+ * public:
+ *   static Klass* klass();
+ *   static jint  index(oop obj);
+ *   static jint  index(Handle obj);
+ *   static jint  index(jobject obj);
+ *   static void set_index(oop obj, jint x);
+ *   static void set_index(Handle obj, jint x);
+ *   static void set_index(jobject obj, jint x);
+ * };
+ *
+ */
+
+#define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, boolean_field, long_field, float_field, oop_field, typeArrayOop_field, objArrayOop_field, static_oop_field, static_objArrayOop_field, static_int_field, static_boolean_field) \
+  start_class(Architecture)                                                                                                                                    \
+    oop_field(Architecture, wordKind, "Ljdk/internal/jvmci/meta/PlatformKind;")                                                                                \
+  end_class                                                                                                                                                    \
+  start_class(TargetDescription)                                                                                                                               \
+    oop_field(TargetDescription, arch, "Ljdk/internal/jvmci/code/Architecture;")                                                                               \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotResolvedObjectTypeImpl)                                                                                                                   \
+    oop_field(HotSpotResolvedObjectTypeImpl, javaClass, "Ljava/lang/Class;")                                                                                   \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotResolvedJavaMethodImpl)                                                                                                                   \
+    long_field(HotSpotResolvedJavaMethodImpl, metaspaceMethod)                                                                                                 \
+  end_class                                                                                                                                                    \
+  start_class(InstalledCode)                                                                                                                                   \
+    long_field(InstalledCode, address)                                                                                                                         \
+    long_field(InstalledCode, version)                                                                                                                         \
+    oop_field(InstalledCode, name, "Ljava/lang/String;")                                                                                                       \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotInstalledCode)                                                                                                                            \
+    int_field(HotSpotInstalledCode, size)                                                                                                                      \
+    long_field(HotSpotInstalledCode, codeStart)                                                                                                                \
+    int_field(HotSpotInstalledCode, codeSize)                                                                                                                  \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotNmethod)                                                                                                                                  \
+    boolean_field(HotSpotNmethod, isDefault)                                                                                                                   \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotCompiledCode)                                                                                                                             \
+    oop_field(HotSpotCompiledCode, name, "Ljava/lang/String;")                                                                                                 \
+    objArrayOop_field(HotSpotCompiledCode, sites, "[Ljdk/internal/jvmci/code/CompilationResult$Site;")                                                           \
+    objArrayOop_field(HotSpotCompiledCode, exceptionHandlers, "[Ljdk/internal/jvmci/code/CompilationResult$ExceptionHandler;")                                   \
+    objArrayOop_field(HotSpotCompiledCode, comments, "[Ljdk/internal/jvmci/hotspot/HotSpotCompiledCode$Comment;")                                                \
+    objArrayOop_field(HotSpotCompiledCode, assumptions, "[Ljdk/internal/jvmci/meta/Assumptions$Assumption;")                                                     \
+    typeArrayOop_field(HotSpotCompiledCode, targetCode, "[B")                                                                                                  \
+    int_field(HotSpotCompiledCode, targetCodeSize)                                                                                                             \
+    typeArrayOop_field(HotSpotCompiledCode, dataSection, "[B")                                                                                                 \
+    int_field(HotSpotCompiledCode, dataSectionAlignment)                                                                                                       \
+    objArrayOop_field(HotSpotCompiledCode, dataSectionPatches, "[Ljdk/internal/jvmci/code/CompilationResult$DataPatch;")                                         \
+    int_field(HotSpotCompiledCode, totalFrameSize)                                                                                                             \
+    int_field(HotSpotCompiledCode, customStackAreaOffset)                                                                                                      \
+    objArrayOop_field(HotSpotCompiledCode, methods, "[Ljdk/internal/jvmci/meta/ResolvedJavaMethod;")                                                             \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotCompiledCode_Comment)                                                                                                                     \
+    oop_field(HotSpotCompiledCode_Comment, text, "Ljava/lang/String;")                                                                                         \
+    int_field(HotSpotCompiledCode_Comment, pcOffset)                                                                                                           \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotCompiledNmethod)                                                                                                                          \
+    oop_field(HotSpotCompiledNmethod, method, "Ljdk/internal/jvmci/hotspot/HotSpotResolvedJavaMethod;")                                                          \
+    oop_field(HotSpotCompiledNmethod, installationFailureMessage, "Ljava/lang/String;")                                                                        \
+    int_field(HotSpotCompiledNmethod, entryBCI)                                                                                                                \
+    int_field(HotSpotCompiledNmethod, id)                                                                                                                      \
+    long_field(HotSpotCompiledNmethod, jvmciEnv)                                                                                                               \
+    boolean_field(HotSpotCompiledNmethod, hasUnsafeAccess)                                                                                                     \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotJVMCIMetaAccessContext)                                                                                                                      \
+    static_objArrayOop_field(HotSpotJVMCIMetaAccessContext, allContexts, "[Ljava/lang/ref/WeakReference;")                                                        \
+    objArrayOop_field(HotSpotJVMCIMetaAccessContext, metadataRoots, "[Ljava/lang/Object;")                                                                        \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotForeignCallTarget)                                                                                                                        \
+    long_field(HotSpotForeignCallTarget, address)                                                                                                              \
+  end_class                                                                                                                                                    \
+  start_class(Assumptions_NoFinalizableSubclass)                                                                                                               \
+    oop_field(Assumptions_NoFinalizableSubclass, receiverType, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                     \
+  end_class                                                                                                                                                    \
+  start_class(Assumptions_ConcreteSubtype)                                                                                                                     \
+    oop_field(Assumptions_ConcreteSubtype, context, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                \
+    oop_field(Assumptions_ConcreteSubtype, subtype, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                \
+  end_class                                                                                                                                                    \
+  start_class(Assumptions_LeafType)                                                                                                                            \
+    oop_field(Assumptions_LeafType, context, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                       \
+  end_class                                                                                                                                                    \
+  start_class(Assumptions_ConcreteMethod)                                                                                                                      \
+    oop_field(Assumptions_ConcreteMethod, method, "Ljdk/internal/jvmci/meta/ResolvedJavaMethod;")                                                                \
+    oop_field(Assumptions_ConcreteMethod, context, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                 \
+    oop_field(Assumptions_ConcreteMethod, impl, "Ljdk/internal/jvmci/meta/ResolvedJavaMethod;")                                                                  \
+  end_class                                                                                                                                                    \
+  start_class(Assumptions_CallSiteTargetValue)                                                                                                                 \
+    oop_field(Assumptions_CallSiteTargetValue, callSite, "Ljava/lang/invoke/CallSite;")                                                                        \
+    oop_field(Assumptions_CallSiteTargetValue, methodHandle, "Ljava/lang/invoke/MethodHandle;")                                                                \
+  end_class                                                                                                                                                    \
+  start_class(CompilationResult_Site)                                                                                                                          \
+    int_field(CompilationResult_Site, pcOffset)                                                                                                                \
+  end_class                                                                                                                                                    \
+  start_class(CompilationResult_Call)                                                                                                                          \
+    oop_field(CompilationResult_Call, target, "Ljdk/internal/jvmci/meta/InvokeTarget;")                                                                          \
+    oop_field(CompilationResult_Call, debugInfo, "Ljdk/internal/jvmci/code/DebugInfo;")                                                                          \
+  end_class                                                                                                                                                    \
+  start_class(CompilationResult_DataPatch)                                                                                                                     \
+    oop_field(CompilationResult_DataPatch, reference, "Ljdk/internal/jvmci/code/CompilationResult$Reference;")                                                   \
+  end_class                                                                                                                                                    \
+  start_class(CompilationResult_ConstantReference)                                                                                                             \
+    oop_field(CompilationResult_ConstantReference, constant, "Ljdk/internal/jvmci/meta/VMConstant;")                                                             \
+  end_class                                                                                                                                                    \
+  start_class(CompilationResult_DataSectionReference)                                                                                                          \
+    int_field(CompilationResult_DataSectionReference, offset)                                                                                                  \
+  end_class                                                                                                                                                    \
+  start_class(InfopointReason)                                                                                                                                 \
+    static_oop_field(InfopointReason, UNKNOWN, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                      \
+    static_oop_field(InfopointReason, SAFEPOINT, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                    \
+    static_oop_field(InfopointReason, CALL, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                         \
+    static_oop_field(InfopointReason, IMPLICIT_EXCEPTION, "Ljdk/internal/jvmci/code/InfopointReason;")                                                           \
+    static_oop_field(InfopointReason, METHOD_START, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                 \
+    static_oop_field(InfopointReason, METHOD_END, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                   \
+    static_oop_field(InfopointReason, LINE_NUMBER, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                  \
+  end_class                                                                                                                                                    \
+  start_class(CompilationResult_Infopoint)                                                                                                                     \
+    oop_field(CompilationResult_Infopoint, debugInfo, "Ljdk/internal/jvmci/code/DebugInfo;")                                                                     \
+    oop_field(CompilationResult_Infopoint, reason, "Ljdk/internal/jvmci/code/InfopointReason;")                                                                  \
+  end_class                                                                                                                                                    \
+  start_class(CompilationResult_ExceptionHandler)                                                                                                              \
+    int_field(CompilationResult_ExceptionHandler, handlerPos)                                                                                                  \
+  end_class                                                                                                                                                    \
+  start_class(CompilationResult_Mark)                                                                                                                          \
+    oop_field(CompilationResult_Mark, id, "Ljava/lang/Object;")                                                                                                \
+  end_class                                                                                                                                                    \
+  start_class(DebugInfo)                                                                                                                                       \
+    oop_field(DebugInfo, bytecodePosition, "Ljdk/internal/jvmci/code/BytecodePosition;")                                                                         \
+    oop_field(DebugInfo, referenceMap, "Ljdk/internal/jvmci/code/ReferenceMap;")                                                                                 \
+    oop_field(DebugInfo, calleeSaveInfo, "Ljdk/internal/jvmci/code/RegisterSaveLayout;")                                                                         \
+    objArrayOop_field(DebugInfo, virtualObjectMapping, "[Ljdk/internal/jvmci/code/VirtualObject;")                                                               \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotReferenceMap)                                                                                                                             \
+    objArrayOop_field(HotSpotReferenceMap, objects, "[Ljdk/internal/jvmci/code/Location;")                                                                       \
+    objArrayOop_field(HotSpotReferenceMap, derivedBase, "[Ljdk/internal/jvmci/code/Location;")                                                                   \
+    typeArrayOop_field(HotSpotReferenceMap, sizeInBytes, "[I")                                                                                                 \
+    int_field(HotSpotReferenceMap, maxRegisterSize)                                                                                                            \
+  end_class                                                                                                                                                    \
+  start_class(RegisterSaveLayout)                                                                                                                              \
+    objArrayOop_field(RegisterSaveLayout, registers, "[Ljdk/internal/jvmci/code/Register;")                                                                      \
+    typeArrayOop_field(RegisterSaveLayout, slots, "[I")                                                                                                        \
+  end_class                                                                                                                                                    \
+  start_class(BytecodeFrame)                                                                                                                                   \
+    objArrayOop_field(BytecodeFrame, values, "[Ljdk/internal/jvmci/meta/JavaValue;")                                                                           \
+    objArrayOop_field(BytecodeFrame, slotKinds, "[Ljdk/internal/jvmci/meta/JavaKind;")                                                                         \
+    int_field(BytecodeFrame, numLocals)                                                                                                                        \
+    int_field(BytecodeFrame, numStack)                                                                                                                         \
+    int_field(BytecodeFrame, numLocks)                                                                                                                         \
+    boolean_field(BytecodeFrame, rethrowException)                                                                                                             \
+    boolean_field(BytecodeFrame, duringCall)                                                                                                                   \
+    static_int_field(BytecodeFrame, BEFORE_BCI)                                                                                                                \
+  end_class                                                                                                                                                    \
+  start_class(BytecodePosition)                                                                                                                                \
+    oop_field(BytecodePosition, caller, "Ljdk/internal/jvmci/code/BytecodePosition;")                                                                            \
+    oop_field(BytecodePosition, method, "Ljdk/internal/jvmci/meta/ResolvedJavaMethod;")                                                                          \
+    int_field(BytecodePosition, bci)                                                                                                                           \
+  end_class                                                                                                                                                    \
+  start_class(JavaConstant)                                                                                                                                    \
+  end_class                                                                                                                                                    \
+  start_class(PrimitiveConstant)                                                                                                                               \
+    oop_field(PrimitiveConstant, kind, "Ljdk/internal/jvmci/meta/JavaKind;")                                                                                   \
+    long_field(PrimitiveConstant, primitive)                                                                                                                   \
+  end_class                                                                                                                                                    \
+  start_class(RawConstant)                                                                                                                                     \
+    long_field(RawConstant, primitive)                                                                                                                         \
+  end_class                                                                                                                                                    \
+  start_class(NullConstant)                                                                                                                                    \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotCompressedNullConstant)                                                                                                                   \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotObjectConstantImpl)                                                                                                                       \
+    oop_field(HotSpotObjectConstantImpl, object, "Ljava/lang/Object;")                                                                                         \
+    boolean_field(HotSpotObjectConstantImpl, compressed)                                                                                                       \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotMetaspaceConstantImpl)                                                                                                                    \
+    long_field(HotSpotMetaspaceConstantImpl, primitive)                                                                                                        \
+    oop_field(HotSpotMetaspaceConstantImpl, metaspaceObject, "Ljava/lang/Object;")                                                                             \
+    boolean_field(HotSpotMetaspaceConstantImpl, compressed)                                                                                                    \
+  end_class                                                                                                                                                    \
+  start_class(JavaKind)                                                                                                                                        \
+    char_field(JavaKind, typeChar)                                                                                                                             \
+    static_oop_field(JavaKind, Boolean, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                 \
+    static_oop_field(JavaKind, Byte, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                    \
+    static_oop_field(JavaKind, Char, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                    \
+    static_oop_field(JavaKind, Short, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                   \
+    static_oop_field(JavaKind, Int, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                     \
+    static_oop_field(JavaKind, Long, "Ljdk/internal/jvmci/meta/JavaKind;");                                                                                    \
+  end_class                                                                                                                                                    \
+  start_class(LIRKind)                                                                                                                                         \
+    oop_field(LIRKind, platformKind, "Ljdk/internal/jvmci/meta/PlatformKind;")                                                                                   \
+    int_field(LIRKind, referenceMask)                                                                                                                          \
+  end_class                                                                                                                                                    \
+  start_class(Value)                                                                                                                                           \
+    oop_field(Value, lirKind, "Ljdk/internal/jvmci/meta/LIRKind;")                                                                                             \
+    static_oop_field(Value, ILLEGAL, "Ljdk/internal/jvmci/meta/AllocatableValue;");                                                                            \
+  end_class                                                                                                                                                    \
+  start_class(RegisterValue)                                                                                                                                   \
+    oop_field(RegisterValue, reg, "Ljdk/internal/jvmci/code/Register;")                                                                                          \
+  end_class                                                                                                                                                    \
+  start_class(code_Location)                                                                                                                                   \
+    oop_field(code_Location, reg, "Ljdk/internal/jvmci/code/Register;")                                                                                          \
+    int_field(code_Location, offset)                                                                                                                           \
+  end_class                                                                                                                                                    \
+  start_class(code_Register)                                                                                                                                   \
+    int_field(code_Register, number)                                                                                                                           \
+    int_field(code_Register, encoding)                                                                                                                         \
+  end_class                                                                                                                                                    \
+  start_class(StackSlot)                                                                                                                                       \
+    int_field(StackSlot, offset)                                                                                                                               \
+    boolean_field(StackSlot, addFrameSize)                                                                                                                     \
+  end_class                                                                                                                                                    \
+  start_class(VirtualObject)                                                                                                                                   \
+    int_field(VirtualObject, id)                                                                                                                               \
+    oop_field(VirtualObject, type, "Ljdk/internal/jvmci/meta/ResolvedJavaType;")                                                                               \
+    objArrayOop_field(VirtualObject, values, "[Ljdk/internal/jvmci/meta/JavaValue;")                                                                           \
+    objArrayOop_field(VirtualObject, slotKinds, "[Ljdk/internal/jvmci/meta/JavaKind;")                                                                         \
+  end_class                                                                                                                                                    \
+  start_class(StackLockValue)                                                                                                                                  \
+    oop_field(StackLockValue, owner, "Ljdk/internal/jvmci/meta/JavaValue;")                                                                                    \
+    oop_field(StackLockValue, slot, "Ljdk/internal/jvmci/code/StackSlotValue;")                                                                                \
+    boolean_field(StackLockValue, eliminated)                                                                                                                  \
+  end_class                                                                                                                                                    \
+  start_class(SpeculationLog)                                                                                                                                  \
+    oop_field(SpeculationLog, lastFailed, "Ljava/lang/Object;")                                                                                                \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotStackFrameReference)                                                                                                                      \
+    oop_field(HotSpotStackFrameReference, compilerToVM, "Ljdk/internal/jvmci/hotspot/CompilerToVM;")                                                             \
+    long_field(HotSpotStackFrameReference, stackPointer)                                                                                                       \
+    int_field(HotSpotStackFrameReference, frameNumber)                                                                                                         \
+    int_field(HotSpotStackFrameReference, bci)                                                                                                                 \
+    oop_field(HotSpotStackFrameReference, method, "Ljdk/internal/jvmci/hotspot/HotSpotResolvedJavaMethod;")                                                    \
+    objArrayOop_field(HotSpotStackFrameReference, locals, "[Ljava/lang/Object;")                                                                               \
+    typeArrayOop_field(HotSpotStackFrameReference, localIsVirtual, "[Z")                                                                                       \
+  end_class                                                                                                                                                    \
+  start_class(HotSpotConstantPool)                                                                                                                             \
+    long_field(HotSpotConstantPool, metaspaceConstantPool)                                                                                                     \
+  end_class                                                                                                                                                    \
+  /* end*/
+
+#define START_CLASS(name)                                                                                                                                      \
+class name : AllStatic {                                                                                                                                       \
+  private:                                                                                                                                                     \
+    friend class JVMCICompiler;                                                                                                                                \
+    static void check(oop obj, const char* field_name, int offset) {                                                                                           \
+        assert(obj != NULL, err_msg("NULL field access of %s.%s", #name, field_name));                                                                         \
+        assert(obj->is_a(SystemDictionary::name##_klass()), err_msg("wrong class, " #name " expected, found %s", obj->klass()->external_name())); \
+        assert(offset != 0, "must be valid offset");                                                                                                           \
+    }                                                                                                                                                          \
+    static void compute_offsets();                                                                                                                             \
+  public:                                                                                                                                                      \
+    static InstanceKlass* klass() { return SystemDictionary::name##_klass() == NULL ? NULL : InstanceKlass::cast(SystemDictionary::name##_klass()); }
+
+#define END_CLASS };
+
+#define FIELD(name, type, accessor, cast)                                                                                                                         \
+    static int _##name##_offset;                                                                                                                                  \
+    static type name(oop obj)                   { check(obj, #name, _##name##_offset); return cast obj->accessor(_##name##_offset); }                                               \
+    static type name(Handle& obj)                { check(obj(), #name, _##name##_offset); return cast obj->accessor(_##name##_offset); }                                            \
+    static type name(jobject obj)               { check(JNIHandles::resolve(obj), #name, _##name##_offset); return cast JNIHandles::resolve(obj)->accessor(_##name##_offset); }     \
+    static void set_##name(oop obj, type x)     { check(obj, #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); }                                                  \
+    static void set_##name(Handle& obj, type x)  { check(obj(), #name, _##name##_offset); obj->accessor##_put(_##name##_offset, x); }                                               \
+    static void set_##name(jobject obj, type x) { check(JNIHandles::resolve(obj), #name, _##name##_offset); JNIHandles::resolve(obj)->accessor##_put(_##name##_offset, x); }
+
+#define EMPTY_CAST 
+#define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field, EMPTY_CAST)
+#define INT_FIELD(klass, name) FIELD(name, jint, int_field, EMPTY_CAST)
+#define BOOLEAN_FIELD(klass, name) FIELD(name, jboolean, bool_field, EMPTY_CAST)
+#define LONG_FIELD(klass, name) FIELD(name, jlong, long_field, EMPTY_CAST)
+#define FLOAT_FIELD(klass, name) FIELD(name, jfloat, float_field, EMPTY_CAST)
+#define OOP_FIELD(klass, name, signature) FIELD(name, oop, obj_field, EMPTY_CAST)
+#define OBJARRAYOOP_FIELD(klass, name, signature) FIELD(name, objArrayOop, obj_field, (objArrayOop))
+#define TYPEARRAYOOP_FIELD(klass, name, signature) FIELD(name, typeArrayOop, obj_field, (typeArrayOop))
+#define STATIC_OOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, oop, signature)
+#define STATIC_OBJARRAYOOP_FIELD(klassName, name, signature) STATIC_OOPISH_FIELD(klassName, name, objArrayOop, signature)
+#define STATIC_OOPISH_FIELD(klassName, name, type, signature)                                                  \
+    static int _##name##_offset;                                                                               \
+    static type name() {                                                                                       \
+      assert(klassName::klass() != NULL && klassName::klass()->is_linked(), "Class not yet linked: " #klassName); \
+      InstanceKlass* ik = klassName::klass();                                                                  \
+      address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
+      if (UseCompressedOops) {                                                                                 \
+        return (type) oopDesc::load_decode_heap_oop((narrowOop *)addr);                                        \
+      } else {                                                                                                 \
+        return (type) oopDesc::load_decode_heap_oop((oop*)addr);                                               \
+      }                                                                                                        \
+    }                                                                                                          \
+    static void set_##name(type x) {                                                                           \
+      assert(klassName::klass() != NULL && klassName::klass()->is_linked(), "Class not yet linked: " #klassName); \
+      assert(klassName::klass() != NULL, "Class not yet loaded: " #klassName);                                 \
+      InstanceKlass* ik = klassName::klass();                                                                  \
+      address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
+      if (UseCompressedOops) {                                                                                 \
+        oop_store((narrowOop *)addr, x);                                                                       \
+      } else {                                                                                                 \
+        oop_store((oop*)addr, x);                                                                              \
+      }                                                                                                        \
+    }
+#define STATIC_PRIMITIVE_FIELD(klassName, name, jtypename)                                                     \
+    static int _##name##_offset;                                                                               \
+    static jtypename name() {                                                                                  \
+      assert(klassName::klass() != NULL && klassName::klass()->is_linked(), "Class not yet linked: " #klassName); \
+      InstanceKlass* ik = klassName::klass();                                                                  \
+      address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
+      return *((jtypename *)addr);                                                                             \
+    }                                                                                                          \
+    static void set_##name(jtypename x) {                                                                      \
+      assert(klassName::klass() != NULL && klassName::klass()->is_linked(), "Class not yet linked: " #klassName); \
+      InstanceKlass* ik = klassName::klass();                                                                  \
+      address addr = ik->static_field_addr(_##name##_offset - InstanceMirrorKlass::offset_of_static_fields()); \
+      *((jtypename *)addr) = x;                                                                                \
+    }
+
+#define STATIC_INT_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, jint)
+#define STATIC_BOOLEAN_FIELD(klassName, name) STATIC_PRIMITIVE_FIELD(klassName, name, jboolean)
+
+COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, TYPEARRAYOOP_FIELD, OBJARRAYOOP_FIELD, STATIC_OOP_FIELD, STATIC_OBJARRAYOOP_FIELD, STATIC_INT_FIELD, STATIC_BOOLEAN_FIELD)
+#undef START_CLASS
+#undef END_CLASS
+#undef FIELD
+#undef CHAR_FIELD
+#undef INT_FIELD
+#undef BOOLEAN_FIELD
+#undef LONG_FIELD
+#undef FLOAT_FIELD
+#undef OOP_FIELD
+#undef TYPEARRAYOOP_FIELD
+#undef OBJARRAYOOP_FIELD
+#undef STATIC_OOPISH_FIELD
+#undef STATIC_OOP_FIELD
+#undef STATIC_OBJARRAYOOP_FIELD
+#undef STATIC_INT_FIELD
+#undef STATIC_BOOLEAN_FIELD
+#undef EMPTY_CAST
+
+void compute_offset(int &dest_offset, Klass* klass, const char* name, const char* signature, bool static_field);
+
+#endif // SHARE_VM_JVMCI_JVMCIJAVACLASSES_HPP
--- a/src/share/vm/jvmci/jvmciRuntime.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/share/vm/jvmci/jvmciRuntime.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -29,7 +29,7 @@
 #include "jvmci/jvmciRuntime.hpp"
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciCompiler.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #include "jvmci/jvmciEnv.hpp"
 #include "memory/oopFactory.hpp"
 #include "oops/oop.inline.hpp"
--- a/src/share/vm/runtime/deoptimization.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/share/vm/runtime/deoptimization.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -94,7 +94,7 @@
 
 #if INCLUDE_JVMCI
 #include "jvmci/jvmciRuntime.hpp"
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #endif
 
 
--- a/src/share/vm/runtime/javaCalls.cpp	Wed Sep 09 22:12:31 2015 +0200
+++ b/src/share/vm/runtime/javaCalls.cpp	Wed Sep 09 17:56:30 2015 -0700
@@ -41,7 +41,7 @@
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.inline.hpp"
 #if INCLUDE_JVMCI
-#include "jvmci/jvmciJavaAccess.hpp"
+#include "jvmci/jvmciJavaClasses.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #endif