You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by an...@apache.org on 2017/09/07 01:55:05 UTC

[11/30] incubator-trafodion git commit: TRAFODION-2731 CodeCleanup: Remove obsolete, legacy and unused code

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpPCodeExpGen.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeExpGen.cpp b/core/sql/exp/ExpPCodeExpGen.cpp
index 2301481..e28030e 100644
--- a/core/sql/exp/ExpPCodeExpGen.cpp
+++ b/core/sql/exp/ExpPCodeExpGen.cpp
@@ -54,11 +54,9 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
 						UInt32 f) {
 
 #ifdef _DEBUG
-#ifndef __EID
   if (getenv("NO_PCODE"))
     return ex_expr::EXPR_OK;
 #endif
-#endif
 
   // If the expression mode does not indicate that PCODE is "ON", then
   // don't generate any code. It is important not to allocate any
@@ -78,7 +76,6 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
   PCodeBinary *pCode = NULL;
   NABoolean versionOK = TRUE;
 #ifdef _DEBUG
-#ifndef __EID
   // for debug
   char  *buf;
   Int32 bufLen = 0;  // to store PCode in ascii for to buf, set it to 16384
@@ -89,7 +86,6 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
       bufLen = 0;
   }
 #endif
-#endif
 
   if (pCode_.getPointer()) {
     pCode = getPCodeBinary();
@@ -175,15 +171,10 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
       // If offset is UINT_MAX, pcode is normally generated unless
       // CQD says otherwise or if this operation is for insert/update.
       for(short i = 0; i < clause->getNumOperands(); i++) {
-#if defined(__EID)
-	if ((clause->getOperand(i)->getOffset() == UINT_MAX) ||
-            (clause->getOperand(i)->isAddedCol() && !pCodeSpecialFields()))
-#else
 	if (((clause->getOperand(i)->getOffset() == UINT_MAX) && 
               !handleIndirectVC()) ||                             
             (clause->getOperand(i)->isAddedCol() && 
               !pCodeSpecialFields()))
-#endif
         {
 	  setPCodeObject(0);
 	  pCode_ = 0;
@@ -269,11 +260,9 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
   }
 
 #ifdef _DEBUG
-#ifndef __EID
   if (dumpPci == 1)
     PCode::dumpContents(code, buf, bufLen);
 #endif
-#endif
 
   // Fixup PCI CLAUSE_BRANCH instructions. Modify the corresponding TARGET
   // PCIs so that they point to the actual PCIs for the branch sources.
@@ -310,11 +299,9 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
 
 
 #ifdef _DEBUG
-#ifndef __EID
   if (dumpPci == 1)
     PCode::dumpContents(code, buf, bufLen);
 #endif
-#endif
 
   // Fixup addresses. This requires a pass over
   // the PCODE instruction list. Any instruction that access memory
@@ -386,11 +373,9 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
   }
 
 #ifdef _DEBUG
-#ifndef __EID
   if (dumpPci == 1)
     PCode::dumpContents(code, buf, bufLen);
 #endif
-#endif
 
 
   // Do some optimization if required and possible:
@@ -419,7 +404,7 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
 
       PCI *storePci = iter.first();
 
-#if (defined (_DEBUG) && !(defined(__EID)))
+#if (defined (_DEBUG))
       if(!getenv("PCODE_NO_MOVE_REMOVE"))
 #endif
         // Case 1:
@@ -537,7 +522,7 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
 
               storePci = iter.next();
             } // while (storePci)
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
           GenAssert(inBranch == 0, "Unmatched branch and target instruction")
 #endif
         }  // !getenv("PCODE_NO_MOVE_REMOVE")
@@ -688,7 +673,7 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
                 // Standard Sizes are: 1, 2, 4 and 8 byte moves.
                 // This avoids doing a str_cpy_all for these standard sizes.
                 //
-#if (defined (_DEBUG) && !(defined(__EID)))
+#if (defined (_DEBUG))
                 if (!getenv("PCODE_NO_STD_MOVE"))
 #endif
                   {
@@ -745,7 +730,7 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
 	          }
 	    }    // if PCIT::MOVE_MBIN8_MBIN8_IBIN32S
         else
-#if (defined (_DEBUG) && !(defined(__EID)))
+#if (defined (_DEBUG))
              if(!getenv("PCODE_NO_FLOAT_RANGE_REMOVE"))
             {
 #endif
@@ -768,7 +753,7 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
                         }
                     }
                 }
-#if (defined (_DEBUG) && !(defined(__EID)))
+#if (defined (_DEBUG))
             }  // !getenv("PCODE_NO_FLOAT_RANGE_REMOVE")
 #endif
 
@@ -777,11 +762,9 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
     } // PCODE_OPTIMIZE
 
 #ifdef _DEBUG
-#ifndef __EID
   if (dumpPci == 1)
     PCode::dumpContents(code, buf, bufLen);
 #endif
-#endif
 
   // Since the call to get the base data address for a tupp is relatively
   // expensive (triple dereference along with relocation checking), we want
@@ -931,7 +914,7 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
   }
 
   //#ifndef NDEBUG
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
   if(getenv("PCODE_PRINT")) {
     fprintf(stderr, "PCode ...\n");
     PCode::print(code);
@@ -940,11 +923,9 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
 #endif
 
 #ifdef _DEBUG
-#ifndef __EID
   if (dumpPci == 1)
     PCode::dumpContents(code, buf, bufLen);
 #endif
-#endif
 
   codeObject->setPCIList(code);
   setPCodeObject(codeObject);
@@ -958,24 +939,20 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
   pCode_.getPointer()->setContainsClauseEval(containsClauseEval);
 
 #ifdef _DEBUG
-#ifndef __EID
   if (dumpPci == 1)
     PCode::dumpContents(pCode_.getPointer()->getPCodeBinary(), buf, bufLen);
 #endif
-#endif
 
   // get rid of the temporary object
   if (! ex_expr_base::forShowplan(f)) 
     setPCodeObject(0);
 
-#ifndef __EID
   // Perform PCODE optimizations
   if (pCodeMode_ & PCODE_LLO) {
     PCodeCfg* cfg = new(heap) PCodeCfg(this, atpMap, atpIndexMap, heap, space);
     cfg->optimize();
     NADELETE(cfg, PCodeCfg, heap);
   }
-#endif
 
   // see if move fastpath could be done.
   // In this case, we move source to target directly without going
@@ -984,11 +961,9 @@ ex_expr::exp_return_type ex_expr::pCodeGenerate(Space * space,
   // 
   PCodeBinary *pc = getPCodeBinary();
 #ifdef _DEBUG
-#ifndef __EID
   if (getenv("NO_PCODE_MOVE_FASTPATH"))
     return ex_expr::EXPR_OK;
 #endif
-#endif
   if (pc)
     {
       if ((pc[0] == 2) &&

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpPCodeInstruction.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeInstruction.h b/core/sql/exp/ExpPCodeInstruction.h
index 43a1b4f..2cf40e2 100644
--- a/core/sql/exp/ExpPCodeInstruction.h
+++ b/core/sql/exp/ExpPCodeInstruction.h
@@ -51,14 +51,8 @@ typedef PCIType PCIT;
 typedef PCIAddressingModeList AML;
 typedef PCIOperandList OL;
 typedef PCodeInstruction PCI;
-#ifdef NA_64BIT
-// dg64 - a bit of a guess
 typedef Int64 PCIID; 
-#else
-typedef Int32 PCIID; 
-#endif
 
-// NA_64BIT PCode changes
 // PCode Binary (formally referred as code) remains to be 32-bit long on
 // 64-bit platform but when it contains pointers/addresses it takes two
 // consecutive storge space. The same applies to the operand list as Operand
@@ -83,7 +77,7 @@ typedef Int32 PCodeBinary;
 // static member functions for converting these enumerations to strings
 // for display.
 //
-class SQLEXP_LIB_FUNC  PCIType {
+class PCIType {
 public:
 
   // PCode operations -- These enumerations represent the different PCode
@@ -759,13 +753,10 @@ public:
 
   // Helper functions for displaying the enumerations
   //
-NA_EIDPROC
   static const char *operationString(PCIType::Operation op);
-NA_EIDPROC
   static const char *addressingModeString(PCIType::AddressingMode am);
   
   //buf should be 32 bytes
-NA_EIDPROC
   static void operandString(Int32 operand, char* buf); 
 
   static char *instructionString(PCIType::Instruction instr);
@@ -790,11 +781,10 @@ NA_EIDPROC
 // The AML and OL classes are only meant to be used to simply argument
 // passing to the PCI constructors. Nothing more.
 //
-class SQLEXP_LIB_FUNC  PCIAddressingModeList {
+class PCIAddressingModeList {
 public:
   // Constructor
   //
-  NA_EIDPROC
   PCIAddressingModeList(PCIType::AddressingMode am1 =PCIType::AM_NONE,
 			PCIType::AddressingMode am2 =PCIType::AM_NONE,
 			PCIType::AddressingMode am3 =PCIType::AM_NONE,
@@ -818,9 +808,7 @@ public:
   
   // Accessors
   //
-NA_EIDPROC
   Int32 getNumberAddressingModes() const { return numberAddressingModes_; };
-NA_EIDPROC
   PCIType::AddressingMode getAddressingMode(Int32 mode) const
   { return addressingMode_[mode]; };
   
@@ -849,77 +837,76 @@ private:
 //
 // See PCIAddressingMode comments above. 
 //
-class SQLEXP_LIB_FUNC  PCIOperandList {
+class PCIOperandList {
 public:
   // Constructors
   //
-  NA_EIDPROC PCIOperandList() { initList(0); };
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1) { initList(1, arg1); };
+  PCIOperandList() { initList(0); };
+  PCIOperandList(PCIType::Operand arg1) { initList(1, arg1); };
 
-  NA_EIDPROC PCIOperandList(Int64 arg1) { 
+  PCIOperandList(Int64 arg1) { 
     numberOperands_ = 2;
     *((Int64*)operand_) = arg1;
   };
 
-#ifdef NA_64BIT
-  NA_EIDPROC PCIOperandList(Int64 arg1, PCIType::Operand arg2) {
+  PCIOperandList(Int64 arg1, PCIType::Operand arg2) {
     numberOperands_ = 3;
     *((Int64*)&operand_[0]) = arg1;
     operand_[2] = arg2;
   };
-  NA_EIDPROC PCIOperandList(Int64 arg1, Int64 arg2) {
+  PCIOperandList(Int64 arg1, Int64 arg2) {
     numberOperands_ = 4;
     *((Int64*)&operand_[0]) = arg1;
     *((Int64*)&operand_[2]) = arg2;
   };
-#endif
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2) { initList(2, arg1, arg2); };
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3) { 
+
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2) { initList(2, arg1, arg2); };
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3) { 
     initList(3, arg1, arg2, arg3); 
   };
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, Int32 arg4) { 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, Int32 arg4) { 
     initList(4, arg1, arg2, arg3, arg4); 
   };
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, Int64 arg4) { 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, Int64 arg4) { 
     initList(5, arg1, arg2, arg3, 0, 0); 
     numberOperands_ = 5;
     *((Int64*)&operand_[3]) = arg4;
   };
 
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5) 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5) 
   { 
     initList(5, arg1, arg2, arg3, arg4, arg5); 
   };
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6) { 
     initList(6, arg1, arg2, arg3, arg4, arg5, arg6); 
   };
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7) { 
     initList(7, arg1, arg2, arg3, arg4, arg5, arg6, arg7); 
   };
-#ifdef NA_64BIT
-  NA_EIDPROC PCIOperandList(Int64 arg1, Int64 arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+
+  PCIOperandList(Int64 arg1, Int64 arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8) { 
     numberOperands_ = 10;
     *((Int64*)&operand_[0]) = arg1; *((Int64*)&operand_[2]) = arg2;
     operand_[4] = arg3; operand_[5] = arg4; operand_[6] = arg5;
     operand_[7] = arg6; operand_[8] = arg7; operand_[9] = arg8;
   };
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, Int64 arg7, Int64 arg8) { 
     numberOperands_ = 10;
     operand_[0] = arg1; operand_[1] = arg2; operand_[2] = arg3;
     operand_[3] = arg4; operand_[4] = arg5; operand_[5] = arg6;
     *((Int64*)&operand_[6]) = arg7; *((Int64*)&operand_[8]) = arg8;
   };
-#endif
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8) { 
     initList(8, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); 
   };
-#ifdef NA_64BIT
-  NA_EIDPROC PCIOperandList(Int64 arg1, Int64 arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+
+  PCIOperandList(Int64 arg1, Int64 arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9) { 
     numberOperands_ = 11;
     *((Int64*)&operand_[0]) = arg1; *((Int64*)&operand_[2]) = arg2;
@@ -927,17 +914,17 @@ public:
     operand_[7] = arg6; operand_[8] = arg7; operand_[9] = arg8;
     operand_[10] = arg9;
   }; 
-#endif
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9) { 
     initList(9, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
   }; 
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10){
     initList(10, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); 
   };
-#ifdef NA_64BIT
-  NA_EIDPROC PCIOperandList(Int64 arg1, Int64 arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+
+  PCIOperandList(Int64 arg1, Int64 arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
 			    PCIType::Operand arg11){
     numberOperands_ = 13;
@@ -946,41 +933,41 @@ public:
     operand_[7] = arg6; operand_[8] = arg7; operand_[9] = arg8;
     operand_[10] = arg9; operand_[11] = arg10; operand_[12] = arg11;
   };
-#endif
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
 			    PCIType::Operand arg11){
     initList(11, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10,
 	     arg11); 
   };
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
 			    PCIType::Operand arg11, PCIType::Operand arg12){
     initList(12, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10,
 	     arg11, arg12); 
   };
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
 			    PCIType::Operand arg11, PCIType::Operand arg12, PCIType::Operand arg13){
     initList(13, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10,
 	     arg11, arg12, arg13); 
   };
   
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
                             PCIType::Operand arg11, PCIType::Operand arg12, PCIType::Operand arg13, PCIType::Operand arg14){
     initList(14, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10,
              arg11, arg12, arg13, arg14); 
   };
 
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
                             PCIType::Operand arg11, PCIType::Operand arg12, PCIType::Operand arg13, PCIType::Operand arg14, PCIType::Operand arg15){
     initList(15, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10,
              arg11, arg12, arg13, arg14, arg15); 
   };
 
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
                             PCIType::Operand arg11, PCIType::Operand arg12, PCIType::Operand arg13, PCIType::Operand arg14,
                             PCIType::Operand arg15, PCIType::Operand arg16){
@@ -988,7 +975,7 @@ public:
              arg11, arg12, arg13, arg14, arg15, arg16); 
   };
 
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
                             PCIType::Operand arg11, PCIType::Operand arg12, PCIType::Operand arg13, PCIType::Operand arg14,
                             PCIType::Operand arg15, PCIType::Operand arg16, PCIType::Operand arg17){
@@ -996,7 +983,7 @@ public:
              arg11, arg12, arg13, arg14, arg15, arg16, arg17); 
   };
 
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
                             PCIType::Operand arg11, PCIType::Operand arg12, PCIType::Operand arg13, PCIType::Operand arg14,
                             PCIType::Operand arg15, PCIType::Operand arg16, PCIType::Operand arg17, PCIType::Operand arg18){
@@ -1004,7 +991,7 @@ public:
              arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); 
   };
 
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
                             PCIType::Operand arg11, PCIType::Operand arg12, PCIType::Operand arg13, PCIType::Operand arg14, 
                             PCIType::Operand arg15, PCIType::Operand arg16, PCIType::Operand arg17, PCIType::Operand arg18,
