harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r525110 [1/4] - in /harmony/enhanced/drlvm/trunk/vm: include/ include/open/ jitrino/src/codegenerator/ jitrino/src/codegenerator/ia32/ jitrino/src/codegenerator/ipf/ jitrino/src/codegenerator/ipf/include/ jitrino/src/dynopt/ jitrino/src/jet...
Date Tue, 03 Apr 2007 09:30:36 GMT
Author: varlax
Date: Tue Apr  3 02:30:33 2007
New Revision: 525110

URL: http://svn.apache.org/viewvc?view=rev&rev=525110
Log:
Fixed HARMONY-3511 [drlvm][jit] redundant layer in Jitrino interfaces removed.
Tested on ia32, x64, IPF

Modified:
    harmony/enhanced/drlvm/trunk/vm/include/jit_import.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeSupport.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfEncoder.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfRuntimeInterface.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/JITInstanceContext.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMFAction.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/CodeGenerator.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opnd.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optimizer.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/syncopt.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Exceptions.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/PlatformDependant.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/PrintDotFile.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/PrintDotFile.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/methodtable.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/TranslatorIntfc.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeParser.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/EMInterface.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlEMInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlEMInterface.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlJITInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlVMInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/drl/DrlVMInterface.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/include/jit_import.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jit_import.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_import.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_import.h Tue Apr  3 02:30:33 2007
@@ -297,8 +297,9 @@
 
 /**
  * The following values should be used as the "heat" argument for 
- * calls like method_allocate_code_block() or 
+ * calls like  
  * <code>malloc_fixed_code_for_jit()</code>.
+ * FIXME merge with CodeBlockHeat enumeration
  */
 
 #define CODE_BLOCK_HEAT_COLD 0
@@ -313,6 +314,15 @@
     CAA_Simulate,
     CAA_Allocate
 }Code_Allocation_Action;
+
+//
+// Code block heat - used when a method is split into hot and cold parts
+//
+typedef enum {
+    CodeBlockHeatMin,
+    CodeBlockHeatDefault,
+    CodeBlockHeatMax
+} CodeBlockHeat;
  
 
 /**
@@ -336,7 +346,7 @@
                            JIT_Handle j,
                            size_t size,
                            size_t alignment,
-                           unsigned heat,
+                           CodeBlockHeat heat,
                            int id,
                            Code_Allocation_Action action);
 

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Tue Apr  3 02:30:33 2007
@@ -655,7 +655,7 @@
  * @return The current method of the iterator. <code>NULL</code> is returned if
  *         therea are no more methods.
  */
-VMEXPORT Method_Handle method_iterator_get_current(ChaMethodIterator*);
+VMEXPORT Method_Handle method_iterator_get_current(const ChaMethodIterator*);
 
 /**
  * Advances the iterator.

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.cpp Tue Apr  3 02:30:33 2007
@@ -1,36 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
- * @author Intel, Vyacheslav P. Shakin
- * @version $Revision: 1.16.16.5 $
- *
- */
-
-#include "CodeGenIntfc.h"
-#if defined (_IPF_)
-    #include "IpfCodeGenerator.h"
-#else
-    #include "ia32/Ia32CodeGenerator.h"
-#endif
-
-
-namespace Jitrino {
-    
-
-}
-

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/CodeGenIntfc.h Tue Apr  3 02:30:33 2007
@@ -589,8 +589,7 @@
     virtual void* getAddressOfSecurityObject(MethodDesc* methodDesc, const ::JitFrameContext* context) = 0;
 #endif
 
-    virtual bool  recompiledMethodEvent(BinaryRewritingInterface & binaryRewritingInterface,
-        MethodDesc * methodDesc, void * data) = 0;
+    virtual bool  recompiledMethodEvent(MethodDesc * methodDesc, void * data) = 0;
 
     virtual uint32          getInlineDepth(InlineInfoPtr ptr, uint32 offset) { return 0; }
     virtual Method_Handle   getInlinedMethod(InlineInfoPtr ptr, uint32 offset, uint32 inline_depth) { return NULL; }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32BBPolling.cpp Tue Apr  3 02:30:33 2007
@@ -20,7 +20,7 @@
  */
 
 #include "Ia32IRManager.h"
-#include "DrlVMInterface.h"
+#include "VMInterface.h"
 
 namespace Jitrino
 {
@@ -239,7 +239,7 @@
 static ActionFactory<BBPollingTransformer> _bbp("bbp");
 
 
-const uint32 gcFlagOffsetOffset = flagTLSSuspendRequestOffset();
+const uint32 gcFlagOffsetOffset = VMInterface::flagTLSSuspendRequestOffset();
 
 Opnd*
 BBPolling::getOrCreateTLSBaseReg(Edge* e)
@@ -836,4 +836,5 @@
 #endif // _DEBUG
 
 }}; // namespace Ia32
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32CodeEmitter.cpp Tue Apr  3 02:30:33 2007
@@ -51,7 +51,7 @@
     }
 
 
-    CompilationInterface::CodeBlockHeat getCodeSectionHeat(uint32 sectionID)const;
+    CodeBlockHeat getCodeSectionHeat(uint32 sectionID)const;
 
 protected:
     uint32 getNeedInfo()const{ return NeedInfo_LivenessInfo; }
@@ -590,8 +590,7 @@
 }
 
 //________________________________________________________________________________________
-bool RuntimeInterface::recompiledMethodEvent(BinaryRewritingInterface& binaryRewritingInterface,
-                           MethodDesc *              recompiledMethodDesc, 
+bool RuntimeInterface::recompiledMethodEvent(MethodDesc *recompiledMethodDesc, 
                            void *                    data) 
 {
     Byte ** indirectAddr = (Byte **)recompiledMethodDesc->getIndirectAddress();
@@ -630,15 +629,15 @@
 }
 
 //________________________________________________________________________________________
-CompilationInterface::CodeBlockHeat CodeEmitter::getCodeSectionHeat(uint32 sectionID)const
+CodeBlockHeat CodeEmitter::getCodeSectionHeat(uint32 sectionID)const
 {
-    CompilationInterface::CodeBlockHeat heat;
+    CodeBlockHeat heat;
     if (irManager->getCompilationContext()->hasDynamicProfileToUse())
-        heat = CompilationInterface::CodeBlockHeatDefault;
+        heat = CodeBlockHeatDefault;
     else if (sectionID==0)
-        heat = CompilationInterface::CodeBlockHeatMax;
+        heat = CodeBlockHeatMax;
     else
-        heat = CompilationInterface::CodeBlockHeatMin;
+        heat = CodeBlockHeatMin;
     
     return heat;
 }
@@ -667,7 +666,7 @@
     }
 
     uint32 handlerInfoCount=(uint32)exceptionHandlerInfos.size();
-    irManager->getCompilationInterface().setNumExceptionHandler(handlerInfoCount);
+    irManager->getMethodDesc().setNumExceptionHandler(handlerInfoCount);
     for (uint32 i=0; i<handlerInfoCount; i++){
         const ExceptionHandlerInfo & info=exceptionHandlerInfos[i];
         if (Log::isEnabled()) {
@@ -678,7 +677,7 @@
             Log::out() << ::std::endl;
         }
 
-        irManager->getCompilationInterface().
+        irManager->getMethodDesc().
             setExceptionHandlerInfo(i,
                 (Byte*)info.regionStart, (Byte*)info.regionEnd,
                 (Byte*)info.handlerAddr,
@@ -928,6 +927,7 @@
 
 
 }}; // ~Jitrino::Ia32
+
 
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp Tue Apr  3 02:30:33 2007
@@ -357,11 +357,11 @@
 #endif    
 }
 