@@ -1013,7 +1000,7 @@ public:
              arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); 
   };
 
-  NA_EIDPROC PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
+  PCIOperandList(PCIType::Operand arg1, PCIType::Operand arg2, PCIType::Operand arg3, PCIType::Operand arg4, PCIType::Operand arg5, 
 			    PCIType::Operand arg6, PCIType::Operand arg7, PCIType::Operand arg8, PCIType::Operand arg9, PCIType::Operand arg10,
                             PCIType::Operand arg11, PCIType::Operand arg12, PCIType::Operand arg13, PCIType::Operand arg14, 
                             PCIType::Operand arg15, PCIType::Operand arg16, PCIType::Operand arg17, PCIType::Operand arg18,
@@ -1025,15 +1012,13 @@ public:
 
   // Accessors
   //
-NA_EIDPROC
   Int32 getNumberOperands() { return numberOperands_; };
-NA_EIDPROC
   PCIType::Operand getOperand(Int32 op) { return operand_[op]; };
     
 private:
   // Helper for constuctors
   //
-  NA_EIDPROC 
+  
   void initList(Int32 numberOperands, 
 		PCIType::Operand op1 =0, PCIType::Operand op2 =0, PCIType::Operand op3 =0, PCIType::Operand op4 =0, 
 		PCIType::Operand op5 =0, PCIType::Operand op6 =0, PCIType::Operand op7 =0, PCIType::Operand op8 =0, 
@@ -1078,33 +1063,29 @@ class PCodeInstruction {
 public:
   // Constructors
   //
-  NA_EIDPROC PCodeInstruction(PCIType::Operation operation) {
+  PCodeInstruction(PCIType::Operation operation) {
     AML aml;
     OL ol;
     init(operation, aml, ol);
   };
 
-  NA_EIDPROC PCodeInstruction(PCIType::Operation operation, AML &aml) {
+  PCodeInstruction(PCIType::Operation operation, AML &aml) {
     OL ol;
     init(operation, aml, ol);
   };
 
-  NA_EIDPROC PCodeInstruction(PCIType::Operation operation, AML &aml, OL &ol) { 
+  PCodeInstruction(PCIType::Operation operation, AML &aml, OL &ol) { 
     init(operation, aml, ol);
   }
 
-  NA_EIDPROC PCodeInstruction(const PCodeInstruction *pci) { copy(pci); };
+  PCodeInstruction(const PCodeInstruction *pci) { copy(pci); };
 
   // Accessors
   //
-NA_EIDPROC
   Int32 getNumberAddressingModes() { return numberAddressingModes_; };
-NA_EIDPROC
   Int32 getNumberOperands() { return numberOperands_; };
-NA_EIDPROC
   void setNumberOperands(Int32 numOperands) { numberOperands_ = numOperands; };
 
-NA_EIDPROC
   void replaceAddressingModesAndOperands(AML &aml, OL &ol) {
     numberAddressingModes_ = aml.getNumberAddressingModes();
     Int32 i = 0;
@@ -1118,58 +1099,35 @@ NA_EIDPROC
       operand_[i] = ol.getOperand(i);
   };
 
-NA_EIDPROC
   PCIType::Operation getOperation() { return operation_; };
-NA_EIDPROC
   PCIType::AddressingMode getAddressingMode(Int32 am) 
     { return addressingMode_[am]; };
-NA_EIDPROC
-#ifdef NA_64BIT
   Long getLongOperand(Int32 op) { return *(Long*)&operand_[op]; };
-#else
-  PCIType::Operand getLongOperand(Int32 op) { return operand_[op]; };
-#endif // NA_64BIT
-NA_EIDPROC
   PCIType::Operand getOperand(Int32 op) { return operand_[op]; };
-NA_EIDPROC
-#ifdef NA_64BIT
   void setLongOperand(Int32 op, Long val) { *(Long*)&operand_[op] = val; };
-#else
-  void setLongOperand(Int32 op, PCIType::Operand val) { operand_[op] = val; };
-#endif // NA_64BIT
-NA_EIDPROC
   void setOperand(Int32 op, PCIType::Operand val) { operand_[op] = val; };
 
-NA_EIDPROC
   Int32 getCodePosition() const { return codePosition_; };
-NA_EIDPROC
   void setCodePosition(Int32 codePosition) { codePosition_ = codePosition; };
 
-NA_EIDPROC
   Int32 getStackChange();
-NA_EIDPROC
   Int32 getGeneratedCodeSize();
 
   // Helpers
   //
-NA_EIDPROC
   static Int32 temporaryStoreLoadMatch(PCodeInstruction *store, PCodeInstruction *load);
-NA_EIDPROC
   static Int32 temporaryStoreLoadOverlap(PCodeInstruction *store, PCodeInstruction *load);
-NA_EIDPROC
   static Int32 replaceUsesOfTarget(PCodeInstruction *store, PCodeInstruction *use, Int32 check);
-NA_EIDPROC
   Int32 getMemoryOperandLength(PCIType::AddressingMode, Int32 operand);
 
   // Display
   //
-NA_EIDPROC
   void print();
 
 private:
   // Private helper for constructors
   //
-  NA_EIDPROC 
+  
   void init(PCIType::Operation operation, AML &aml, OL &ol) {
     operation_ = operation;
     numberAddressingModes_ = aml.getNumberAddressingModes();
@@ -1186,7 +1144,7 @@ private:
 
   // Private helper for constructors
   //
-  NA_EIDPROC 
+  
   void copy(const PCodeInstruction *pci) {
     operation_ = pci->operation_;
     numberAddressingModes_ = pci->numberAddressingModes_;
@@ -1240,10 +1198,6 @@ private:
 
 // A general method to take pointers out of PCode binary stream
 // Takes pointer out of PCodeBinary sequences
-#ifdef NA_64BIT
 #define GetPCodeBinaryAsPtr(pcode, idx) (*(Long*)&(pcode[idx]))
-#else
-#define GetPCodeBinaryAsPtr(pcode, idx) (pcode[idx])
-#endif
 
 #endif  // ExpPCodeInstruction_h

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpPCodeList.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeList.h b/core/sql/exp/ExpPCodeList.h
index afb6b57..eb93f3f 100644
--- a/core/sql/exp/ExpPCodeList.h
+++ b/core/sql/exp/ExpPCodeList.h
@@ -54,10 +54,10 @@ class PCILink;
 class PCIList;
 class PCIListIter;
 
-class SQLEXP_LIB_FUNC  ListLink {
+class ListLink {
 public:
-  NA_EIDPROC ListLink() { prev_ = 0; next_ = 0; };
-  NA_EIDPROC ListLink(ListLink *prev, ListLink *next) { prev_ = prev; next_ = next; };
+  ListLink() { prev_ = 0; next_ = 0; };
+  ListLink(ListLink *prev, ListLink *next) { prev_ = prev; next_ = next; };
 
   ListLink *getNext() { return next_; };
   ListLink *getPrev() { return prev_; };
@@ -71,10 +71,10 @@ private:
 };
 
 
-class SQLEXP_LIB_FUNC  ListBase {
+class ListBase {
 public:
-  NA_EIDPROC ListBase() { tail_ = NULL; }
-  NA_EIDPROC ListBase(ListLink *tail) { tail_ = tail; }
+  ListBase() { tail_ = NULL; }
+  ListBase(ListLink *tail) { tail_ = tail; }
 
   void insert(ListLink *item) { 
     if(tail_) { 
@@ -124,13 +124,12 @@ private:
 };
 
 
-class SQLEXP_LIB_FUNC  ListBaseIter {
+class ListBaseIter {
 public:
-  NA_EIDPROC ListBaseIter(const ListBase &base) { 
+  ListBaseIter(const ListBase &base) { 
     base_ = &base; link_ = base_->getTail(); 
   };
   
-  NA_EIDPROC
   ListBaseIter(ListBaseIter &iter) {
     base_ = iter.base_; link_ = iter.link_;
   };
@@ -156,9 +155,8 @@ private:
 };
 
 
-class SQLEXP_LIB_FUNC  PCILink : public ListLink {
+class PCILink : public ListLink {
 public:
-  NA_EIDPROC
   PCILink(PCodeInstruction *pci) : info_(pci) { ; };
   PCodeInstruction *getData() { return info_; };
 
@@ -168,12 +166,12 @@ private:
 };
 
 
-class SQLEXP_LIB_FUNC  PCIList : private ListBase {
+class PCIList : private ListBase {
   friend class PCIListIter;
 
 public:
-  NA_EIDPROC PCIList(CollHeap *heap) : heap_(heap) { ; };
-  NA_EIDPROC PCIList(PCILink *base, CollHeap *heap) : 
+  PCIList(CollHeap *heap) : heap_(heap) { ; };
+  PCIList(PCILink *base, CollHeap *heap) : 
                         ListBase(base), heap_(heap) { ; };
 
   void insert(PCodeInstruction *pci) { 
@@ -209,12 +207,10 @@ private:
 };
 
 
-class SQLEXP_LIB_FUNC  PCIListIter : private ListBaseIter {
+class PCIListIter : private ListBaseIter {
 public:
-  NA_EIDPROC
   PCIListIter(const PCIList &pcilist)
     : ListBaseIter(pcilist) { ; };
-  NA_EIDPROC
   PCIListIter(PCIListIter &pciListIter)
     : ListBaseIter(pciListIter) { ; };
   PCodeInstruction *next() { 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpPCodeOptimizations.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeOptimizations.cpp b/core/sql/exp/ExpPCodeOptimizations.cpp
index 26be30c..fff0647 100644
--- a/core/sql/exp/ExpPCodeOptimizations.cpp
+++ b/core/sql/exp/ExpPCodeOptimizations.cpp
@@ -26,15 +26,13 @@
 #include "CmpCommon.h"
 #include "PCodeExprCache.h"
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
   #define DUMP_PHASE(str,flag1,flag2) \
     if (flag1) printBlocks(str, flag2);
 #else
   #define DUMP_PHASE(str,flag1,flag2)
 #endif
 
-
-
 /*****************************************************************************
  * Debug code
  *****************************************************************************/
@@ -252,7 +250,7 @@ void PCodeOperand::print( PCodeCfg *cfg )
 /*****************************************************************************
  * Hash functions for hash table
  *****************************************************************************/
-NA_EIDPROC ULng32 constHashFunc(const PCodeConstants& c) {
+ULng32 constHashFunc(const PCodeConstants& c) {
   char* data = (char*)c.data_;
   ULng32 val = 0;
   Int32 i;
@@ -263,19 +261,19 @@ NA_EIDPROC ULng32 constHashFunc(const PCodeConstants& c) {
   return val + c.align_;
 }
 
-NA_EIDPROC ULng32 nullTripleHashFunc(const NullTriple& o) {
+ULng32 nullTripleHashFunc(const NullTriple& o) {
   return (o.atp_ * 1000) + o.idx_ + o.off_;
 }
 
-NA_EIDPROC ULng32 operandHashFunc(const PCodeOperand& o) {
+ULng32 operandHashFunc(const PCodeOperand& o) {
   return (o.stackIndex_ * 1000) + o.offset_ + o.nullBitIndex_;
 }
 
-NA_EIDPROC ULng32 collIndexHashFunc(const CollIndex & o) {
+ULng32 collIndexHashFunc(const CollIndex & o) {
   return (ULng32)o;
 }
 
-NA_EIDPROC ULng32 collIndexHashFunc2(const CollIndex & o) {
+ULng32 collIndexHashFunc2(const CollIndex & o) {
   return (ULng32)o;
 }
 
@@ -287,7 +285,7 @@ NA_EIDPROC ULng32 collIndexHashFunc2(const CollIndex & o) {
 // from the input on 64-bit platform, it wouldn't affect the quality of
 // the hash value in most cases because the pcode binaries are normally
 // stored in a confined area in the optimization phase.
-NA_EIDPROC ULng32 targetHashFunc(const ULong & o) {
+ULng32 targetHashFunc(const ULong & o) {
   ULng32 v = (ULong)o;
   return v;
 }
@@ -1939,11 +1937,11 @@ void PCodeCfg::runtimeOptimize()
 
   assert (expr_->getType() == ex_expr::exp_SCAN_PRED);
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
   if (getenv("PCODE_LLO_DEBUG"))
     debug = 1;
 
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
 
   if (enableOpt) {
     // First translate pcode bytecode into PCodeInst objects
@@ -2000,7 +1998,7 @@ void PCodeCfg::optimize()
                       MERGE_BLOCKS |
                       REMOVE_EMPTY_BLOCKS;
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
   //static unsigned int count = 0;
   //static unsigned int limit = 5000000; // count=69 is problem
 
@@ -2019,7 +2017,7 @@ void PCodeCfg::optimize()
 
   //if (++count > limit)
   //  return;
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
 
   // If this pcode sequence can't be optimized, or if decided to disable opts,
   // return.
@@ -2029,10 +2027,10 @@ void PCodeCfg::optimize()
   if ( !canPCodeBeOptimized(pCode , pcodeExprIsCacheable , savedUnOptPCodeLen ) ||
        !enableOpt )
   {
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
    if ( debugSome )
      NExLog( "FOUND: PCODE EXPRESSION NOT EVEN OPTIMIZABLE\n" );
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
     return;
   }
 
@@ -2042,7 +2040,7 @@ void PCodeCfg::optimize()
   if ( optFlags_ & OPT_PCODE_CACHE_DISABLED )
      pcodeExprIsCacheable = FALSE ;
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
   if ( debugSome )
   {
     if ( pcodeExprIsCacheable )
@@ -2050,7 +2048,7 @@ void PCodeCfg::optimize()
     else
        NExLog( "FOUND: PCODE EXPRESSION IS NOT cacheable\n" );
   }
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
 
   // Initialize counters
   initInstructionCounters();
@@ -2256,9 +2254,9 @@ void PCodeCfg::optimize()
   if ( usingCachedPCodeExpr )
      goto considerNativeCodeGen ;
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
   if (debugSome) NExLog("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
 
 #if OPT_PCC_DEBUG==1
 
@@ -2507,8 +2505,6 @@ considerNativeCodeGen:
 
   Int32 constsLenAfterOpt = newConstsAreaLen_ ;
 
-#if defined(NA_LINUX) && ! defined(__EID)
-
 #if OPT_PCC_DEBUG==1
   UInt64 totalNEgenTime = 0;
 #endif // OPT_PCC_DEBUG==1
@@ -2542,7 +2538,6 @@ considerNativeCodeGen:
       expr_->setEvalPtr( (ex_expr::evalPtrType)( (CollIndex) 0 ) );//Ensure NULL!
 
   }
-#endif // defined(NA_LINUX) && ! defined(__EID)
 
   if ( ! usingCachedPCodeExpr )
   {
@@ -2654,8 +2649,6 @@ PCodeCfg::~PCodeCfg() {
 
 void PCodeCfg::destroy()
 {
-#ifndef __EID
-
   // If we're not dealing with runtime optimizations happening in EID, then
   // all memory can be quickly deallocated by deleting the main heap_, followed
   // by individual deletes of the member variables.
@@ -2678,129 +2671,8 @@ void PCodeCfg::destroy()
   NADELETEBASIC(neg1_, origHeap_);
 
   delete(heap_);
-
-#else
-
-  // Since we're in EID, that implies that we were called at runtime.  In this
-  // case, all memory was allocated within the eid heap object (and not in a
-  // heap within this heap).  As such, we delete all the objects the old
-  // fashion way.  Perhaps there is a better way of doing this, but seeing as
-  // how runtimeOptimize() is very rarely called, this should have little to
-  // no perf impact.
-
-  CollIndex i;
-
-  // Delete operands
-  //
-  // Destroy all key-value pairs in operands and operandsMap list since the
-  // objects contained in them were dynamically allocated and no longer needed.
-  //
-  if (operandToIndexMap_) {
-    PCodeOperand* key;
-    CollIndex* value;
-    NAHashDictionaryIterator<PCodeOperand, CollIndex> iter(*operandToIndexMap_);
-
-    for (i=0; i < iter.entries(); i++) {
-      iter.getNext(key, value);
-      NADELETEBASIC(key, heap_);
-      NADELETEBASIC(value, heap_);
-    }
-
-    delete operandToIndexMap_;
-  }
-
-  //
-  // Delete constants hash tables
-  //
-  if (constToOffsetMap_) {
-    PCodeConstants* key;
-    CollIndex* value;
-    NAHashDictionaryIterator<PCodeConstants,CollIndex> iter(*constToOffsetMap_);
-
-    for (i=0; i < iter.entries(); i++) {
-      iter.getNext(key, value);
-      NADELETEBASIC(key, heap_);
-      NADELETEBASIC(value, heap_);
-    }
-
-    delete constToOffsetMap_;
-  }
-
-  // Since offsetToConstMap_ is just the reverse of constToOffsetMap_, nothing
-  // to do but delete the hash table.
-  if (offsetToConstMap_)
-    delete offsetToConstMap_;
-
-  // Destroy nullToPadMap hash table
-  if (nullToPadMap_) {
-    NullTriple* key;
-    Int32* value;
-    NAHashDictionaryIterator<NullTriple, Int32> iter(*(nullToPadMap_));
-
-    for (i=0; i < iter.entries(); i++) {
-      iter.getNext(key, value);
-      NADELETEBASIC(key, heap_);
-      NADELETEBASIC(value, heap_);
-    }
-
-    delete nullToPadMap_;
-  }
-
-  // Since indexToOperandMap_ is just the reverse mapping of operandToIndexMap_,
-  // no need to delete key-value pairs for it since they were already deleted
-  // above.
-  if (indexToOperandMap_)
-    delete indexToOperandMap_;
-
-  // Destroy keys in the targets_ table since those objects were dynamically
-  // allocated.
-  if (targets_) {
-    ULong * key;
-    PCodeBinary * value;
-    NAHashDictionaryIterator<ULong, PCodeBinary> iter(*targets_);
-
-    for (i=0; i < iter.entries(); i++) {
-      iter.getNext(key, value);
-      NADELETEBASIC(key, heap_);
-    }
-
-    delete targets_;
-  }
-
-  // Delete insts
-  if (allInsts_) {
-    for (i=0; i < allInsts_->entries(); i++)
-      NADELETE(allInsts_->at(i), PCodeInst, heap_);
-
-    delete(allInsts_);
-  }
-
-  // Delete blocks
-  if (allBlocks_) {
-    for (i=0; i < allBlocks_->entries(); i++) {
-      PCodeBlock* block = allBlocks_->at(i);
-
-      if (block->reachingDefsTab_) {
-        block->reachingDefsTab_->destroy();
-        NADELETE(block->reachingDefsTab_, ReachDefsTable, heap_);
-      }
-
-      NADELETEBASIC(block, heap_);
-    }
-
-    delete(allBlocks_);
-  }
-
-  // Delete constant vectors
-  delete (zeroes_);
-  delete (ones_);
-  delete (neg1_);
-
-#endif
 }
 
-#ifndef __EID
-
 void PCodeCfg::generateShowPlan(PCodeBinary* pCode, Space* space)
 {
   if (pCode == NULL)
@@ -2812,9 +2684,9 @@ void PCodeCfg::generateShowPlan(PCodeBinary* pCode, Space* space)
   createInsts(pCode);
   createCfg();
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
   NExLog("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
 
   DUMP_PHASE("CFG [0]", TRUE, FALSE);
 
@@ -2941,9 +2813,6 @@ void PCodeCfg::generateShowPlan(PCodeBinary* pCode, Space* space)
     }
 }
 
-#endif // __EID
-
-
 /*****************************************************************************
  * PCodeCfg
  *****************************************************************************/
@@ -3439,18 +3308,10 @@ void PCodeCfg::removeReachingDefs()
 {
   FOREACH_BLOCK_FAST(block, firstInst, lastInst, inst) {
     if (block->reachingDefsTab_) {
-#ifdef __EID
-      // in cmpiler, we'll delete whole rDefsHeap_ instead of individual
-      // reaching Defs Tables
-      block->reachingDefsTab_->destroy();
-      NADELETE(block->reachingDefsTab_, ReachDefsTable, heap_);
-#endif
       block->reachingDefsTab_ = NULL;
     }
   } ENDFE_BLOCK_FAST
-#ifndef __EID
   delete(rDefsHeap_);
-#endif
 
   rDefsHeap_ = NULL;
 }
@@ -3515,12 +3376,8 @@ void PCodeCfg::computeReachingDefs(Int32 flags)
 
   NABoolean noTemps = flags & 0x1;
 
-#ifndef __EID
   // Allocate reach defs memory in separate heap for faster destruction.
   rDefsHeap_ = new(heap_) NAHeap("Pcode Rdef", (NAHeap*)heap_, (Lng32)32768);
-#else
-  rDefsHeap_ = heap_;
-#endif
 
   // Initialize reaching defs table for each live block
   FOREACH_BLOCK_REV_DFO(block, firstInst, lastInst, index) {
@@ -3825,12 +3682,10 @@ void PCodeCfg::assignBlockOffsetsAndFixup(BLOCKLIST& blockList)
                              PCode::getInstructionLength(inst->code)) - 1;
         }
 
-#ifdef NA_64BIT
         // Null branch PCode Binaries do not contail address operands
         if (inst->isAnyLogicalBranch())
           *((Long*)(targetOffsetPtrs[j])) = targetOffset;
         else
-#endif
           *(targetOffsetPtrs[j]) = (Int32)targetOffset;
       }
     }
@@ -7138,12 +6993,6 @@ NABoolean PCodeCfg::canPCodeBeOptimized( PCodeBinary * pCode
     if (clause->getClassID() == ex_clause::INOUT_TYPE)
       return FALSE;
 
-    // ExAuditImage clauses contain auditRowImageExpr pointers which point
-    // back to data (temps in particular) used by parent (like a function call
-    // with reference parameters).  We can't optimize across multiple exprs.
-    else if (clause->getClassID() == ex_clause::FUNC_AUDIT_ROW_IMAGE)
-      return FALSE;
-
     // Clauses evaluated before HbaseColumnCreate directly update the result
     // buffer of this clause. Pcode optimization will remove those pre-clauses
     // as their output is not directly referenced in another clause.
@@ -7278,7 +7127,7 @@ NABoolean PCodeCfg::createInsts (PCodeBinary * pcode)
 //
 // Used for Aligned Format to get null bit index of column
 //
-NA_EIDPROC static Int32 getBitIndex(PCodeBinary *code, const Int32 idx)
+static Int32 getBitIndex(PCodeBinary *code, const Int32 idx)
 {
   Attributes* attr = (Attributes*)GetPCodeBinaryAsPtr(code, idx);
   if (attr->getTupleFormat() == ExpTupleDesc::SQLMX_ALIGNED_FORMAT)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpPCodeOptimizations.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeOptimizations.h b/core/sql/exp/ExpPCodeOptimizations.h
index d3985e0..31ed8b9 100644
--- a/core/sql/exp/ExpPCodeOptimizations.h
+++ b/core/sql/exp/ExpPCodeOptimizations.h
@@ -123,7 +123,6 @@ inline uint16_t _byteswap_ushort(uint16_t value) {
 
 #include "ExecutionEngine/ExecutionEngine.h"
 
-#ifndef __EID  /* When in EID, must NOT reference routines in LLVM libraries */
 #include "ExecutionEngine/JIT.h"
 #include "LLVMContext.h"
 #include "llvm/Module.h"  /* Must put llvm/ here to avoid including .../cli/Module.h */
@@ -132,7 +131,6 @@ inline uint16_t _byteswap_ushort(uint16_t value) {
 #include "Analysis/Passes.h"
 #include "DataLayout.h"
 #include "Transforms/Scalar.h"
-#endif  /* __EID */
 
 #include "IRBuilder.h"
 #include "Config/config.h"
@@ -200,7 +198,7 @@ typedef NAList<NExTempListEntry*> NExTEMPSLIST ;
 
 typedef NAArray<PCodeBlock*> BLOCKARRAY;
 
-NA_EIDPROC ULng32 collIndexHashFunc2(const CollIndex & o);
+ULng32 collIndexHashFunc2(const CollIndex & o);
 
 // -----------------------------------------------------------------------
 // Macros
@@ -555,7 +553,7 @@ public:
   Int32 len_;   // Length of data
   Int32 align_; // Alignment of data
 
-  friend NA_EIDPROC ULng32 constHashFunc(const PCodeConstants& c);
+  friend ULng32 constHashFunc(const PCodeConstants& c);
 
   // Two constants are equal if their lengths, alignment, and data are the same.
   NABoolean operator==(const PCodeConstants& other) const {
@@ -659,7 +657,7 @@ public:
   Int32 idx_;  // Tupp index of null indicator
   Int32 off_;  // Column offset of null indicator
 
-  friend NA_EIDPROC ULng32 nullTripleHashFunc(const NullTriple& o);
+  friend ULng32 nullTripleHashFunc(const NullTriple& o);
 
   NABoolean operator==(const NullTriple& other) const {
     return ((other.off_ == off_) && (other.idx_ == idx_) &&
@@ -829,9 +827,9 @@ private:
 public:
 
   // Hash function used to insert operand bv element into hash table
-  NA_EIDPROC friend ULng32 operandHashFunc(const PCodeOperand& o);
+  friend ULng32 operandHashFunc(const PCodeOperand& o);
 
-  NA_EIDPROC friend ULng32 collIndexHashFunc(const CollIndex & o);
+  friend ULng32 collIndexHashFunc(const CollIndex & o);
 
   // Operator equals function to compare two operand bv elements
   NABoolean operator==(const PCodeOperand& other) const {
@@ -1305,7 +1303,7 @@ public:
   NABitVector zeroesVector;  // Zeroes constant vector
   NABitVector neg1Vector;    // Neg1 constant vector
 
-  friend NA_EIDPROC ULng32 collIndexHashFunc2(const CollIndex & o);
+  friend ULng32 collIndexHashFunc2(const CollIndex & o);
 
   ReachDefsTable* reachingDefsTab_;
 
@@ -1679,18 +1677,14 @@ public:
   static const Int32 INVALID_INT32  = 0xFEFEFEFE;
   static const Int64 INVALID_INT64  = 0xFEFEFEFEFEFEFEFELL;
 
-#ifdef NA_64BIT
   #define INVALID_LONG INVALID_INT64
-#else
-  #define INVALID_LONG INVALID_INT32
-#endif 
 
   // Static const variables used.
   static const Int32 MAX_NUM_PCODE_INSTS = 500;
   static const Int32 MAX_HASHCOMB_BULK_OPERANDS = 100;
 
   // Friend classes
-  // friend NA_EIDPROC ULng32 targetHashFunc(const Int32 & o);
+  // friend ULng32 targetHashFunc(const Int32 & o);
 
   // Constructor Routines
   PCodeCfg(ex_expr* expr,
@@ -1711,11 +1705,7 @@ public:
     // deallocation can be done quickly.  If we're called from within EID,
     // however, heap_ should just be the heap passed in.
 
-#ifndef __EID
     heap_ = new(heap) NAHeap("Pcode", (NAHeap*)heap, (Lng32)32768);
-#else
-    heap_ = heap;
-#endif
 
     allBlocks_ = new(heap) BLOCKLIST(heap_, 10);
     allInsts_ = new(heap) INSTLIST(heap_, 20);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpPCodeOptsNativeExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeOptsNativeExpr.cpp b/core/sql/exp/ExpPCodeOptsNativeExpr.cpp
index 4cf07af..9ebd530 100755
--- a/core/sql/exp/ExpPCodeOptsNativeExpr.cpp
+++ b/core/sql/exp/ExpPCodeOptsNativeExpr.cpp
@@ -23,8 +23,6 @@
 
 // Native Expressions only officially supported on Linux for now.
 
-//#ifndef __EID  /* MOVED THIS LINE DOWN PAST PCodeCfg::NExLog() */
-
 ///////////////////////////////////////////////////////////////////////
 //
 // The following are a few notes regarding native exprs
@@ -87,8 +85,6 @@ void PCodeCfg::NExLog(const char *data)
    }
 }
 
-#ifndef __EID
-
 #if NExprDbgLvl > VV_NO
 //
 // For routines in the PCodeCfg class, we have access to the
@@ -9375,10 +9371,8 @@ void PCodeCfg::layoutNativeCode(Space* showplanSpace = NULL)
   NABoolean debug = FALSE;
   NABoolean lowerOptLevel = FALSE; // Used to reduce jit opt level.
 
-//#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
   if (getenv("NATIVE_EXPR_DEBUG"))
     debug = TRUE;
-//#endif
 
   PCodeOperand *src1, *src2, *res;
 
@@ -12391,4 +12385,3 @@ void PCodeCfg::layoutNativeCode(Space* showplanSpace = NULL)
 }
 #endif /* NA_LINUX_LIBJIT */
 
-#endif /* __EID */

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpPCodeOptsPeeling.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeOptsPeeling.cpp b/core/sql/exp/ExpPCodeOptsPeeling.cpp
index 204fd95..f56db49 100644
--- a/core/sql/exp/ExpPCodeOptsPeeling.cpp
+++ b/core/sql/exp/ExpPCodeOptsPeeling.cpp
@@ -25,7 +25,7 @@
 
 // Forward declarations
 
-NA_EIDPROC static void setNeg1ConstantsForNullBranch(PCodeInst* inst,
+static void setNeg1ConstantsForNullBranch(PCodeInst* inst,
                                                      NABitVector& zeroes,
                                                      NABitVector& ones,
                                                      NABitVector& neg1);
@@ -58,10 +58,8 @@ void PCodeCfg::reorderPredicatesHelper()
       PCodeBlock* retBlk;
       PCodeInst *retInst, *branch;
 
-#ifdef NA_64BIT
-// 64BIT revisit -- hard-coded indexes on the source side may not be correct
       branch = srcBlock->insertNewInstAfter(NULL, PCIT::BRANCH_OR);
-      // for 64bit BRANCH_OR code[0] is opcode, code[1] and code[2] are target
+      // BRANCH_OR code[0] is opcode, code[1] and code[2] are target
       // clause pointer; code[3] and code[4] are 64-bit 0; code[5] and code[6]
       // for operand #1; code[7] and code[8] for operand #2
       branch->code[3] = 0; // not necessary to clear
@@ -70,14 +68,6 @@ void PCodeCfg::reorderPredicatesHelper()
       branch->code[6] = lastInst->prev->code[2];
       branch->code[7] = branch->code[5];
       branch->code[8] = branch->code[6];
-#else // !NA_64BIT
-      branch = srcBlock->insertNewInstAfter(NULL, PCIT::BRANCH_OR);
-      branch->code[2] = 0; // not necessary to clear
-      branch->code[3] = lastInst->prev->code[1];
-      branch->code[4] = lastInst->prev->code[2];
-      branch->code[5] = branch->code[3];
-      branch->code[6] = branch->code[4];
-#endif // NA_64BIT
 
       branch->reloadOperands(this);
 
@@ -1323,7 +1313,6 @@ PCodeBlock::determineTargetBlock(NABitVector& zeroes,
 // Make the assumption that the provided instruction (a null branch) is not
 // taken, and set the known constants for the operands involved in the inst.
 //
-NA_EIDPROC
 static void setNeg1ConstantsForNullBranch(PCodeInst* inst,
                                           NABitVector& zeroes,
                                           NABitVector& ones,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpPCodeOptsRuntime.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeOptsRuntime.cpp b/core/sql/exp/ExpPCodeOptsRuntime.cpp
index 675928a..a56b8be 100644
--- a/core/sql/exp/ExpPCodeOptsRuntime.cpp
+++ b/core/sql/exp/ExpPCodeOptsRuntime.cpp
@@ -128,7 +128,7 @@ PCodePredicateGroup::PCodePredicateGroup(CollHeap* heap,
   //cost_ = (cost_ < 100) ? 1 : (cost_/100 * 100);
 }
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
 
 void PCodePredicateGroup::print()
 {
@@ -156,7 +156,7 @@ void PCodePredicateGroup::print()
   printf("\n");
 }
 
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
 
 //
 // Gets invoked BEFORE predicate groups within unit have been shuffled.  This
@@ -644,9 +644,9 @@ NABoolean PCodePredicateGroup::findUnits(GROUPLIST& unit,
   PCodePredicateGroup *sibling, *group = this;
   NABoolean unitFound = FALSE;
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
   NABoolean debug = FALSE;
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
 
   // The group is part of the unit, so add to unit and remove from workList
   unit.insert(group);
@@ -777,14 +777,14 @@ NABoolean PCodePredicateGroup::findUnits(GROUPLIST& unit,
   if (!isStatic)
     group->adjustCost(unit);
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
   if (debug) {
     printf("Unit found:\n");
     for (i=0; i < unit.entries(); i++)
       unit[i]->print();
     printf("\n");
   }
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
 
   // Record the fact on whether or not this unit contains a predicate group
   // with a write operand.
@@ -857,14 +857,14 @@ NABoolean PCodePredicateGroup::findUnits(GROUPLIST& unit,
       group->getWrites().insert(unit[i]->getWrites()[j]);
   }
 
-#if defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#if defined(_DEBUG)
   if (debug) {
     printf("Unit after swap:\n");
     for (i=0; i < unit.entries(); i++)
       unit[i]->print();
     printf("\n");
   }
-#endif // defined(_DEBUG) && !defined(NA_NO_C_RUNTIME)
+#endif // defined(_DEBUG)
 
   // Merge the rest of the unit into the leader predicate group
   while (unit.entries() > 1) {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpPackDefs.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPackDefs.cpp b/core/sql/exp/ExpPackDefs.cpp
index bf450c5..4c67134 100644
--- a/core/sql/exp/ExpPackDefs.cpp
+++ b/core/sql/exp/ExpPackDefs.cpp
@@ -54,7 +54,7 @@
 /////////////////////////////////////////////////////
 // pack procs for classes ex_expr, OutputExpr
 /////////////////////////////////////////////////////
-NA_EIDPROC void ex_expr::packStuff(void * space_)
+void ex_expr::packStuff(void * space_)
 {
   //Following code packs ex_clause elements iteratively.
   ex_clause *keepClause = NULL;
@@ -86,13 +86,12 @@ NA_EIDPROC void ex_expr::packStuff(void * space_)
   pCode_.pack(space_);  
 }
 
-NA_EIDPROC Long ex_expr::pack(void * space_)
+Long ex_expr::pack(void * space_)
 {
   packStuff(space_);
   return NAVersionedObject::pack(space_);
 }
 
-NA_EIDPROC
 void ex_expr_lean::convAddrToOffsetInPCode(void * space) {
   PCodeBinary *pcode = getPCodeBinary();
   if (!pcode)
@@ -116,7 +115,7 @@ void ex_expr_lean::convAddrToOffsetInPCode(void * space) {
   pCodeLean_ = (PCodeBinary*)((Space *)space)->convertToOffset((char*)pCodeLean_);
 }
 
-NA_EIDPROC Long ex_expr_lean::pack(void * space_)
+Long ex_expr_lean::pack(void * space_)
 {
   constantsArea_.pack(space_);
   tempsArea_.pack(space_);
@@ -128,7 +127,7 @@ NA_EIDPROC Long ex_expr_lean::pack(void * space_)
   return NAVersionedObject::pack(space_);
 }
 
-NA_EIDPROC Long AggrExpr::pack(void * space_)
+Long AggrExpr::pack(void * space_)
 {
   initExpr_.pack(space_);
   perrecExpr_.pack(space_);
@@ -139,7 +138,7 @@ NA_EIDPROC Long AggrExpr::pack(void * space_)
   return ex_expr::pack(space_);
 }
 
-NA_EIDPROC Long InputOutputExpr::pack(void * space_)
+Long InputOutputExpr::pack(void * space_)
 {
   return ex_expr::pack(space_);
 }
@@ -148,362 +147,362 @@ NA_EIDPROC Long InputOutputExpr::pack(void * space_)
 // pack procs for clauses
 //////////////////////////////////////////////
 
-NA_EIDPROC Long ex_aggregate_clause::pack(void * space_)
+Long ex_aggregate_clause::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_aggregate_clause));
 }
 
-NA_EIDPROC Long ex_arith_clause::pack(void * space_)
+Long ex_arith_clause::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_arith_clause));
 }
 
-NA_EIDPROC Long ex_unlogic_clause::pack(void * space_)
+Long ex_unlogic_clause::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_unlogic_clause));
 }
 
-NA_EIDPROC Long ExRegexpClauseChar::pack(void * space_)
+Long ExRegexpClauseChar::pack(void * space_)
 {
   return packClause(space_, sizeof(ExRegexpClauseChar));
 }
 
-NA_EIDPROC Long ex_like_clause_char::pack(void * space_)
+Long ex_like_clause_char::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_like_clause_char));
 }
 
-NA_EIDPROC Long ex_like_clause_doublebyte::pack(void * space_)
+Long ex_like_clause_doublebyte::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_like_clause_doublebyte));
 }
 
-NA_EIDPROC Long ex_bool_clause::pack(void * space_)
+Long ex_bool_clause::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_bool_clause));
 }
 
-NA_EIDPROC Long bool_result_clause::pack(void * space_)
+Long bool_result_clause::pack(void * space_)
 {
   return packClause(space_, sizeof(bool_result_clause));
 }
 
-NA_EIDPROC Long ex_branch_clause::pack(void * space_)
+Long ex_branch_clause::pack(void * space_)
 {
   saved_next_clause.pack(space_);
   branch_clause.pack(space_);
   return packClause(space_, sizeof(ex_branch_clause));
 }
 
-NA_EIDPROC Long ex_comp_clause::pack(void * space_)
+Long ex_comp_clause::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_comp_clause));
 }
 
-NA_EIDPROC Long ex_conv_clause::pack(void * space_)
+Long ex_conv_clause::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_conv_clause));
 }
 
-NA_EIDPROC Long ex_function_clause::pack(void * space_)
+Long ex_function_clause::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_clause));
 }
 
-NA_EIDPROC Long ex_function_concat::pack(void * space_)
+Long ex_function_concat::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_concat));
 }  
 
-NA_EIDPROC Long ex_function_substring::pack(void * space_)
+Long ex_function_substring::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_substring));
 }  
 
-NA_EIDPROC Long ex_function_substring_doublebyte::pack(void * space_)
+Long ex_function_substring_doublebyte::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_substring_doublebyte));
 }  
 
-NA_EIDPROC Long ex_function_trim_char::pack(void * space_)
+Long ex_function_trim_char::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_trim_char));
 }  
 
-NA_EIDPROC Long ex_function_trim_doublebyte::pack(void * space_)
+Long ex_function_trim_doublebyte::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_trim_doublebyte));
 }  
 
-NA_EIDPROC Long ex_function_lower::pack(void * space_)
+Long ex_function_lower::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_lower));
 }  
 
-NA_EIDPROC Long ex_function_upper::pack(void * space_)
+Long ex_function_upper::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_upper));
 }  
 
-NA_EIDPROC Long ex_function_translate::pack(void * space_)
+Long ex_function_translate::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_translate));
 }  
 
-NA_EIDPROC Long ExFunctionAscii::pack(void * space_)
+Long ExFunctionAscii::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionAscii));
 }
 
-NA_EIDPROC Long ExFunctionChar::pack(void * space_)
+Long ExFunctionChar::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionChar));
 }
 
-NA_EIDPROC Long ExFunctionConvertHex::pack(void * space_)
+Long ExFunctionConvertHex::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionConvertHex));
 }
 
-NA_EIDPROC Long ExFunctionRepeat::pack(void * space_)
+Long ExFunctionRepeat::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionRepeat));
 }
 
-NA_EIDPROC Long ExFunctionReplace::pack(void * space_)
+Long ExFunctionReplace::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionReplace));
 }
 
 // 12/17/97: added for unicode UPPER()
-NA_EIDPROC Long ex_function_upper_unicode::pack(void * space_)
+Long ex_function_upper_unicode::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_upper_unicode));
 }  
 