-void GCMap::checkObject(DrlVMTypeManager& tm, const void* p)  {
+void GCMap::checkObject(TypeManager& tm, const void* p)  {
     if (p==NULL) return;
     m_assert (!(p<(const void*)0x10000)); //(INVALID PTR)
     m_assert((((POINTER_SIZE_INT)p)&0x3)==0); // check for valid alignment
-    POINTER_SIZE_INT vtableOffset=tm.getVTableOffset();
+    POINTER_SIZE_INT vtableOffset = VMInterface::getVTableOffset();
     void * allocationHandle=*(void**)(((uint8*)p)+vtableOffset);
     m_assert (!(allocationHandle<(void*)0x10000 || (((POINTER_SIZE_INT)allocationHandle)&0x3)!=0)); //INVALID VTABLE PTR
     ObjectType * type=tm.getObjectTypeFromAllocationHandle(allocationHandle);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.h Tue Apr  3 02:30:33 2007
@@ -27,7 +27,6 @@
 #include "Ia32IRManager.h"
 #include "Ia32StackInfo.h"
 #include "Ia32BCMap.h"
-#include "DrlVMInterface.h"
 
 #ifdef _DEBUG
 #define GCMAP_TRACK_IDS
@@ -55,7 +54,7 @@
         const GCSafePointsInfo* getGCSafePointsInfo() const {return offsetsInfo;}
         
         static const POINTER_SIZE_INT* findGCSafePointStart(const POINTER_SIZE_INT* image, POINTER_SIZE_INT ip);
-        static void checkObject(DrlVMTypeManager& tm, const void* p);
+        static void checkObject(TypeManager& tm, const void* p);
 
     private:
         void processBasicBlock(IRManager& irm, const Node* block);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCSafePoints.cpp Tue Apr  3 02:30:33 2007
@@ -330,7 +330,8 @@
 #ifndef _EM64T_
         return (int32)offsetOpnd->getImmValue();
 #else
-        return offsetOpnd->getImmValue() == (int64)irm.getCompilationInterface().getHeapBase()?0:(int32)offsetOpnd->getImmValue();
+        return offsetOpnd->getImmValue() == (int64)VMInterface::getHeapBase() ?
+            0 : (int32)offsetOpnd->getImmValue();
 #endif
     }
     return MPTR_OFFSET_UNKNOWN;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRConstants.cpp Tue Apr  3 02:30:33 2007
@@ -20,7 +20,6 @@
  */
 
 #include "Ia32IRConstants.h"
-#include "../../shared/PlatformDependant.h"
 
 namespace Jitrino
 {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.cpp Tue Apr  3 02:30:33 2007
@@ -27,7 +27,6 @@
 #include "Ia32Printer.h"
 #include "Ia32CodeGenerator.h"
 #include "Dominator.h"
-#include "float.h"
 #include <math.h>
 
 namespace Jitrino
@@ -486,7 +485,7 @@
     // it's just a self-check, as the currently assumed behaviour is that this method is invoked only once.
     assert(NULL == entryPointInst);
 
-    EntryPointPseudoInst * inst=new(memoryManager, methodDesc.getMethodSig()->getNumParams() * 2) EntryPointPseudoInst(this, instId++, cc);
+    EntryPointPseudoInst * inst=new(memoryManager, methodDesc.getNumParams() * 2) EntryPointPseudoInst(this, instId++, cc);
     fg->getEntryNode()->appendInst(inst);
 
     inst->assignOpcodeGroup(this);
@@ -1503,7 +1502,7 @@
             CGNode* node = (CGNode*)*it;
             if (node == exitNode) {
                 if (!methodDesc.isStatic() 
-                    && (methodDesc.isSynchronized() || methodDesc.isMethodClassIsLikelyExceptionType())) 
+                    && (methodDesc.isSynchronized() || methodDesc.isParentClassIsLikelyExceptionType())) 
                 {
                     BitSet * exitLs  = node->getLiveAtEntry();
                     EntryPointPseudoInst * entryPointInst = getEntryPointInst();
@@ -1659,7 +1658,7 @@
 #ifdef _EM64T_
     MethodDesc& md = getMethodDesc();
     if (!md.isStatic() 
-            && (md.isSynchronized() || md.isMethodClassIsLikelyExceptionType())) {
+            && (md.isSynchronized() || md.isParentClassIsLikelyExceptionType())) {
         Type* thisType = entryPointInst->getOpnd(0)->getType();
         entryPointInst->thisOpnd = newMemOpnd(thisType, MemOpndKind_StackAutoLayout, getRegOpnd(STACK_REG), 0); 
         entryPointInst->getBasicBlock()->appendInst(newCopyPseudoInst(Mnemonic_MOV, entryPointInst->thisOpnd, entryPointInst->getOpnd(0)));
@@ -1871,7 +1870,7 @@
 #ifndef _EM64T_
                         bb->appendInst(newInst(Mnemonic_CMP, opnd, newImmOpnd(opnd->getType(), 0)));
 #else
-                        bb->appendInst(newInst(Mnemonic_CMP, opnd,newImmOpnd(opnd->getType(), (Type::isCompressedReference(opnd->getType()->tag) || !opnd->getType()->isReference())? 0: (POINTER_SIZE_INT)compilationInterface.getHeapBase())));
+                        bb->appendInst(newInst(Mnemonic_CMP, opnd,newImmOpnd(opnd->getType(), (Type::isCompressedReference(opnd->getType()->tag) || !opnd->getType()->isReference())? 0: (POINTER_SIZE_INT)VMInterface::getHeapBase())));
 #endif
                         bb->appendInst(newBranchInst(Mnemonic_JZ, throwBasicBlock, oldTarget));
                         fg->addEdge(bb, throwBasicBlock, 0);
@@ -1962,7 +1961,7 @@
             value=(POINTER_SIZE_INT)((NamedType*)info->getValue(0))->getRuntimeIdentifier();
             break;
         case Opnd::RuntimeInfo::Kind_MethodRuntimeId: 
-            value=(POINTER_SIZE_INT)compilationInterface.getRuntimeMethodHandle((MethodDesc*)info->getValue(0));
+            value=(POINTER_SIZE_INT)((MethodDesc*)info->getValue(0))->getMethodHandle();
             break;
         case Opnd::RuntimeInfo::Kind_AllocationHandle: 
             /* The value of the operand is [0]->ObjectType::getAllocationHandle() */
@@ -1993,7 +1992,7 @@
             break;
         case Opnd::RuntimeInfo::Kind_VTableAddrOffset:
             /** The value of the operand is compilationInterface.getVTableOffset(), zero args */
-            value=(POINTER_SIZE_INT)compilationInterface.getVTableOffset();
+            value = (int64)VMInterface::getVTableOffset();
             break;
         case Opnd::RuntimeInfo::Kind_VTableConstantAddr:
             /** The value of the operand is [0]->ObjectType::getVTable() */
@@ -2358,4 +2357,5 @@
 
 } //namespace Ia32
 } //namespace Jitrino
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32IRManager.h Tue Apr  3 02:30:33 2007
@@ -32,7 +32,7 @@
 #include "BitSet.h"
 #include "XTimer.h"
 #include "Log.h"
-#include "../../shared/PlatformDependant.h"
+#include "PlatformDependant.h"
 #include "CGSupport.h"
 #include "CompilationContext.h"
 #include "JITInstanceContext.h"

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.cpp Tue Apr  3 02:30:33 2007
@@ -24,20 +24,12 @@
 #include "Ia32CodeGenerator.h"
 #include "Ia32Printer.h"
 #include "EMInterface.h"
-#include "DrlVMInterface.h"
+#include "VMInterface.h"
 #include "Opcode.h"
-#include "open/em_profile_access.h"
-#include "open/vm.h"
 
 #include <float.h>
 #include <math.h>
 
-#ifdef PLATFORM_POSIX
-#define _isnan isnan
-#define _finite finite
-#endif
-
-
 namespace Jitrino
 {
 namespace Ia32{
@@ -1354,7 +1346,7 @@
     CompareOp::Types zeroType = getCompareOpTypesFromCompareZeroOpTypes(opType);
     Opnd * op = (Opnd*) src;
     cmpToEflags(CompareOp::Eq, 
-        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)compilationInterface.getHeapBase() : 0));
+        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
 #else
     cmpToEflags(CompareOp::Eq, 
         getCompareOpTypesFromCompareZeroOpTypes(opType), (Opnd*)src, 0);
@@ -1373,7 +1365,7 @@
     CompareOp::Types zeroType = getCompareOpTypesFromCompareZeroOpTypes(opType);
     Opnd * op = (Opnd*) src;
     cmpToEflags(CompareOp::Eq, 
-        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)compilationInterface.getHeapBase() : 0));
+        zeroType, op, irManager.newImmOpnd(op->getType(),(zeroType == CompareOp::Ref) || (zeroType == CompareOp::CompRef) ? (POINTER_SIZE_INT)VMInterface::getHeapBase() : 0));
 #else
     cmpToEflags(CompareOp::Eq, 
         getCompareOpTypesFromCompareZeroOpTypes(opType), (Opnd*)src, 0);
@@ -1528,7 +1520,7 @@
     if (compressed) {
         return irManager.newImmOpnd(typeManager.getCompressedNullObjectType(), 0);
     } else {
-        return irManager.newImmOpnd(typeManager.getNullObjectType(), (POINTER_SIZE_INT)compilationInterface.getHeapBase());
+        return irManager.newImmOpnd(typeManager.getNullObjectType(), (POINTER_SIZE_INT)VMInterface::getHeapBase());
     }
 #endif
 }
@@ -1956,7 +1948,7 @@
         appendInsts(irManager.newCopyPseudoInst(Mnemonic_MOV, tmp, opnd));
         copyOpnd(dst, tmp);
         Type* unmanagedPtrType = typeManager.getUnmanagedPtrType(typeManager.getInt8Type());