-NA_EIDPROC Long ex_function_lower_unicode::pack(void * space_)
+Long ex_function_lower_unicode::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_lower_unicode));
 }  
 
-NA_EIDPROC Long ex_function_char_length::pack(void * space_)
+Long ex_function_char_length::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_char_length));
 }  
 
-NA_EIDPROC Long ex_function_char_length_doublebyte::pack(void * space_)
+Long ex_function_char_length_doublebyte::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_char_length_doublebyte));
 }  
 
-NA_EIDPROC Long ex_function_oct_length::pack(void * space_)
+Long ex_function_oct_length::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_oct_length));
 }  
 
-NA_EIDPROC Long ex_function_position::pack(void * space_)
+Long ex_function_position::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_position));
 }  
 
-NA_EIDPROC Long ex_function_position_doublebyte::pack(void * space_)
+Long ex_function_position_doublebyte::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_position_doublebyte));
 }  
 
-NA_EIDPROC Long ExFunctionTokenStr::pack(void * space_)
+Long ExFunctionTokenStr::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionTokenStr));
 }  
 
-NA_EIDPROC Long ex_function_current::pack(void * space_)
+Long ex_function_current::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_current));
 }  
 
-NA_EIDPROC Long ex_function_encode::pack(void * space_)
+Long ex_function_encode::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_encode));
 }
 
 //++Triggers -
-NA_EIDPROC Long ex_function_unique_execute_id::pack(void * space_)
+Long ex_function_unique_execute_id::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_unique_execute_id));
 } 
 
-NA_EIDPROC Long ex_function_get_triggers_status::pack(void * space_)
+Long ex_function_get_triggers_status::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_get_triggers_status));
 } 
 
-NA_EIDPROC Long ex_function_get_bit_value_at::pack(void * space_)
+Long ex_function_get_bit_value_at::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_get_bit_value_at));
 } 
 //--Triggers -
 
-NA_EIDPROC Long ex_function_is_bitwise_and_true::pack(void * space_)
+Long ex_function_is_bitwise_and_true::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_is_bitwise_and_true));
 } 
 //--MV
 
-NA_EIDPROC Long ex_function_explode_varchar::pack(void * space_)
+Long ex_function_explode_varchar::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_explode_varchar));
 }  
  
-NA_EIDPROC Long ex_function_hash::pack(void * space_)
+Long ex_function_hash::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_hash));
 }  
 
-NA_EIDPROC Long ex_function_hivehash::pack(void * space_)
+Long ex_function_hivehash::pack(void * space_)
 {
   Lng32 x = sizeof(ex_function_hivehash);
   return packClause(space_, sizeof(ex_function_hivehash));
 }  
 