-        dst = simpleOp_I8(Mnemonic_ADD, dstType, dst, irManager.newImmOpnd(unmanagedPtrType, (POINTER_SIZE_INT)compilationInterface.getHeapBase()));
+        dst = simpleOp_I8(Mnemonic_ADD, dstType, dst, irManager.newImmOpnd(unmanagedPtrType, (POINTER_SIZE_INT)VMInterface::getHeapBase()));
         return dst;
     } else {
         Opnd * opnd = irManager.newMemOpndAutoKind(irManager.getTypeFromTag(memType), addr);
@@ -1986,7 +1978,7 @@
         Opnd* dst = irManager.newMemOpndAutoKind(irManager.getTypeFromTag(memType), addr);
         copyOpnd(dst, src);
     } else  if(memType > Type::Float) {
-        src = simpleOp_I8(Mnemonic_SUB, src->getType(), src, irManager.newImmOpnd(typeManager.getIntPtrType(), (POINTER_SIZE_INT)compilationInterface.getHeapBase()));
+        src = simpleOp_I8(Mnemonic_SUB, src->getType(), src, irManager.newImmOpnd(typeManager.getIntPtrType(), (POINTER_SIZE_INT)VMInterface::getHeapBase()));
         Opnd * opnd = irManager.newMemOpndAutoKind(typeManager.compressType(src->getType()), addr);
         appendInsts(irManager.newCopyPseudoInst(Mnemonic_MOV, opnd, src));
     } else {
@@ -2298,7 +2290,7 @@
 
 #ifdef _EM64T_
         Opnd * base = irManager.newOpnd(irManager.getTypeFromTag(Type::Object));
-        copyOpnd(base, irManager.newImmOpnd(base->getType(), (POINTER_SIZE_INT)compilationInterface.getHeapBase()));
+        copyOpnd(base, irManager.newImmOpnd(base->getType(), (POINTER_SIZE_INT)VMInterface::getHeapBase()));
         Opnd * tmp = irManager.newImmOpnd(irManager.getTypeFromTag(Type::UInt64),
                                           Opnd::RuntimeInfo::Kind_StringAddress,
                                           enclosingMethod, (void*)(POINTER_SIZE_INT)refToken);
@@ -2460,7 +2452,7 @@
 #else
     Opnd * vtableAddr=irManager.newOpnd(dstType);
 
-    int64 heapBase = (int64) compilationInterface.getVTableBase();
+    int64 heapBase = (int64) VMInterface::getVTableBase();
     Opnd * acc =  simpleOp_I8(Mnemonic_ADD, dstType, (Opnd *)base, irManager.newImmOpnd(dstType, Opnd::RuntimeInfo::Kind_VTableAddrOffset));
     Opnd * sourceVTableAddr=irManager.newMemOpnd(typeManager.getInt32Type(), acc, 0, 0, irManager.newImmOpnd(typeManager.getUInt32Type(), 0));
     acc=irManager.newOpnd(dstType);
@@ -2761,7 +2753,7 @@
                                                 irManager.newMemOpnd(typeManager.getUnmanagedPtrType(typeManager.getInt32Type()),
                                                                      MemOpndKind_Any, 
                                                                      tlsBaseReg, 
-                                                                     flagTLSThreadStateOffset()),
+                                                                     VMInterface::flagTLSThreadStateOffset()),
                                                 (Opnd*)args[0]));
 #endif // PLATFORM_POSIX
         
@@ -2785,12 +2777,12 @@
                                                 irManager.newMemOpnd(typeManager.getInt32Type(),
                                                                      MemOpndKind_Any, 
                                                                      tlsBaseReg, 
-                                                                     flagTLSThreadStateOffset())));
+                                                                     VMInterface::flagTLSThreadStateOffset())));
         appendInsts(irManager.newCopyPseudoInst(Mnemonic_MOV, 
                                                 irManager.newMemOpnd(typeManager.getInt32Type(),
                                                                      MemOpndKind_Any, 
                                                                      tlsBaseReg, 
-                                                                     flagTLSThreadStateOffset()),
+                                                                     VMInterface::flagTLSThreadStateOffset()),
                                                 irManager.newImmOpnd(typeManager.getInt32Type(),1)));
 #endif
 
@@ -2976,14 +2968,6 @@
 
 #define FAST_PATH_MONITOR_ENTER_SUCCESS_PROB  0.99
 #define FAST_PATH_MONITOR_EXIT_SUCCESS_PROB   0.99
-
-//_______________________________________________________________________________________________________________
-//  Check if we should inline synchronization
-
-bool InstCodeSelector::inlineSync(CompilationInterface::ObjectSynchronizationInfo& syncInfo) 
-{
-    return false;
-}
 
 //_______________________________________________________________________________________________________________
 //  Acquire monitor for an object

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InstCodeSelector.h Tue Apr  3 02:30:33 2007
@@ -362,7 +362,7 @@
 
     MemoryManager& getCodeSelectorMemoryManager(){ return codeSelector.methodCodeSelector.codeSelectorMemManager; }
     
-    Type * getMethodReturnType() { return getMethodDesc()->getMethodSig()->getReturnType(); }
+    Type * getMethodReturnType() { return getMethodDesc()->getReturnType(); }
 
     Opnd *              sxtInt32(Opnd *opnd);
     Opnd *              zxtInt32(Opnd *opnd);
@@ -406,9 +406,6 @@
     CG_OpndHandle *            genTauSplit(BranchInst * br);
 
     Type *              getRuntimeIdType() {return typeManager.getUnmanagedPtrType(typeManager.getIntPtrType());}
-
-    //  Check if we should inline synchronization
-    bool                inlineSync(CompilationInterface::ObjectSynchronizationInfo& syncInfo);
 
     //  Check if we should generate tau instructions
     bool                suppressTauInsts(){ return true; }; 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp Tue Apr  3 02:30:33 2007
@@ -974,7 +974,7 @@
     if(filter.isInitLocals.isInitialized) {
         if(!rt || ((rt->getKind() != Opnd::RuntimeInfo::Kind_MethodDirectAddr) && (rt->getKind() != Opnd::RuntimeInfo::Kind_MethodDirectAddr)))
             return false;
-        res = filter.isInitLocals.value == ((MethodDesc *)rt->getValue(0))->isInitLocals();
+        res = filter.isInitLocals.value == false;
         if(filter.isInitLocals.isNegative)
             res = !res;
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalTrace.cpp Tue Apr  3 02:30:33 2007
@@ -21,9 +21,7 @@
 
 #include "Ia32InternalTrace.h"
 #include "Log.h"
-#include "jit_export.h"
 #include "Ia32Printer.h"
-#include "../../vm/drl/DrlVMInterface.h"
 #include "Ia32GCMap.h"
 
 namespace Jitrino
@@ -50,7 +48,7 @@
     }
 
 static MemoryManager mm(0x100, "printRuntimeOpndInternalHelper");
-static DrlVMTypeManager *tm = NULL;
+static TypeManager *tm = NULL;
 void __stdcall methodEntry(const char * methodName, uint32 argInfoCount, CallingConvention::OpndInfo * argInfos)
 {
 
@@ -67,7 +65,7 @@
     os<<")"<<::std::endl;
 
     if (tm == NULL) {
-        tm = new (mm) DrlVMTypeManager(mm); tm->init();
+        tm = new (mm) TypeManager(mm); tm->init();
     }
     for (uint32 i=0; i<argInfoCount; i++){
         CallingConvention::OpndInfo & info=argInfos[i];
@@ -104,9 +102,8 @@
 {   
     ::std::ostream & os=Log::cat_rt()->out();
     os<<"__FIELD_WRITE__:"<<address<<" at "<<*(void**)(&address-1)<<::std::endl;
-    DrlVMDataInterface dataInterface;
-    void * heapBase=dataInterface.getHeapBase();
-    void * heapCeiling=dataInterface.getHeapCeiling();
+    void * heapBase = VMInterface::getHeapBase();
+    void * heapCeiling = VMInterface::getHeapCeiling();
     if (address<heapBase || address>=heapCeiling){
         os<<"PROBABLY STATIC OR INVALID ADDRESS. DYNAMIC ADDRESSES MUST BE IN ["<<heapBase<<","<<heapCeiling<<")"<<::std::endl;
     }
@@ -192,4 +189,5 @@
 }
 
 }}; //namespace Ia32
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.cpp Tue Apr  3 02:30:33 2007
@@ -21,8 +21,6 @@
 
 #include "Ia32Printer.h"
 #include "Log.h"
-#include "../../vm/drl/DrlVMInterface.h"
-#include "../../shared/PlatformDependant.h"
 #include "CGSupport.h"
 #include "PlatformDependant.h"
 