-NA_EIDPROC Long ExHashComb::pack(void * space_)
+Long ExHashComb::pack(void * space_)
 {
   return packClause(space_, sizeof(ExHashComb));
 }
 
-NA_EIDPROC Long ExHiveHashComb::pack(void * space_)
+Long ExHiveHashComb::pack(void * space_)
 {
   return packClause(space_, sizeof(ExHiveHashComb));
 }
 
-NA_EIDPROC Long ExHDPHash::pack(void * space_)
+Long ExHDPHash::pack(void * space_)
 {
   return packClause(space_, sizeof(ExHDPHash));
 }  
 
-NA_EIDPROC Long ExHDPHashComb::pack(void * space_)
+Long ExHDPHashComb::pack(void * space_)
 {
   return packClause(space_, sizeof(ExHDPHashComb));
 }
 
-NA_EIDPROC Long ex_function_replace_null::pack(void * space_)
+Long ex_function_replace_null::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_replace_null));
 }  
 
-NA_EIDPROC Long ex_function_mod::pack(void * space_)
+Long ex_function_mod::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_mod));
 }  
 
-NA_EIDPROC Long ex_function_mask::pack(void * space_)
+Long ex_function_mask::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_mask));
 }
 
-NA_EIDPROC Long ExFunctionShift::pack(void * space_)
+Long ExFunctionShift::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionShift));
 }  
 
-NA_EIDPROC Long ex_function_converttimestamp::pack(void * space_)
+Long ex_function_converttimestamp::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_converttimestamp));
 }  
 
-NA_EIDPROC Long ex_function_dateformat::pack(void * space_)
+Long ex_function_dateformat::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_dateformat));
 }  
 
-NA_EIDPROC Long ex_function_dayofweek::pack(void * space_)
+Long ex_function_dayofweek::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_dayofweek));
 }  
 
-NA_EIDPROC Long ex_function_extract::pack(void * space_)
+Long ex_function_extract::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_extract));
 }  
 
-NA_EIDPROC Long ex_function_juliantimestamp::pack(void * space_)
+Long ex_function_juliantimestamp::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_juliantimestamp));
 }  
 
-NA_EIDPROC Long ex_function_exec_count::pack(void * space_)
+Long ex_function_exec_count::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_exec_count));
 }  
 
-NA_EIDPROC Long ex_function_curr_transid::pack(void * space_)
+Long ex_function_curr_transid::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_curr_transid));
 }  
 
-NA_EIDPROC Long ex_function_ansi_user::pack(void * space_)
+Long ex_function_ansi_user::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_ansi_user));
 }
 
-NA_EIDPROC Long ex_function_user::pack(void * space_)
+Long ex_function_user::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_user));
 }  
 
-NA_EIDPROC Long ex_function_nullifzero::pack(void * space_)
+Long ex_function_nullifzero::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_nullifzero));
 }  
 
-NA_EIDPROC Long ex_function_nvl::pack(void * space_)
+Long ex_function_nvl::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_nvl));
 }  
 
-NA_EIDPROC Long ex_function_json_object_field_text::pack(void * space_)
+Long ex_function_json_object_field_text::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_json_object_field_text));
 }  
 
 
-NA_EIDPROC Long ex_function_queryid_extract::pack(void * space_)
+Long ex_function_queryid_extract::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_function_queryid_extract));
 }  
 
-NA_EIDPROC Long ExFunctionUniqueId::pack(void * space_)
+Long ExFunctionUniqueId::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionUniqueId));
 }  
 
-NA_EIDPROC Long ExFunctionRowNum::pack(void * space_)
+Long ExFunctionRowNum::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionUniqueId));
 }  
 
-NA_EIDPROC Long ExFunctionHbaseColumnLookup::pack(void * space_)
+Long ExFunctionHbaseColumnLookup::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionHbaseColumnLookup));
 }  
 
-NA_EIDPROC Long ExFunctionHbaseColumnsDisplay::pack(void * space_)
+Long ExFunctionHbaseColumnsDisplay::pack(void * space_)
 {
   colNames_.pack(space_);
 
   return packClause(space_, sizeof(ExFunctionHbaseColumnsDisplay));
 }  
 
-NA_EIDPROC Long ExFunctionHbaseColumnCreate::pack(void * space_)
+Long ExFunctionHbaseColumnCreate::pack(void * space_)
 {
   return packClause(space_, sizeof(ExFunctionHbaseColumnCreate));
 }  
 
-NA_EIDPROC Long ex_noop_clause::pack(void * space_)
+Long ex_noop_clause::pack(void * space_)
 {
   return packClause(space_, sizeof(ex_noop_clause));
 }
 
-NA_EIDPROC Long ex_inout_clause::pack(void * space_)
+Long ex_inout_clause::pack(void * space_)
 {
   name.pack(space_);
   heading_.pack(space_);
@@ -513,24 +512,24 @@ NA_EIDPROC Long ex_inout_clause::pack(void * space_)
   return packClause(space_, sizeof(ex_inout_clause));
 }
 
-NA_EIDPROC Long ExFunctionSVariance::pack(void * space)
+Long ExFunctionSVariance::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionSVariance));
 }  
 
-NA_EIDPROC Long ExFunctionSStddev::pack(void * space)
+Long ExFunctionSStddev::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionSStddev));
 }  
 
-NA_EIDPROC Long ExpRaiseErrorFunction::pack(void * space)
+Long ExpRaiseErrorFunction::pack(void * space)
 {
   constraintName_.pack(space);
   tableName_.pack(space);
   return packClause(space, sizeof(ExpRaiseErrorFunction));
 }  
 
-NA_EIDPROC Long ExFunctionRandomNum::pack(void * space)
+Long ExFunctionRandomNum::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionRandomNum));
 }  
@@ -540,37 +539,37 @@ Long ExFunctionRandomSelection::pack(void * space)
   return packClause(space, sizeof(ExFunctionRandomSelection));
 }  
 
-NA_EIDPROC Long ExProgDistrib::pack(void * space)
+Long ExProgDistrib::pack(void * space)
 {
   return packClause(space, sizeof(ExProgDistrib));
 }
 
-NA_EIDPROC Long ExProgDistribKey::pack(void * space)
+Long ExProgDistribKey::pack(void * space)
 {
   return packClause(space, sizeof(ExProgDistribKey));
 }  
 
-NA_EIDPROC Long ExPAGroup::pack(void * space)
+Long ExPAGroup::pack(void * space)
 {
   return packClause(space, sizeof(ExPAGroup));
 }
 
-NA_EIDPROC Long ExHash2Distrib::pack(void * space)
+Long ExHash2Distrib::pack(void * space)
 {
   return packClause(space, sizeof(ExHash2Distrib));
 }
 
-NA_EIDPROC Long ExFunctionPack::pack(void * space)
+Long ExFunctionPack::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionPack));
 }
 
-NA_EIDPROC Long ExFunctionRangeLookup::pack(void * space)
+Long ExFunctionRangeLookup::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionRangeLookup));
 }
 
-NA_EIDPROC Long ExUnPackCol::pack(void * space)
+Long ExUnPackCol::pack(void * space)
 {
   return packClause(space, sizeof(ExUnPackCol));
 }
@@ -586,63 +585,57 @@ Long ExFunctionInternalTimestamp::pack(void * space)
   return packClause(space, sizeof(ExFunctionInternalTimestamp));
 }  
 