@@ -1398,7 +1396,7 @@
 void printRuntimeArgs(::std::ostream& os, uint32 opndCount, CallingConvention::OpndInfo * infos, JitFrameContext * context)
 {
     MemoryManager mm(0x1000, "printRuntimeOpndInternalHelper");
-    DrlVMTypeManager tm(mm); tm.init();
+    TypeManager tm(mm); tm.init();
     os<<opndCount<<" args: ";
     for (uint32 i=0; i<opndCount; i++){
         CallingConvention::OpndInfo & info=infos[i];
@@ -1494,7 +1492,7 @@
         os<<"(INVALID PTR)";
         return;
     }
-    POINTER_SIZE_INT vtableOffset=tm.getVTableOffset();
+    POINTER_SIZE_INT vtableOffset = VMInterface::getVTableOffset();
 
     //  assume that vtable pointer in object head is allocation handle 
     void * allocationHandle=*(void**)(((uint8*)p)+vtableOffset);
@@ -1590,10 +1588,11 @@
 void __stdcall printRuntimeOpndInternalHelper(const void * p)
 {
     MemoryManager mm(0x1000, "printRuntimeOpndInternalHelper");
-    DrlVMTypeManager tm(mm); tm.init();
+    TypeManager tm(mm); tm.init();
     printRuntimeObjectOpnd(::std::cout, tm, p);
 }
 
 
 }}; //namespace Ia32
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.cpp Tue Apr  3 02:30:33 2007
@@ -42,7 +42,7 @@
 
 void* RuntimeInterface::getAddressOfThis(MethodDesc * methodDesc, const JitFrameContext* context, bool isFirst) {
     assert(!methodDesc->isStatic());
-    if (!methodDesc->isSynchronized() &&  !methodDesc->isMethodClassIsLikelyExceptionType()) {
+    if (!methodDesc->isSynchronized() &&  !methodDesc->isParentClassIsLikelyExceptionType()) {
         static const uint64 default_this=0;
         return (void*)&default_this;
     }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32RuntimeInterface.h Tue Apr  3 02:30:33 2007
@@ -56,8 +56,7 @@
 
     virtual void* getAddressOfSecurityObject(MethodDesc* methodDesc, const JitFrameContext* context) { assert(0); return NULL; }
 
-    virtual bool  recompiledMethodEvent(BinaryRewritingInterface & binaryRewritingInterface,
-        MethodDesc * methodDesc, void * data);
+    virtual bool  recompiledMethodEvent(MethodDesc * methodDesc, void * data);
 
     virtual bool getBcLocationForNative(MethodDesc* method, uint64 native_pc, uint16 *bc_pc);
     virtual bool getNativeLocationForBc(MethodDesc* method,  uint16 bc_pc, uint64 *native_pc);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp Tue Apr  3 02:30:33 2007
@@ -355,7 +355,7 @@
     MethodDesc& md = irm.getMethodDesc();
     if (!md.isStatic()) {
 #ifdef _EM64T_
-        if ((md.isSynchronized() || md.isMethodClassIsLikelyExceptionType())) {
+        if ((md.isSynchronized() || md.isParentClassIsLikelyExceptionType())) {
             EntryPointPseudoInst * entryPointInst = irm.getEntryPointInst();
             offsetOfThis = (uint32)entryPointInst->thisOpnd->getMemOpndSubOpnd(MemOpndSubOpndKind_Displacement)->getImmValue();
         } else {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.h Tue Apr  3 02:30:33 2007
@@ -23,8 +23,6 @@
 #define _IA32_STACK_INFO_H_
 
 #include "CodeGenIntfc.h"
-#include "open/types.h"
-#include "jit_export.h"
 #include "MemoryManager.h"
 #include "VMInterface.h"
 #include "Type.h"

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEmitter.cpp Tue Apr  3 02:30:33 2007
@@ -302,7 +302,7 @@
 #include <errno.h>
 #include <ucontext.h>
 
-void __stdcall sighandler(int sn, siginfo_t *si, void *_sc) {
+void sighandler(int sn, siginfo_t *si, void *_sc) {
     struct sigaction signal_action;
     struct ucontext * signal_ucontext;
     int saved_errno = errno;
@@ -1161,7 +1161,7 @@
     Inst *inst;
 
     codeoff = (char *)compilationinterface.allocateCodeBlock(
-            codesize, IPF_CODE_ALIGNMENT, CompilationInterface::CodeBlockHeatDefault, 0, false);
+            codesize, IPF_CODE_ALIGNMENT, CodeBlockHeatDefault, 0, false);
     assert(codeoff != NULL);
     IPF_LOG << endl;
     if ( codeoff ) {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp Tue Apr  3 02:30:33 2007
@@ -1654,8 +1654,7 @@
 }
 
 //----------------------------------------------------------------------------//
-bool Encoder::patchCallAddr(BinaryRewritingInterface & binaryRewritingInterface
-        , char * callAddr, char * methodAddr)
+bool Encoder::patchCallAddr(char * callAddr, char * methodAddr)
 {
     uint64   p[2];
     uint64   s[3];
@@ -1689,7 +1688,7 @@
     p[1] |= s[2] << 23;
 
     // write to callAddr
-    binaryRewritingInterface.rewriteCodeBlock((Byte *)callAddr, 
+    VMInterface::rewriteCodeBlock((Byte *)callAddr, 
                                               (Byte *)p,
                                               IPF_BUNDLE_SIZE);
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp Tue Apr  3 02:30:33 2007
@@ -246,8 +246,8 @@
 
     containCall = false;
 
-    refsCompressed       = compilationInterface.areReferencesCompressed();
-    vtablePtrsCompressed = compilationInterface.areVTablePtrsCompressed();
+    refsCompressed       = VMInterface::areReferencesCompressed();
+    vtablePtrsCompressed = VMInterface::areVTablePtrsCompressed();
     heapBase             = NULL;
     heapBaseImm          = NULL;
     vtableBase           = NULL;
@@ -333,7 +333,7 @@
 Opnd *OpndManager::getVtableOffset() { 
 
     if (vtableOffset == NULL) {
-        int64 offset = compilationInterface.getVTableOffset();
+        int64 offset = VMInterface::getVTableOffset();
         if (offset != 0) vtableOffset = newImm(offset);
     }
     return vtableOffset;
@@ -349,7 +349,7 @@
     InstVector &insts    = enterNode->getInsts();
 
     if (heapBase != NULL) {
-        baseValue  = (uint64) compilationInterface.getHeapBase();
+        baseValue  = (uint64) VMInterface::getHeapBase();
         
         baseImm    = newImm(baseValue);
         Inst *inst = new(mm) Inst(mm, INST_MOVL, p0, heapBase, baseImm);
@@ -357,11 +357,11 @@
         IPF_LOG << "    HeapBase initialization code inserted" << endl;
     }
     if (heapBaseImm != NULL) {
-        heapBaseImm->setValue((uint64)compilationInterface.getHeapBase());
+        heapBaseImm->setValue((uint64)VMInterface::getHeapBase());
     }
         
     if (vtableBase != NULL) {
-        baseValue  = (uint64) compilationInterface.getVTableBase();
+        baseValue  = (uint64) VMInterface::getVTableBase();
 
         baseImm    = newImm(baseValue);
         Inst *inst = new(mm) Inst(mm, INST_MOVL, p0, vtableBase, baseImm);
@@ -369,7 +369,7 @@
         IPF_LOG << "    VtableBase initialization code inserted" << endl;
     }
     if (vtableBaseImm != NULL) {
-        vtableBaseImm->setValue((uint64)compilationInterface.getVTableBase());
+        vtableBaseImm->setValue((uint64)VMInterface::getVTableBase());
     }
 }
 
@@ -448,9 +448,8 @@
 
 int64 OpndManager::getElemBaseOffset() { 
     
-    DrlVMTypeManager typeManager(mm);
-    typeManager.init(compilationInterface);
-    ArrayType *arrayType = typeManager.getArrayType(typeManager.getInt64Type());
+    TypeManager& tm = compilationInterface.getTypeManager();
+    ArrayType *arrayType = tm.getArrayType(tm.getInt64Type());
     return arrayType->getArrayElemOffset();
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp Tue Apr  3 02:30:33 2007
@@ -198,8 +198,7 @@
 
 //----------------------------------------------------------------------------------------//
 
-bool RuntimeInterface::recompiledMethodEvent(BinaryRewritingInterface &binaryRewritingInterface,
-                                             MethodDesc               *methodDesc, 
+bool RuntimeInterface::recompiledMethodEvent(MethodDesc               *methodDesc, 
                                              void                     *data) {
     //std::cout << "IPF::RuntimeInterface::recompiledMethodEvent " << methodDesc->getName() << endl;
 
@@ -207,7 +206,7 @@
     char **indirectAddr = (char **)methodDesc->getIndirectAddress();
     char *methodAddr    = *indirectAddr;
 
-    return Encoder::patchCallAddr(binaryRewritingInterface, callAddr, methodAddr);
+    return Encoder::patchCallAddr(callAddr, methodAddr);
 }
 
 //----------------------------------------------------------------------------------------//

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeSupport.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeSupport.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeSupport.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeSupport.cpp Tue Apr  3 02:30:33 2007
@@ -142,7 +142,8 @@
             dispatchNode = nodes[i]->getDispatchNode();
         }
     }
-    compilationInterface.setNumExceptionHandler(tryRegions.size());
+    MethodDesc* md = compilationInterface.getMethodToCompile();
+    md->setNumExceptionHandler(tryRegions.size());
     
     IPF_LOG << "    region registration:" << endl;
     if(tryRegions.size() == 0) {
@@ -152,7 +153,7 @@
 
     IPF_LOG << "      start            end              handler          exception                           objIsDead" << endl;
     for(uint16 i=0; i<tryRegions.size(); i++) {
-        compilationInterface.setExceptionHandlerInfo(i, 
+        md->setExceptionHandlerInfo(i, 
             tryRegions[i]->startAddr, 
             tryRegions[i]->endAddr,
             tryRegions[i]->handlerAddr,

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfEncoder.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfEncoder.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfEncoder.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfEncoder.h Tue Apr  3 02:30:33 2007
@@ -573,8 +573,7 @@
 
 class Encoder {
   public:
-    static bool patchCallAddr(BinaryRewritingInterface &binaryRewritingInterface
-            , char * callAddr, char * methodAddr);
+    static bool patchCallAddr(char * callAddr, char * methodAddr);
     static void readBundle(uint64 *code, uint64 * tmplt, uint64 * slots);
     
     static char *  getMnemonic(InstCode opcode) { return instDesc[opcode].mnemonic; };

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfRuntimeInterface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfRuntimeInterface.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfRuntimeInterface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/include/IpfRuntimeInterface.h Tue Apr  3 02:30:33 2007
@@ -42,7 +42,7 @@
     void           fixHandlerContext(MethodDesc*, JitFrameContext*, bool);
     void           *getAddressOfThis(MethodDesc*, const JitFrameContext*, bool);
     void           *getAddressOfSecurityObject(MethodDesc*, const JitFrameContext*);
-    bool           recompiledMethodEvent(BinaryRewritingInterface&, MethodDesc*, void*);
+    bool           recompiledMethodEvent(MethodDesc*, void*);
     bool           getBcLocationForNative(MethodDesc*, uint64, uint16*);
     bool           getNativeLocationForBc(MethodDesc*, uint16, uint64*);
     uint16         getInlinedBc(void *v, unsigned int i1, unsigned int i2) { return 0; } // TODO

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp Tue Apr  3 02:30:33 2007
@@ -21,9 +21,8 @@
 * @version $Revision$
 */
 
-
+#include "EMInterface.h"
 #include "Jitrino.h"
-#include "EdgeProfiler.h"
 #include "Inst.h"
 #include "Stl.h"
 #include "StaticProfiler.h"

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.h Tue Apr  3 02:30:33 2007
@@ -1,35 +0,0 @@
-/*
-*  Licensed to the Apache Software Foundation (ASF) under one or more
-*  contributor license agreements.  See the NOTICE file distributed with
-*  this work for additional information regarding copyright ownership.
-*  The ASF licenses this file to You under the Apache License, Version 2.0
-*  (the "License"); you may not use this file except in compliance with
-*  the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-*  Unless required by applicable law or agreed to in writing, software
-*  distributed under the License is distributed on an "AS IS" BASIS,
-*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*  See the License for the specific language governing permissions and
-*  limitations under the License.
-*/
-/* COPYRIGHT_NOTICE */
-/**
-* @author Jack Liu, Mikhail Y. Fursov, Chen-Dong Yuan
-* @version $Revision$
-*/
-
-
-#include "Jitrino.h"
-#include "irmanager.h"
-#include "VMInterface.h"
-#include "EMInterface.h"
-#include "optpass.h"
-
-#include <stdlib.h>
-
-
-namespace Jitrino {
-    //todo: remove this file
-}

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Tue Apr  3 02:30:33 2007
@@ -1,4 +1,3 @@
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one or more
  *  contributor license agreements.  See the NOTICE file distributed with
@@ -33,7 +32,7 @@
 #include "jit_intf.h"
 
 
-#include "../shared/mkernel.h"
+#include "mkernel.h"
 //FIXME: needed for NOPs fix only, to be removed
 #include "enc_ia32.h"
 
@@ -48,15 +47,15 @@
 
 #if !defined(PROJECT_JET)
     #include "Jitrino.h"
-    #include "VMInterface.h"
-    #include "DrlVMInterface.h"
     #include "EMInterface.h"
     #include "JITInstanceContext.h"
-#else
     /**
-     * See DrlVMInterface.h/g_compileLock and 
-     * DrlCompilationInterface::lockMethodData/unlockMethodData for details.
-     */
+    * A lock used to protect method's data in multi-threaded compilation.
+    * See VMInterface.h 
+    * CompilationInterface::lockMethodData/unlockMethodData for details.
+    */
+    extern Jitrino::Mutex g_compileLock;
+#else
     static Jitrino::Mutex g_compileLock;
 #endif
 
@@ -441,7 +440,7 @@
         m_vmCode = (char*)method_allocate_code_block(m_method, m_hjit,
                                                      total_code_size, 
                                                      16/*fixme aligment*/, 
-                                                     CODE_BLOCK_HEAT_DEFAULT,
+                                                     CodeBlockHeatDefault,
                                                      0, CAA_Allocate);
         m_infoBlock.set_code_start(m_vmCode);
     }
@@ -1495,7 +1494,7 @@
     ProfilingInterface* pi = jitContext->getProfilingInterface();
     if (pi->isProfilingEnabled(ProfileType_EntryBackedge, JITProfilingRole_GEN)) {
         MemoryManager mm(128, "jet_profiling_mm");
-        DrlVMMethodDesc md(m_method, m_hjit);
+        MethodDesc md(m_method, m_hjit);
 
         g_compileLock.lock();
 
@@ -1523,4 +1522,5 @@
 
 
 }}; // ~namespace Jitrino::Jet
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp Tue Apr  3 02:30:33 2007
@@ -139,7 +139,8 @@
 
 #include <assert.h>
 #include "trace.h"
-#include "../shared/mkernel.h"
+#include "mkernel.h"
+#include "PlatformDependant.h"
 
 #include <set>
 #include <string>

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/JITInstanceContext.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/JITInstanceContext.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/JITInstanceContext.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/JITInstanceContext.h Tue Apr  3 02:30:33 2007
@@ -22,7 +22,7 @@
 #ifndef _JIT_INSTANCE_CONTEXT_H_
 #define _JIT_INSTANCE_CONTEXT_H_
 
-#include "jit_export.h"
+#include "open/em.h"
 #include "MemoryManager.h"
 
 #include <assert.h>

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.cpp Tue Apr  3 02:30:33 2007
@@ -31,9 +31,9 @@
 #include "Log.h"
 #include "CountWriters.h"
 #include "XTimer.h"
-#include "DrlVMInterface.h"
+#include "VMInterface.h"
 
-#ifndef PLATFORM_POSIX
+#ifdef _WIN32
     #pragma pack(push)
     #include <windows.h>
     #define vsnprintf _vsnprintf
@@ -42,7 +42,8 @@
     #include <stdarg.h>
     #include <sys/stat.h>
     #include <sys/types.h>
-#endif //PLATFORM_POSIX
+#endif 
+
 #include "CGSupport.h"
 #include "PlatformDependant.h"
 #include "JITInstanceContext.h"
@@ -78,7 +79,7 @@
 void initialize_parameters(CompilationContext* compilationContext, MethodDesc &md)
 {
     // BCMap Info Required
-    ((DrlVMCompilationInterface*)(compilationContext->getVMCompilationInterface()))->setBCMapInfoRequired(true);
+    compilationContext->getVMCompilationInterface()->setBCMapInfoRequired(true);
 
     // do onetime things
     if (!initialized_parameters) {
@@ -347,10 +348,9 @@
 #endif
 
 bool  
-Jitrino::RecompiledMethodEvent(BinaryRewritingInterface & binaryRewritingInterface,
-                               MethodDesc *               recompiledMethodDesc, 
+Jitrino::RecompiledMethodEvent(MethodDesc *               recompiledMethodDesc, 
                                void *                     data) {
-    return runtimeInterface->recompiledMethodEvent(binaryRewritingInterface, recompiledMethodDesc, data);
+    return runtimeInterface->recompiledMethodEvent(recompiledMethodDesc, data);
 }
 
 bool 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/Jitrino.h Tue Apr  3 02:30:33 2007
@@ -24,23 +24,15 @@
 #ifndef _JITRINO_H_
 #define _JITRINO_H_
 
-#include "open/types.h"
-#include "jit_export.h"
 #include "VMInterface.h"
 #include "Stl.h"
-#include <assert.h>
-
-// this 'ifndef' makes Jitrino (in jitrino_dev branch) build successfully both on 
-//   Q2-05 and jitrino_dev versions of VM headers
-// to be removed as soon as Q2-05 VM headers are NOT needed
-//
-#ifndef INLINE_INFO_PTR
-#define INLINE_INFO_PTR
-typedef void * InlineInfoPtr;
-#endif
 
 namespace Jitrino {
 
+// assert which works even in release mode
+// prints message, something about line and file, and hard-exits
+#define jitrino_assert(e) { if (!(e)) { crash("Assertion failed at %s:%d", __FILE__ ,__LINE__); } }
+
 void crash (const char* fmt, ...);
 
 class MemoryManager;
@@ -64,8 +56,7 @@
 #ifdef USE_SECURITY_OBJECT
     static void* GetAddressOfSecurityObject(MethodDesc* methodDesc, const ::JitFrameContext* context);
 #endif
-    static bool  RecompiledMethodEvent(BinaryRewritingInterface&  binaryRewritingInterface,
-                                       MethodDesc * recompiledMethodDesc, void * data);
+    static bool  RecompiledMethodEvent(MethodDesc * recompiledMethodDesc, void * data);
     static MemoryManager& getGlobalMM() { return *global_mm; }
 
     static bool GetBcLocationForNative(MethodDesc* method, uint64 native_pc, uint16 *bc_pc);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp Tue Apr  3 02:30:33 2007
@@ -24,7 +24,6 @@
 #include "PMFAction.h"
 #include "FixFileName.h"
 #include "JITInstanceContext.h"
-#include "open/vm.h"
 #include <ctype.h>
 #include <errno.h>
 #include <stdlib.h>

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMFAction.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMFAction.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMFAction.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMFAction.h Tue Apr  3 02:30:33 2007
@@ -22,7 +22,7 @@
 #ifndef _PMFACTION_H_
 #define _PMFACTION_H_
 
-#include "PMF.h"    // sorry ...
+#include "PMF.h"
 
 #include <string.h>
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/CodeGenerator.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/CodeGenerator.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/CodeGenerator.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/CodeGenerator.cpp Tue Apr  3 02:30:33 2007
@@ -22,7 +22,6 @@
  */
 
 #include "CodeSelectors.h"
-#include "../../vm/drl/DrlVMInterface.h"
 
 namespace Jitrino {
 
@@ -132,7 +131,7 @@
             MethodDesc* mdesc = (MethodDesc*)(*desc_it)->first;
             uint32 bcOffset = (uint32)(*desc_it)->second;
             //assert(dynamic_cast<DrlVMMethodDesc*>(mdesc)); // <-- some strange warning on Win32 here
-            *ptr++ = ptr_to_uint64(((DrlVMMethodDesc*)mdesc)->getDrlVMMethod());
+            *ptr++ = ptr_to_uint64(mdesc->getMethodHandle());
             *ptr++ = (POINTER_SIZE_INT)bcOffset;
             depth++;
         }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/IRBuilder.cpp Tue Apr  3 02:30:33 2007
@@ -310,9 +310,9 @@
     simplifier  = new (mm) IRBuilderSimplifier(*this);
     
     CompilationInterface* ci = getCompilationContext()->getVMCompilationInterface();
-    irBuilderFlags.insertWriteBarriers    = ci->insertWriteBarriers();
+    irBuilderFlags.insertWriteBarriers    = ci->needWriteBarriers();
     irBuilderFlags.isBCMapinfoRequired = ci->isBCMapInfoRequired();
-    irBuilderFlags.compressedReferences   = irBuilderFlags.compressedReferences || ci->areReferencesCompressed();
+    irBuilderFlags.compressedReferences   = irBuilderFlags.compressedReferences || VMInterface::areReferencesCompressed();
 
     if (irBuilderFlags.isBCMapinfoRequired) {
         MethodDesc* meth = irm->getCompilationInterface().getMethodToCompile();
@@ -2025,10 +2025,7 @@
     Opnd* dst = lookupHash(Op_LdStaticAddr, fieldDesc->getId());
     if (dst) return dst;
 
-    if (fieldDesc->isUnmanagedStatic()) {
-        // can't mark an unmanaged pointer as non-null
-        dst = createOpnd(typeManager->getIntPtrType());
-    } else if (irBuilderFlags.compressedReferences && type->isObject()) {
+    if (irBuilderFlags.compressedReferences && type->isObject()) {
         // until VM type system is upgraded,
         // fieldDesc type will have uncompressed ref type;
         // compress it

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opnd.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opnd.h?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opnd.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opnd.h Tue Apr  3 02:30:33 2007
@@ -28,7 +28,6 @@
 
 #include "open/types.h"
 #include "Type.h"
-#include "Exceptions.h"
 #include "MemoryManager.h"
 
 namespace Jitrino {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.cpp Tue Apr  3 02:30:33 2007
@@ -28,6 +28,7 @@
 
 #include <float.h>
 #include <math.h>
+#include "PlatformDependant.h"
 
 /*
  * The constant folding optimization is described in [S.Muchnick. Advanced Compiler
@@ -39,10 +40,6 @@
 
 using namespace std;
 
-inline int isFinite(double s) {
-    return finite(s);
-}
-
 inline float _chgsign(float f) {
         return copysignf(f, signbit(f) ? (float)1.0 : (float)-1.0 );
 }
@@ -50,18 +47,6 @@
 inline double _chgsign(double d) {
         return copysign(d, signbit(d) ? 1.0 : -1.0 );
 }
-
-// isnan(double s) is declared in float.h
-#else
-inline int isFinite(double s) {
-    return _finite(s);
-}
-
-// _chgsign(double d) is declared in float.h
-
-inline int isnan(double s) {
-    return _isnan(s);
-}
 #endif
 
 // use templates here to decrease code to write for float2int below.
@@ -94,7 +79,7 @@
 inline tointtype float2int(fromfloattype f)
 {
     if (isnan(f)) return (tointtype) 0;
-    if (isFinite(f) && 
+    if (finite(f) && 
         (((fromfloattype(minint<tointtype>(0))) < f) &&
          (f < fromfloattype(maxint<tointtype>(0)))))
         return (tointtype) f; // both C++ and Java truncate
@@ -106,7 +91,7 @@
 inline tointtype float2uint(fromfloattype s)
 {
     if (isnan(s) || (s < 0.0)) return (tointtype) 0;
-    if (isFinite(s) && (s < maxuintasfloat<tointtype>(0)))
+    if (finite(s) && (s < maxuintasfloat<tointtype>(0)))
         return (tointtype) s;
     return maxuint<tointtype>(0);
 }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp Tue Apr  3 02:30:33 2007
@@ -26,7 +26,6 @@
 #include "Dominator.h"
 #include "inliner.h"
 #include "EMInterface.h"
-#include "open/vm.h"
 
 namespace Jitrino {
 
@@ -460,11 +459,13 @@
                         // Do not devirtualize - there were no real calls here
                         return;
                     }
-                    Log::out() << "Valued type: " << class_get_name(vtable_get_class((VTable_Handle)vtHandle)) << std::endl;
 
                     // get desired MethodDesc object
                     assert(vtHandle != 0);
-                    ObjectType* clssObjectType = _typeManager.getObjectType(vtable_get_class((VTable_Handle)vtHandle));
+                    ObjectType* clssObjectType = _typeManager.getObjectType(VMInterface::getTypeHandleFromVTable((void*)vtHandle));
+                    Log::out() << "Valued type: ";
+                    clssObjectType->print(Log::out());
+                    Log::out() << std::endl;
                     candidateMeth = regionIRM.getCompilationInterface().resolveMethod(clssObjectType, origMethodDesc->getName(), origMethodDesc->getSignatureString());
                     Log::out() << "candidateMeth: "<< std::endl;
                     candidateMeth->printFullName(Log::out());
@@ -482,7 +483,7 @@
 
                 } else if (profileSelection) {
                     ClassHierarchyMethodIterator* iterator = regionIRM.getCompilationInterface().getClassHierarchyMethodIterator(baseType, origMethodDesc);
-                    if(iterator) {
+                    if(iterator->isValid()) {
                         ProfilingInterface* pi = cc->getProfilingInterface();
                         while (iterator->hasNext()) {
                             MethodDesc* tmpMeth = iterator->getNext();
@@ -502,7 +503,7 @@
                     }
                 }
                 if (candidateMeth) {
-                    jitrino_assert(regionIRM.getCompilationInterface(), origMethodDesc->getParentType()->isClass());
+                    jitrino_assert(origMethodDesc->getParentType()->isClass());
                     methodInst->setMethodDesc(candidateMeth);
                     //
                     // Try to guard this call

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp Tue Apr  3 02:30:33 2007
@@ -33,8 +33,7 @@
 #include "ssa/SSA.h"
 #include "optpass.h"
 #include "devirtualizer.h"
-#include "DrlVMInterface.h"
-//#include "Windows.h"
+#include "VMInterface.h"
 
 namespace Jitrino {
 
@@ -1840,12 +1839,12 @@
     mident->name=mname;
     mident->signature=msig;
     minfo->methodIdent=mident;
-    uint32 numpar = mdesc->getMethodSig()->getNumParams();
+    uint32 numpar = mdesc->getNumParams();
     minfo->numberOfArgs=numpar;
     ParamInfos* prminfos = new (globalMM) ParamInfos(globalMM);
     minfo->paramInfos=prminfos;
     minfo->retValueState=0;
-    if (mdesc->getMethodSig()->getReturnType()->isReference()) {
+    if (mdesc->getReturnType()->isReference()) {
         uint32 escstate = 3, bitstate = 0;
         for (it = cngNodes->begin( ); it != cngNodes->end( ); it++) {
             if ((*it)->nodeType==NT_EXITVAL) {
@@ -1961,7 +1960,7 @@
             << "." << methodDesc->getName() << methodDesc->getSignatureString() 
             << "  " << methodDesc << std::endl;
         Log::out() << "    NumParams: " 
-            << methodDesc->getMethodSig()->getNumParams()<< std::endl;
+            << methodDesc->getNumParams()<< std::endl;
         Log::out() << "    isNative: " << methodDesc->isNative() << std::endl;
         Log::out() << "    isStatic: " << methodDesc->isStatic() << std::endl;
         Log::out() << "    isInstance: " << methodDesc->isInstance() << std::endl;
@@ -1971,7 +1970,6 @@
         Log::out() << "    isInstanceInitializer: " 
             << methodDesc->isInstanceInitializer() << std::endl;
         Log::out() << "    isOverridden: " << methodDesc->isOverridden() << std::endl;
-        Log::out() << "    isJavaByteCodes: " << methodDesc->isJavaByteCodes() << std::endl;
    }
 #endif
 
@@ -1983,7 +1981,7 @@
         returnOpnd = _opndManager.createSsaTmpOpnd(call->getDst()->getType());
 
     IRManager* inlinedIRM = new (eaMemManager) IRManager(irManager.getMemoryManager(), irManager, *methodDesc, returnOpnd);
-    DrlVMCompilationInterface& ci= (DrlVMCompilationInterface&)inlinedIRM->getCompilationInterface();
+    CompilationInterface& ci= inlinedIRM->getCompilationInterface();
     bool cibcmap = ci.isBCMapInfoRequired();
     if (cibcmap) {
         ci.setBCMapInfoRequired(false);
@@ -2249,7 +2247,7 @@
 
                         Log::out() << "---------------" << std::endl;
                         Log::out() << "    NumParams: " 
-                            << mdesc->getMethodSig()->getNumParams()<< std::endl;
+                            << mdesc->getNumParams()<< std::endl;
                         Log::out() << "    isNative: " 
                             << mdesc->isNative() << std::endl;
                         Log::out() << "    isStatic: " 
@@ -2266,8 +2264,6 @@
                             << mdesc->isInstanceInitializer() << std::endl;
                         Log::out() << "    isOverridden: " 
                             << mdesc->isOverridden() << std::endl;
-                        Log::out() << "    isJavaByteCodes: " 
-                            << mdesc->isJavaByteCodes() << std::endl;
 
                     }
                     if (_setState) {
@@ -3054,7 +3050,6 @@
         os << "      isInitOnly        " << fd->isInitOnly() << std::endl;
         os << "      isVolatile        " << fd->isVolatile() << std::endl;
         os << "      isLiteral         " << fd->isLiteral() << std::endl;
-        os << "      isUnmanagedStatic " << fd->isUnmanagedStatic() << std::endl;
         os << "      fldT      " << tt->getName() <<" "<< tt->tag<< std::endl;
         os << "      isObject  " << tt->isObject() << std::endl;
         os << "      isRef     " << tt->isReference()<< std::endl;
@@ -3116,16 +3111,13 @@
         os << "          isAbstract " << md->isAbstract() << std::endl;
         os << "          isClassInitializer " << md->isClassInitializer() << std::endl;
         os << "          isInstanceInitializer " << md->isInstanceInitializer() << std::endl;
-        os << "          isInitLocals " << md->isInitLocals() << std::endl;
         os << "          isOverridden " << md->isOverridden() << std::endl;
-        os << "          isJavaByteCodes " << md->isJavaByteCodes() << std::endl;
         os << "          Name " << md->getName() << std::endl;
         os << "          Signature " << md->getSignatureString() << std::endl;
-        MethodSignatureDesc* msd = md->getMethodSig();
-        uint32 n=msd->getNumParams();
+        uint32 n=md->getNumParams();
         os << "          Params " << n << std::endl;
         for (uint32 i = 0; i < n; i++) {
-            Type* tt = msd->getParamType(i);
+            Type* tt = md->getParamType(i);
             os << "          << "<<i<<" >> " << tt->getName() <<" "<< tt->tag<< std::endl;
             os << "              isObject  " << tt->isObject();
             os << "  isRef  " << tt->isReference()<< std::endl;
@@ -3300,7 +3292,7 @@
 
 EscAnalyzer::CnGNode*
 EscAnalyzer::addCnGNode_mp(Inst* inst, MethodDesc* md, uint32 ntype, uint32 narg) {
-    Type* type = md->getMethodSig()->getParamType(narg);
+    Type* type = md->getParamType(narg);
     CnGNode* cgnode = addCnGNode(inst, type, ntype); // new CG node
 
     cgnode->opndId = 0;
@@ -3384,7 +3376,6 @@
     CnGNode* cgnode;
     uint32 ntype=0;
     MethodDesc* md;
-    MethodSignatureDesc* msd;
     uint32 n;
     bool addinst;
     Inst* method_inst;
@@ -3590,11 +3581,10 @@
                     }
                 }
                 md=inst->asMethodInst()->getMethodDesc();
-                msd = md->getMethodSig();
-                n=msd->getNumParams();
+                n=md->getNumParams();
                 addinst=false;
                 for (uint32 i = 0; i < n; i++) {
-                    Type* tt = msd->getParamType(i);
+                    Type* tt = md->getParamType(i);
                     if (!tt->isReference()) {
                         continue;
                     }
@@ -3649,11 +3639,10 @@
                 } else {
                     md=method_inst->asMethodInst()->getMethodDesc();
                 }
-                msd = md->getMethodSig();
-                n=msd->getNumParams();
+                n=md->getNumParams();
                 addinst=false;
                 for (uint32 i = 0; i < n; i++) {
-                    Type* tt = msd->getParamType(i);
+                    Type* tt = md->getParamType(i);
                     if (!tt->isReference()) {
                         continue;
                     }
@@ -3868,7 +3857,6 @@
     CnGNode* cgn_src;
     uint32 ntype=0;
     MethodDesc* md;
-    MethodSignatureDesc* msd;
     uint32 n;
     Inst* method_inst;
     bool not_exam = false;
@@ -3984,10 +3972,9 @@
 
             case Op_DirectCall:      // call
                 md=inst->asMethodInst()->getMethodDesc();
-                msd = md->getMethodSig();
-                n=msd->getNumParams();
+                n=md->getNumParams();
                 for (uint32 i = 0; i < n; i++) {
-                    Type* tt = msd->getParamType(i);
+                    Type* tt = md->getParamType(i);
                     if (!tt->isReference()) 
                         continue;
                     cgnode=findCnGNode_mp(inst->getId(),i);
@@ -4006,10 +3993,9 @@
                 } else {
                     md=method_inst->asMethodInst()->getMethodDesc();
                 }
-                msd = md->getMethodSig();
-                n=msd->getNumParams();
+                n=md->getNumParams();
                 for (uint32 i = 0; i < n; i++) {
-                    Type* tt = msd->getParamType(i);
+                    Type* tt = md->getParamType(i);
                     if (!tt->isReference()) 
                         continue;
                     cgnode = findCnGNode_mp(inst->getId(),i);
@@ -4203,7 +4189,7 @@
             os << ((MethodDesc*)(*it)->refObj)->getParentType()->getName() << "::";
             os << ((MethodDesc*)(*it)->refObj)->getName() << std::endl;
             os << "                                ";
-            os << ((MethodDesc*)(*it)->refObj)->getMethodSig()->getParamType((*it)->opndId)->getName();
+            os << ((MethodDesc*)(*it)->refObj)->getParamType((*it)->opndId)->getName();
         }
         if ((*it)->nodeType & NT_STFLD) {    //field node 
             fd = ((Inst*)(*it)->refObj)->asFieldAccessInst()->getFieldDesc();
@@ -6659,4 +6645,5 @@
 
 
 } //namespace Jitrino 
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp Tue Apr  3 02:30:33 2007
@@ -21,6 +21,7 @@
  *
  */
 
+#include "EMInterface.h"
 #include "Log.h"
 #include "methodtable.h"
 #include "inliner.h"
@@ -31,7 +32,6 @@
 #include "Loop.h"
 #include "simplifier.h"
 #include "JavaByteCodeParser.h"
-#include "EdgeProfiler.h"
 #include "StaticProfiler.h"
 #include "optimizer.h"
 
@@ -444,15 +444,12 @@
 
 bool
 Inliner::isLeafMethod(MethodDesc& methodDesc) {
-    if(methodDesc.isJavaByteCodes()) {
-        uint32 size = methodDesc.getByteCodeSize();
-        const Byte* bytecodes = methodDesc.getByteCodes();
-        ByteCodeParser parser((const uint8*)bytecodes,size);
-        JavaByteCodeLeafSearchCallback leafTester;
-        parser.parse(&leafTester);
-        return leafTester.isLeaf();
-    }
-    return false;
+    uint32 size = methodDesc.getByteCodeSize();
+    const Byte* bytecodes = methodDesc.getByteCodes();
+    ByteCodeParser parser((const uint8*)bytecodes,size);
+    JavaByteCodeLeafSearchCallback leafTester;
+    parser.parse(&leafTester);
+    return leafTester.isLeaf();
 }
 
 void

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.cpp Tue Apr  3 02:30:33 2007
@@ -66,7 +66,7 @@
     BitSet excOpnds(leMemManager,irManager.getOpndManager().getNumSsaOpnds());
     StlDeque<Inst*> candidateSet(leMemManager);
     optCandidates = new (leMemManager) OptCandidates(leMemManager);
-    CompilationInterface::MethodSideEffect m_sideEff = compInterface.getMethodHasSideEffect(&md); 
+    Method_Side_Effects m_sideEff = md.getSideEffect(); 
 
     const Nodes& nodes = irManager.getFlowGraph().getNodes();
     Nodes::const_iterator niter;
@@ -90,10 +90,10 @@
     isExceptionInit = md.isInstanceInitializer() && 
             md.getParentType()->isLikelyExceptionType();
 //  core api exception init
-    if (m_sideEff == CompilationInterface::MSE_UNKNOWN && isExceptionInit 
+    if (m_sideEff == MSE_Unknown && isExceptionInit 
             && strncmp(md.getParentType()->getName(),"java/lang/",10) == 0) {
-        m_sideEff = CompilationInterface::MSE_NO;
-        compInterface.setMethodHasSideEffect(&md,m_sideEff);
+        m_sideEff = MSE_False;
+        md.setSideEffect(m_sideEff);
 #ifdef _DEBUG
         if (Log::isEnabled()) {
             Log::out() << "      core api exc "; md.printFullName(Log::out()); 
@@ -137,9 +137,9 @@
 #endif
                 }
             }
-            if (m_sideEff==CompilationInterface::MSE_UNKNOWN)
+            if (m_sideEff == MSE_Unknown)
                 if (instHasSideEffect(inst)) {
-                    m_sideEff=CompilationInterface::MSE_YES;
+                    m_sideEff = MSE_True;
 #ifdef _DEBUG
                     if (Log::isEnabled()) {
                         Log::out() << "~~~~~~inst sideEff "; 
@@ -149,8 +149,8 @@
                 }
         }
     }
-    if (compInterface.getMethodHasSideEffect(&md)==CompilationInterface::MSE_UNKNOWN) {
-        if (m_sideEff == CompilationInterface::MSE_UNKNOWN)
+    if (md.getSideEffect() == MSE_Unknown) {
+        if (m_sideEff == MSE_Unknown)
             if (isExceptionInit && isArgCheckNull) {
 #ifdef _DEBUG
                 if (Log::isEnabled()) {
@@ -158,10 +158,10 @@
                     md.printFullName(Log::out()); Log::out() << std::endl; 
                 }
 #endif
-                m_sideEff = CompilationInterface::MSE_NULL_PARAM;
+                m_sideEff = MSE_True_Null_Param;
             } else
-                m_sideEff = CompilationInterface::MSE_NO;
-        compInterface.setMethodHasSideEffect(&md,m_sideEff);
+                m_sideEff = MSE_False;
+        md.setSideEffect(m_sideEff);
     } 
 
     for(niter = nodes.begin(); niter != nodes.end(); ++niter) {
@@ -633,7 +633,7 @@
 LazyExceptionOpt::methodCallHasSideEffect(Inst* inst) {
     uint32 opcode = inst->getOpcode();
     MethodDesc* cmd;
-    CompilationInterface::MethodSideEffect mse;
+    Method_Side_Effects mse;
 
     if (opcode==Op_DirectCall || opcode==Op_TauVirtualCall) {
         cmd = inst->asMethodCallInst()->getMethodDesc();
@@ -657,25 +657,25 @@
     }
 #endif
     
-    mse=compInterface.getMethodHasSideEffect(cmd);
+    mse = cmd->getSideEffect();
 #ifdef _DEBUG
-    if (mse!=CompilationInterface::MSE_UNKNOWN) {
+    if (mse != MSE_Unknown) {
         if (Log::isEnabled()) {
             Log::out() << "    checkMC: prev.set sideEff " << mse << "  "; 
             inst->print(Log::out()); Log::out() << std::endl;
         }
     }
 #endif
-    if (mse==CompilationInterface::MSE_YES) {
+    if (mse == MSE_True) {
         return true;
     }
-    if (mse==CompilationInterface::MSE_NO) {
+    if (mse == MSE_False) {
         return false;
     }
 //  core api exception init
     if (cmd->isInstanceInitializer() && cmd->getParentType()->isLikelyExceptionType()
             && strncmp(cmd->getParentType()->getName(),"java/lang/",10) == 0) {
-        compInterface.setMethodHasSideEffect(cmd,CompilationInterface::MSE_NO);
+        cmd->setSideEffect(MSE_False);
 #ifdef _DEBUG
         if (Log::isEnabled()) {
             Log::out() << "    checkMC: core api exc "; 
@@ -719,7 +719,7 @@
         return true;  // cannot compile <init> before <clinit> (to fix vm)
     }
 
-    if (mse==CompilationInterface::MSE_UNKNOWN) {  // try to compile method
+    if (mse == MSE_Unknown) {  // try to compile method
         if (!compInterface.compileMethod(cmd)) {
 #ifdef _DEBUG
             if (Log::isEnabled()) {
@@ -728,22 +728,22 @@
 #endif
             return true;
         } else {
-             mse = compInterface.getMethodHasSideEffect(cmd);
+             mse = cmd->getSideEffect();
 #ifdef _DEBUG
             if (Log::isEnabled()) {
                 Log::out() << "    checkMC: method was compiled, sideEff " 
                     << mse << std::endl;
             }
 #endif
-            if (mse==CompilationInterface::MSE_YES)
+            if (mse == MSE_True)
                 return true;
-            if (mse==CompilationInterface::MSE_NO) {
+            if (mse == MSE_False) {
                 return false;
             }
        }
     }
 
-    if (mse==CompilationInterface::MSE_NULL_PARAM) {
+    if (mse == MSE_True_Null_Param) {
         uint32 nsrc=inst->getNumSrcOperands();
         bool mayBeNull;
         if (nsrc>3) {
@@ -1111,4 +1111,5 @@
 }
 
 } //namespace Jitrino 
+
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp Tue Apr  3 02:30:33 2007
@@ -23,7 +23,6 @@
 
 #undef STANDALONE_TEST
 
-#include "assert.h"
 #include <iostream>
 #include <fstream>
 #include <float.h>
@@ -56,20 +55,11 @@
 
 #include "Stl.h"
 #include "simplifier.h"
-#include "open/types.h"
 #include "optarithmetic.h"
 
 
 
 namespace Jitrino {
-
-#ifdef PLATFORM_POSIX
-// isnan(double s) is declared in float.h
-#else
-inline bool isnan(double s) {
-    return (_isnan(s) != 0);
-}
-#endif
 
 #ifndef DEBUG_MULTIPLYBYCONSTANT
 #define DEBUGPRINT(x)

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optimizer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optimizer.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optimizer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optimizer.cpp Tue Apr  3 02:30:33 2007
@@ -59,7 +59,6 @@
 #include "StaticProfiler.h"
 #include "lazyexceptionopt.h"
 #include "CompilationContext.h"
-#include "EdgeProfiler.h"
 #include "PMFAction.h"
 
 namespace Jitrino {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp?view=diff&rev=525110&r1=525109&r2=525110
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp Tue Apr  3 02:30:33 2007
@@ -41,6 +41,7 @@
 
 #include <float.h>
 #include <math.h>
+#include "PlatformDependant.h"
 
 namespace Jitrino {
 /*
@@ -50,20 +51,6 @@
  * Implementation. Morgan Kaufmann, San Francisco, CA, 1997].
  */
 
-#ifdef PLATFORM_POSIX
-inline bool isFinite(double s) {
-    return (finite(s) != 0);
-}
-// isnan(double s) is declared in float.h
-#else
-inline bool isFinite(double s) {
-    return (_finite(s) != 0);
-}
-inline bool isnan(double s) {
-    return (_isnan(s) != 0);
-}
-#endif
-
 
 DEFINE_SESSION_ACTION(SimplificationPass, simplify, "Perform simplification pass");
 void
@@ -3071,7 +3058,7 @@
         case Type::Single: // single
             {
                 float s = value.s;
-                if (!isFinite((double)s)) {
+                if (!finite((double)s)) {
                     alwaysThrows = true;
                     return genTauUnsafe()->getDst();
                 }
@@ -3080,7 +3067,7 @@
         case Type::Double:
             {
                 double d = value.d;
-                if (!isFinite(d)) {
+                if (!finite(d)) {
                     alwaysThrows = true;
                     return genTauUnsafe()->getDst();
                 }



Mime
View raw message