-NA_EIDPROC Long ExAuditImage::pack(void * space_)
-{
-  auditImageContainerExpr_.pack(space_);
-  return packClause(space_, sizeof(ExAuditImage));
-}
-
 Long ExHeaderClause::pack(void * space)
 {
   return packClause(space, sizeof(ExHeaderClause));
 }  
 
-NA_EIDPROC Long ExFunctionSha::pack(void * space)
+Long ExFunctionSha::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionSha));
 }
 
-NA_EIDPROC Long ExFunctionSha2::pack(void * space)
+Long ExFunctionSha2::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionSha2));
 }
 
-NA_EIDPROC Long ExFunctionMd5::pack(void * space)
+Long ExFunctionMd5::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionMd5));
 }
 
-NA_EIDPROC Long ExFunctionCrc32::pack(void * space)
+Long ExFunctionCrc32::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionCrc32));
 }
 
-NA_EIDPROC Long ExFunctionIsIP::pack(void * space)
+Long ExFunctionIsIP::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionIsIP));
 }
 
-NA_EIDPROC Long ExFunctionSoundex::pack(void * space)
+Long ExFunctionSoundex::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionSoundex));
 }
 
-NA_EIDPROC Long ExFunctionInetAton::pack(void * space)
+Long ExFunctionInetAton::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionInetAton));
 }
 
-NA_EIDPROC Long ExFunctionInetNtoa::pack(void * space)
+Long ExFunctionInetNtoa::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionInetNtoa));
 }
 
-NA_EIDPROC Long ExFunctionAESEncrypt::pack(void * space)
+Long ExFunctionAESEncrypt::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionAESEncrypt));
 }
 
-NA_EIDPROC Long ExFunctionAESDecrypt::pack(void * space)
+Long ExFunctionAESDecrypt::pack(void * space)
 {
   return packClause(space, sizeof(ExFunctionAESDecrypt));
 }
@@ -650,7 +643,7 @@ NA_EIDPROC Long ExFunctionAESDecrypt::pack(void * space)
 // U N P A C K
 // -----------------------------------------------------------------------
 
-NA_EIDPROC Lng32 ex_expr::unpack(void *base, void * reallocator)
+Lng32 ex_expr::unpack(void *base, void * reallocator)
 {
   ExClausePtr currClausePtr;
   ex_clause *nextClause;
@@ -687,7 +680,6 @@ NA_EIDPROC Lng32 ex_expr::unpack(void *base, void * reallocator)
   return NAVersionedObject::unpack(base, reallocator);
 }
 
-NA_EIDPROC
 void ex_expr_lean::convOffsetToAddrInPCode(void* base) {
   pCodeLean_ = (PCodeBinary*)((char *)base - (Long)(pCodeLean_));
 
@@ -714,7 +706,7 @@ void ex_expr_lean::convOffsetToAddrInPCode(void* base) {
   
 }
 
-NA_EIDPROC Lng32 ex_expr_lean::unpack(void *base, void * reallocator)
+Lng32 ex_expr_lean::unpack(void *base, void * reallocator)
 {
   if (constantsArea_.unpack(base)) return -1;
   if (tempsArea_.unpack(base)) return -1;
@@ -725,7 +717,7 @@ NA_EIDPROC Lng32 ex_expr_lean::unpack(void *base, void * reallocator)
   return NAVersionedObject::unpack(base, reallocator);
 }
 
-NA_EIDPROC Lng32 AggrExpr::unpack(void *base, void * reallocator)
+Lng32 AggrExpr::unpack(void *base, void * reallocator)
 {
   if (initExpr_.unpack(base, reallocator)) return -1;
   if (perrecExpr_.unpack(base, reallocator)) return -1;
@@ -737,14 +729,14 @@ NA_EIDPROC Lng32 AggrExpr::unpack(void *base, void * reallocator)
 }
 
 
-NA_EIDPROC Lng32 ex_branch_clause::unpack(void *base, void * reallocator)
+Lng32 ex_branch_clause::unpack(void *base, void * reallocator)
 {
   if (branch_clause.unpack(base, reallocator)) return -1;
   if (saved_next_clause.unpack(base, reallocator)) return -1;
   return unpackClause(base, reallocator);
 }
 
-NA_EIDPROC Lng32 ex_inout_clause::unpack(void *base, void * reallocator)
+Lng32 ex_inout_clause::unpack(void *base, void * reallocator)
 {
   if (name.unpack(base)) return -1;
   if (heading_.unpack(base)) return -1;
@@ -756,24 +748,19 @@ NA_EIDPROC Lng32 ex_inout_clause::unpack(void *base, void * reallocator)
 }
 
 
-NA_EIDPROC Lng32 ExpRaiseErrorFunction::unpack(void *base, void * reallocator)
+Lng32 ExpRaiseErrorFunction::unpack(void *base, void * reallocator)
 {
   if (constraintName_.unpack(base)) return -1;
   if (tableName_.unpack(base)) return -1;
   return unpackClause(base, reallocator);
 }
-NA_EIDPROC Lng32 ExAuditImage::unpack(void *base, void * reallocator)
-{
-  if (auditImageContainerExpr_.unpack(base, reallocator)) return -1;
-  return unpackClause(base, reallocator);
-}
 
-NA_EIDPROC Lng32 ExFunctionHbaseColumnCreate::unpack(void *base, void * reallocator)
+Lng32 ExFunctionHbaseColumnCreate::unpack(void *base, void * reallocator)
 {
   return unpackClause(base, reallocator);
 }
 
-NA_EIDPROC Lng32 ExFunctionHbaseColumnsDisplay::unpack(void *base, void * reallocator)
+Lng32 ExFunctionHbaseColumnsDisplay::unpack(void *base, void * reallocator)
 {
   if (colNames_.unpack(base)) return -1;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpSequenceFunction.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpSequenceFunction.cpp b/core/sql/exp/ExpSequenceFunction.cpp
index 619243c..8c94be0 100644
--- a/core/sql/exp/ExpSequenceFunction.cpp
+++ b/core/sql/exp/ExpSequenceFunction.cpp
@@ -157,15 +157,9 @@ ex_expr::exp_return_type ExpSequenceFunction::pCodeGenerate(Space *space, UInt32
             PCIT::getMemoryAddressingMode(attrs[0]->getDatatype()),
             PCIT::getMemoryAddressingMode(attrs[1]->getDatatype()));
 
-#ifdef NA_64BIT
     OL ol((Int64)isOLAP(), (Int64)0, index, 
           attrs[0]->getAtp(), attrs[0]->getAtpIndex(), attrs[0]->getOffset(),
           attrs[1]->getAtp(), attrs[1]->getAtpIndex(), attrs[1]->getOffset());
-#else
-    OL ol((PCIType::Operand)isOLAP(), (PCIType::Operand)0, index, 
-          attrs[0]->getAtp(), attrs[0]->getAtpIndex(), attrs[0]->getOffset(),
-          attrs[1]->getAtp(), attrs[1]->getAtpIndex(), attrs[1]->getOffset());
-#endif
 
     // Add the OFFSET instruction.
     //
@@ -184,17 +178,10 @@ ex_expr::exp_return_type ExpSequenceFunction::pCodeGenerate(Space *space, UInt32
             PCIT::getMemoryAddressingMode(attrs[0]->getDatatype()),
             PCIT::getMemoryAddressingMode(attrs[1]->getDatatype()));
 
-#ifdef NA_64BIT
     OL ol((Int64)(isOLAP()), (Int64)0,
           attrs[2]->getAtp(), attrs[2]->getAtpIndex(), attrs[2]->getOffset(),
           attrs[0]->getAtp(), attrs[0]->getAtpIndex(), attrs[0]->getOffset(),
           attrs[1]->getAtp(), attrs[1]->getAtpIndex(), attrs[1]->getOffset());
-#else
-    OL ol((PCIType::Operand)(isOLAP()), (PCIType::Operand)0,
-          attrs[2]->getAtp(), attrs[2]->getAtpIndex(), attrs[2]->getOffset(),
-          attrs[0]->getAtp(), attrs[0]->getAtpIndex(), attrs[0]->getOffset(),
-          attrs[1]->getAtp(), attrs[1]->getAtpIndex(), attrs[1]->getOffset());
-#endif
 
     // Add the OFFSET instruction.
     //

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpSequenceFunction.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpSequenceFunction.h b/core/sql/exp/ExpSequenceFunction.h
index 35f8800..bb728cd 100644
--- a/core/sql/exp/ExpSequenceFunction.h
+++ b/core/sql/exp/ExpSequenceFunction.h
@@ -55,13 +55,13 @@ class ExpSequenceExpression;
 
 // ExpSequenceFunction declaration
 //
-class SQLEXP_LIB_FUNC  ExpSequenceFunction : public ex_function_clause {
+class ExpSequenceFunction : public ex_function_clause {
 public:
   enum { SF_NONE, SF_OFFSET };
 
   // Construction - this is the "real" constructor
   //
-  NA_EIDPROC ExpSequenceFunction(OperatorTypeEnum oper_type,
+  ExpSequenceFunction(OperatorTypeEnum oper_type,
 				 Int32 arity,
 				 Int32 index,
 				 Attributes ** attr,
@@ -69,85 +69,85 @@ public:
 
   // This constructor is used only to get at the virtual function table.
   //
-  NA_EIDPROC ExpSequenceFunction();
+  ExpSequenceFunction();
 
 
   // isNullInNullOut - Must redefine this virtual function to return 0
   // since a NULL input does not simply produce a NULL output.
   //
-  NA_EIDPROC Int32 isNullInNullOut() const { return 0; };
+  Int32 isNullInNullOut() const { return 0; };
 
   // isNullRelevant - Must redefine this virtual function to return 0
   // since all the work is done in eval and none in processNulls.
   //
-  NA_EIDPROC Int32 isNullRelevant() const { return 0; };
+  Int32 isNullRelevant() const { return 0; };
 
-  NA_EIDPROC ex_expr::exp_return_type pCodeGenerate(Space *space, UInt32 f);
+  ex_expr::exp_return_type pCodeGenerate(Space *space, UInt32 f);
 
   // eval - Must redefine eval to do the effective NOP sequence function.
   //
-  NA_EIDPROC ex_expr::exp_return_type eval(char *op_data[], CollHeap*, 
+  ex_expr::exp_return_type eval(char *op_data[], CollHeap*, 
 					   ComDiagsArea** =0);
 
-  NA_EIDPROC inline NABoolean nullRowIsZero(void)
+  inline NABoolean nullRowIsZero(void)
   {
     return ((flags_ & SF_NULL_ROW_IS_ZERO) != 0);
   };
 
-  NA_EIDPROC inline void setNullRowIsZero(NABoolean v)
+  inline void setNullRowIsZero(NABoolean v)
   {
     (v)? flags_ |= SF_NULL_ROW_IS_ZERO: flags_ &= ~SF_NULL_ROW_IS_ZERO;
   };
 
-  NA_EIDPROC inline NABoolean isOLAP(void)
+  inline NABoolean isOLAP(void)
   {
     return ((flags_ & SF_IS_OLAP) != 0);
   };
 
-  NA_EIDPROC inline void setIsOLAP(NABoolean v)
+  inline void setIsOLAP(NABoolean v)
   {
     (v)? flags_ |= SF_IS_OLAP: flags_ &= ~SF_IS_OLAP;
   };
 
-  NA_EIDPROC inline NABoolean isLeading(void)
+  inline NABoolean isLeading(void)
   {
     return ((flags_ & SF_IS_LEADING) != 0);
   };
 
-  NA_EIDPROC inline void setIsLeading(NABoolean v)
+  inline void setIsLeading(NABoolean v)
   {
     (v)? flags_ |= SF_IS_LEADING: flags_ &= ~SF_IS_LEADING;
   };
 
-  NA_EIDPROC inline Int32 winSize(void)
+  inline Int32 winSize(void)
   {
     return winSize_;
   };
 
-  NA_EIDPROC inline void setWinSize(Int32 winSize)
+  inline void setWinSize(Int32 winSize)
   {
     winSize_ = winSize;
   };
   
 
   // pack - Must redefine pack.
-  NA_EIDPROC Long pack(void *);
+  Long pack(void *);
 
   // ---------------------------------------------------------------------
   // Redefinition of methods inherited from NAVersionedObject.
   // ---------------------------------------------------------------------
-  NA_EIDPROC virtual unsigned char getClassVersionID()
+  virtual unsigned char getClassVersionID()
   {
     return 1;
   }
 
-  NA_EIDPROC virtual void populateImageVersionIDArray()
+  virtual void populateImageVersionIDArray()
   {
     setImageVersionID(2,getClassVersionID());
     ex_function_clause::populateImageVersionIDArray();
   }
 
-  NA_EIDPROC virtual short getClassSize() { return (short)sizeof(*this); }
+  virtual short getClassSize() { return (short)sizeof(*this); }
   // ---------------------------------------------------------------------
 
   enum
@@ -171,9 +171,9 @@ public:
 
 // ExpSequenceExpression
 //
-class SQLEXP_LIB_FUNC ExpSequenceExpression : public ex_expr {
+class ExpSequenceExpression : public ex_expr {
 public:
-  NA_EIDPROC inline void seqFixup(void *data, 
+  inline void seqFixup(void *data, 
                                   char *(*getRow)(void*,Int32,NABoolean,Lng32,Int32&),
                                   char *(*getRowOLAP)(void*,Int32,NABoolean,Lng32,Int32&))
   {
@@ -218,18 +218,18 @@ public:
   // ---------------------------------------------------------------------
   // Redefinition of methods inherited from NAVersionedObject.
   // ---------------------------------------------------------------------
-  NA_EIDPROC virtual unsigned char getClassVersionID()
+  virtual unsigned char getClassVersionID()
   {
     return 1;
   }
 
-  NA_EIDPROC virtual void populateImageVersionIDArray()
+  virtual void populateImageVersionIDArray()
   {
     setImageVersionID(1,getClassVersionID());
     ex_expr::populateImageVersionIDArray();
   }
 
-  NA_EIDPROC virtual short getClassSize() { return (short)sizeof(*this); }
+  virtual short getClassSize() { return (short)sizeof(*this); }
   // ---------------------------------------------------------------------
 
 };

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/ExpSqlTupp.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpSqlTupp.h b/core/sql/exp/ExpSqlTupp.h
index 85f66d3..ae749de 100644
--- a/core/sql/exp/ExpSqlTupp.h
+++ b/core/sql/exp/ExpSqlTupp.h
@@ -57,53 +57,44 @@ class ex_queue;
 // In the executor and expression code no variables of class tuppDescriptor *
 // should be used. Only tupp should be used.
 //
-class SQLEXP_LIB_FUNC  tupp
+class tupp
 {	
   tupp_descriptor *	tuppDescPointer;
   
 public:
-NA_EIDPROC
    ~tupp();				// destructor
-NA_EIDPROC
    tupp();				// constructor
-NA_EIDPROC
   tupp(const tupp_descriptor * source); // constructor
-NA_EIDPROC
   tupp(const tupp & source); // constructor
   
-NA_EIDPROC 
+
   inline void init();			// Initialize a newly allocated tupp
-NA_EIDPROC 
+
   inline void	operator=(const tupp	& source); 
-NA_EIDPROC 
+
   inline void	operator=(const tupp_descriptor * source); 
-NA_EIDPROC 
+
   inline void	release();		// Release the tuple this tupp refers to
-NA_EIDPROC 
+
   inline char *	getDataPointer() const;
-NA_EIDPROC 
+
   inline void   setDataPointer(char *dp);
-NA_EIDPROC 
+
   inline tupp_descriptor* get_tupp_descriptor();  
-NA_EIDPROC 
+
   inline unsigned short getRefCount() const;
-NA_EIDPROC
   inline ULng32   getAllocatedSize() const;
 
-NA_EIDPROC
   Long pack(void * space);
-NA_EIDPROC
   Lng32 unpack(Lng32 base);
-NA_EIDPROC
   NABoolean isAllocated(){return (tuppDescPointer ? TRUE : FALSE);};
 
-NA_EIDPROC
   void display();
 
 };
 
 #pragma nowarn(1506)   // warning elimination 
-class SQLEXP_LIB_FUNC  tupp_descriptor
+class tupp_descriptor
 {
 
 #ifdef COMING_FROM_NATIVE_EXPR_SOURCE_FILE
@@ -165,21 +156,19 @@ friend class tupp;
     };
 
 protected:
-NA_EIDPROC
   unsigned short& nextTDIOffset() { return tdiOffset_.nextTDIOffset_; }
-NA_EIDPROC
   unsigned short& prevTDIOffset() { return tdiOffset_.prevTDIOffset_; }
 
 public:
-NA_EIDPROC 
+
    tupp_descriptor(); //  construct and initiliaze a descriptor
-NA_EIDPROC 
+
   inline void	init();		// initialize a newly allocated descriptor
-NA_EIDPROC 
+
   inline void	init(ULng32 allocatedSize, tupp_descriptor * relocatedAddress, char *tupleAddress);
-NA_EIDPROC 
+
   inline unsigned short getReferenceCount() const;
-NA_EIDPROC void setReferenceCount(unsigned short ref_count)
+void setReferenceCount(unsigned short ref_count)
   {
     referenceCount_ = ref_count;
   }
@@ -188,38 +177,37 @@ NA_EIDPROC void setReferenceCount(unsigned short ref_count)
   // being in transit between PA and EID. Once they are received,
   // and the flags are looked at, these must be initialized to zero
   // as they are overloaded with the reference count for this tupp.
-NA_EIDPROC void resetCommFlags()
+void resetCommFlags()
   {
     flags_ = 0;
   }
 
-NA_EIDPROC 
+
   inline char *getTupleAddress() const;
-NA_EIDPROC 
+
   inline Lng32 getTupleOffset() const
     {
       return offset_;
     }
-NA_EIDPROC 
+
   inline void setTupleOffset(Lng32 offset)
     {
       offset_ = offset;
     }
-NA_EIDPROC 
+
   inline void setTupleAddress(char * tuple_address)
     {
       tupleAddress_ = tuple_address;
     }
-NA_EIDPROC 
+
   inline void setRelocatedAddress(tupp_descriptor * relocated_address)
     {
       relocatedAddress_ = relocated_address;
     }
   
-NA_EIDPROC 
+
   inline ULng32 getAllocatedSize(){return allocatedSize_;};
 
-NA_EIDPROC
   inline void setAllocatedSize(Lng32 size) 
     {
       allocatedSize_ = size;
@@ -231,60 +219,50 @@ NA_EIDPROC
 // and data data. The control data (see ex_io_control.h) includes
 // information about queue state.
 ////////////////////////////////////////////////////////////////////
-NA_EIDPROC
   NABoolean isControlTuple()
   {
     return (flags_ == CONTROL_TUPP);
   };
 
-NA_EIDPROC
   NABoolean isDataTuple()
   {
     return (flags_ == DATA_TUPP);
   };
 
-NA_EIDPROC
   NABoolean isDiagsTuple()
   {
     return (flags_ == DIAGS_TUPP);
   };
 
-NA_EIDPROC
   NABoolean isStatsTuple()
   {
     return (flags_ == STATS_TUPP);
   };
 
-NA_EIDPROC
   NABoolean isInvalidTuple()
   {
     return (flags_ == INVALID_DATA_VSBB_TUPP);
   };
 
-NA_EIDPROC
  void setControlTupleType()
   {
     flags_ = CONTROL_TUPP;
   };
   
-NA_EIDPROC
  void setDataTupleType()
   {
     flags_ = DATA_TUPP;
   };
   
-NA_EIDPROC
  void setDiagsTupleType()
   {
     flags_ = DIAGS_TUPP;
   };
   
-NA_EIDPROC
  void setStatsTupleType()
   {
     flags_ = STATS_TUPP;
   };
-NA_EIDPROC
  void setInvalidTupleType()
   {
     flags_ = INVALID_DATA_VSBB_TUPP;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/exp/exp_arith.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_arith.cpp b/core/sql/exp/exp_arith.cpp
index e9155db..c5d5ce5 100644
--- a/core/sql/exp/exp_arith.cpp
+++ b/core/sql/exp/exp_arith.cpp
@@ -39,11 +39,6 @@
 
 #include "Platform.h"
 
-
-#if (!defined (__TANDEM) && !defined(__EID))
-#include <iostream>
-#endif
-
 #include "exp_stdh.h"
 #include "exp_clause_derived.h"
 #include "exp_datetime.h"
@@ -325,8 +320,6 @@ Int64 EXP_FIXED_OV_DIV(Int64 op1, Int64 op2, short * ov)
 //Int64 EXP_FIXED_OV_DIV(Int64 op1, Int64 op2, short * ov);
 
 
-NA_EIDPROC
-SQLEXP_LIB_FUNC
 short EXP_FIXED_BIGN_OV_MUL(Attributes * op1,
                         Attributes * op2,
                         char * op_data[])
@@ -379,8 +372,6 @@ short EXP_FIXED_BIGN_OV_MUL(Attributes * op1,
   return 0;
 }
 
-NA_EIDPROC
-SQLEXP_LIB_FUNC
 short EXP_FIXED_BIGN_OV_DIV(Attributes * op1,
                         Attributes * op2,
                         char * op_data[])
@@ -437,8 +428,6 @@ short EXP_FIXED_BIGN_OV_DIV(Attributes * op1,
   return 0;
 }
 
-NA_EIDPROC
-SQLEXP_LIB_FUNC
 Int64 EXP_FIXED_BIGN_OV_MOD(Attributes * op1,
                         Attributes * op2,
                         char * op_data[],
@@ -563,7 +552,6 @@ Int64 EXP_FIXED_BIGN_OV_MOD(Attributes * op1,
   return result;
 }
 
-NA_EIDPROC
 static void CopyAttributes(char *dst, char *dstNull, char *dstVC, 
 			   Attributes *dstAttr,
 			   char *src, char *srcNotNull,char *srcVC,