瀏覽代碼

Merge pull request #4492 from ghalliday/issue9464b

HPCC-9465 Preserve the case of parameters for external functions

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 年之前
父節點
當前提交
67e7a9262b
共有 100 個文件被更改,包括 5375 次插入5247 次删除
  1. 4 4
      common/deftype/deffield.cpp
  2. 2 2
      common/deftype/deffield.hpp
  3. 3 3
      common/deftype/deffield.ipp
  4. 18 18
      common/deftype/deftype.cpp
  5. 10 10
      common/deftype/deftype.hpp
  6. 19 19
      common/deftype/deftype.ipp
  7. 2 2
      common/deftype/defvalue.cpp
  8. 7 7
      common/fileview2/fvtransform.cpp
  9. 7 7
      common/fileview2/fvtransform.ipp
  10. 18 18
      common/fileview2/fvwugen.cpp
  11. 4 4
      common/thorhelper/layouttrans.cpp
  12. 2 2
      common/thorhelper/layouttrans.ipp
  13. 4 4
      common/thorhelper/thorparse.cpp
  14. 6 6
      common/thorhelper/thorparse.hpp
  15. 1 1
      common/thorhelper/thorparse.ipp
  16. 3 3
      common/thorhelper/thorralgo.ipp
  17. 2 2
      common/thorhelper/thorrparse.cpp
  18. 3 3
      common/thorhelper/thorrparse.hpp
  19. 1 1
      common/thorhelper/thortalgo.cpp
  20. 2 2
      common/thorhelper/thortalgo.ipp
  21. 2 2
      common/thorhelper/thortparse.cpp
  22. 6 6
      common/thorhelper/thortparse.ipp
  23. 2 2
      ecl/eclcc/eclcc.cpp
  24. 1 1
      ecl/hql/hql.hpp
  25. 441 421
      ecl/hql/hqlatoms.cpp
  26. 401 394
      ecl/hql/hqlatoms.hpp
  27. 38 33
      ecl/hql/hqlattr.cpp
  28. 9 9
      ecl/hql/hqlattr.hpp
  29. 38 38
      ecl/hql/hqlcollect.cpp
  30. 2 2
      ecl/hql/hqlcollect.hpp
  31. 2 2
      ecl/hql/hqldesc.cpp
  32. 17 15
      ecl/hql/hqldsparam.cpp
  33. 1 1
      ecl/hql/hqlesp.cpp
  34. 286 260
      ecl/hql/hqlexpr.cpp
  35. 71 68
      ecl/hql/hqlexpr.hpp
  36. 154 143
      ecl/hql/hqlexpr.ipp
  37. 4 4
      ecl/hql/hqlfold.cpp
  38. 55 53
      ecl/hql/hqlgram.hpp
  39. 87 87
      ecl/hql/hqlgram.y
  40. 221 207
      ecl/hql/hqlgram2.cpp
  41. 38 14
      ecl/hql/hqlir.cpp
  42. 5 4
      ecl/hql/hqllex.l
  43. 3 3
      ecl/hql/hqlmeta.cpp
  44. 26 25
      ecl/hql/hqlparse.cpp
  45. 2 2
      ecl/hql/hqlpmap.cpp
  46. 1 1
      ecl/hql/hqlpmap.hpp
  47. 20 20
      ecl/hql/hqlrepository.cpp
  48. 1 1
      ecl/hql/hqlrepository.hpp
  49. 30 32
      ecl/hql/hqlthql.cpp
  50. 11 11
      ecl/hql/hqltrans.cpp
  51. 2 2
      ecl/hql/hqltrans.ipp
  52. 49 48
      ecl/hql/hqlutil.cpp
  53. 14 14
      ecl/hql/hqlutil.hpp
  54. 3 3
      ecl/hql/hqlwuerr.cpp
  55. 1384 1394
      ecl/hqlcpp/hqlcatom.cpp
  56. 700 708
      ecl/hqlcpp/hqlcatom.hpp
  57. 4 4
      ecl/hqlcpp/hqlckey.cpp
  58. 398 397
      ecl/hqlcpp/hqlcpp.cpp
  59. 2 2
      ecl/hqlcpp/hqlcpp.hpp
  60. 38 36
      ecl/hqlcpp/hqlcpp.ipp
  61. 2 2
      ecl/hqlcpp/hqlcppc.hpp
  62. 19 19
      ecl/hqlcpp/hqlcppcase.cpp
  63. 46 46
      ecl/hqlcpp/hqlcppds.cpp
  64. 1 1
      ecl/hqlcpp/hqlcppds.hpp
  65. 1 1
      ecl/hqlcpp/hqlcpputil.cpp
  66. 13 13
      ecl/hqlcpp/hqlcset.cpp
  67. 3 3
      ecl/hqlcpp/hqlcset.ipp
  68. 2 2
      ecl/hqlcpp/hqlfunc.hpp
  69. 6 6
      ecl/hqlcpp/hqlfunc.ipp
  70. 16 15
      ecl/hqlcpp/hqlgraph.cpp
  71. 4 4
      ecl/hqlcpp/hqlgraph.ipp
  72. 195 191
      ecl/hqlcpp/hqlhtcpp.cpp
  73. 4 4
      ecl/hqlcpp/hqlhtcpp.ipp
  74. 7 7
      ecl/hqlcpp/hqlinline.cpp
  75. 1 1
      ecl/hqlcpp/hqlinline.hpp
  76. 6 6
      ecl/hqlcpp/hqliproj.cpp
  77. 1 1
      ecl/hqlcpp/hqliproj.ipp
  78. 13 13
      ecl/hqlcpp/hqllib.cpp
  79. 2 2
      ecl/hqlcpp/hqllib.ipp
  80. 20 20
      ecl/hqlcpp/hqlnlp.cpp
  81. 4 4
      ecl/hqlcpp/hqlnlp.ipp
  82. 8 8
      ecl/hqlcpp/hqlregex.cpp
  83. 7 7
      ecl/hqlcpp/hqlregex.ipp
  84. 6 6
      ecl/hqlcpp/hqlresource.cpp
  85. 43 43
      ecl/hqlcpp/hqlsource.cpp
  86. 39 39
      ecl/hqlcpp/hqlstmt.cpp
  87. 3 3
      ecl/hqlcpp/hqlstmt.hpp
  88. 73 73
      ecl/hqlcpp/hqltcppc.cpp
  89. 1 1
      ecl/hqlcpp/hqltcppc.hpp
  90. 26 26
      ecl/hqlcpp/hqltcppc.ipp
  91. 20 20
      ecl/hqlcpp/hqltcppc2.cpp
  92. 5 5
      ecl/hqlcpp/hqltomita.cpp
  93. 8 8
      ecl/hqlcpp/hqltomita.ipp
  94. 72 49
      ecl/hqlcpp/hqlttcpp.cpp
  95. 3 3
      ecl/hqlcpp/hqlttcpp.ipp
  96. 2 2
      ecl/hqlcpp/hqlwcpp.cpp
  97. 1 1
      ecl/hqlcpp/hqlwcpp.hpp
  98. 2 2
      ecl/hqlcpp/hqlwcpp.ipp
  99. 3 3
      plugins/parselib/parselib.cpp
  100. 0 0
      system/jlib/jhash.cpp

+ 4 - 4
common/deftype/deffield.cpp

@@ -26,7 +26,7 @@
 
 //------------------------------------------------------------------------------------------------
 
-CDefRecordElement::CDefRecordElement(DefElemKind _kind, _ATOM _name, ITypeInfo * _type, size32_t _maxSize)
+CDefRecordElement::CDefRecordElement(DefElemKind _kind, IAtom * _name, ITypeInfo * _type, size32_t _maxSize)
 {
     kind = _kind;
     name = _name;
@@ -101,7 +101,7 @@ CDefRecordMeta::CDefRecordMeta(IDefRecordElement * _record, unsigned _numKeyed)
 
 //------------------------------------------------------------------------------------------------
 
-IDefRecordElement * createDEfield(_ATOM name, ITypeInfo * type, IDefRecordElement * record, size32_t maxSize)
+IDefRecordElement * createDEfield(IAtom * name, ITypeInfo * type, IDefRecordElement * record, size32_t maxSize)
 {
     CDefRecordElement * elem = new CDefRecordElement(DEKfield, name, type, maxSize);
     if (record)
@@ -156,7 +156,7 @@ static void serializeElement(MemoryBuffer & target, IDefRecordElement * elem)
         }
     case DEKfield:
         {
-            _ATOM name = elem->queryName();
+            IAtom * name = elem->queryName();
             ITypeInfo * type = elem->queryType();
             size32_t maxSize = elem->getMaxSize();
             serializeAtom(target, name);
@@ -215,7 +215,7 @@ static IDefRecordElement * deserializeElement(MemoryBuffer & source)
         }
     case DEKfield:
         {
-            _ATOM name = deserializeAtom(source);
+            IAtom * name = deserializeAtom(source);
             Owned<ITypeInfo> type = deserializeType(source);
             Owned<IDefRecordElement> record = deserializeElement(source);
             size32_t maxSize;

+ 2 - 2
common/deftype/deffield.hpp

@@ -30,7 +30,7 @@ interface IDefRecordElement : public IInterface
     virtual size32_t getMaxSize() const = 0;
     virtual unsigned numChildren() const = 0;
     virtual ITypeInfo *queryType() const = 0;
-    virtual _ATOM queryName() const = 0;
+    virtual IAtom * queryName() const = 0;
     virtual IDefRecordElement * queryChild(unsigned i) const = 0;
     virtual IValue * queryCompareValue() const = 0;
     virtual bool operator==(IDefRecordElement const & other) const = 0;
@@ -59,7 +59,7 @@ interface IDefRecordBuilder : public IInterface
     virtual IDefRecordElement * close() = 0;
 };
 
-extern DEFTYPE_API IDefRecordElement * createDEfield(_ATOM name, ITypeInfo * type, IDefRecordElement * record, size32_t maxSize=0);
+extern DEFTYPE_API IDefRecordElement * createDEfield(IAtom * name, ITypeInfo * type, IDefRecordElement * record, size32_t maxSize=0);
 extern DEFTYPE_API IDefRecordBuilder * createDErecord(size32_t maxSize);
 extern DEFTYPE_API IDefRecordElement * createDEifblock(IDefRecordElement * field, IValue * value, IDefRecordElement * record);
 extern DEFTYPE_API IDefRecordMeta * createDefRecordMeta(IDefRecordElement * record, unsigned numKeyed);

+ 3 - 3
common/deftype/deffield.ipp

@@ -24,7 +24,7 @@
 class CDefRecordElement : public CInterface, implements IDefRecordElement
 {
 public:
-    CDefRecordElement(DefElemKind _kind, _ATOM _name, ITypeInfo * _type, size32_t _maxSize = 0);
+    CDefRecordElement(DefElemKind _kind, IAtom * _name, ITypeInfo * _type, size32_t _maxSize = 0);
     IMPLEMENT_IINTERFACE
 
     virtual DefElemKind getKind() const
@@ -39,7 +39,7 @@ public:
     {
         return type;
     }
-    virtual _ATOM queryName() const
+    virtual IAtom * queryName() const
     {
         return name;
     }
@@ -65,7 +65,7 @@ public:
 
 protected:
     byte kind;
-    _ATOM name;
+    IAtom * name;
     Owned<ITypeInfo> type;
     CIArrayOf<CDefRecordElement> children;
     size32_t maxSize;

+ 18 - 18
common/deftype/deftype.cpp

@@ -45,15 +45,15 @@
 //#define DATA_STRING_COMPATIBLE
 #define HASHFIELD(p) hashcode = hashc((unsigned char *) &p, sizeof(p), hashcode)
 
-static _ATOM asciiAtom;
-static _ATOM dataAtom;
-static _ATOM ebcdicAtom;
-static _ATOM utf8Atom;
-static _ATOM asciiCodepageAtom;
-static _ATOM ebcdicCodepageAtom;
-static _ATOM ascii2ebcdicAtom;
-static _ATOM ebcdic2asciiAtom;
-static _ATOM emptyAtom;
+static IAtom * asciiAtom;
+static IAtom * dataAtom;
+static IAtom * ebcdicAtom;
+static IAtom * utf8Atom;
+static IAtom * asciiCodepageAtom;
+static IAtom * ebcdicCodepageAtom;
+static IAtom * ascii2ebcdicAtom;
+static IAtom * ebcdic2asciiAtom;
+static IAtom * emptyAtom;
 static CriticalSection * typeCS;
 static TypeCache * globalTypeCache;
 
@@ -955,7 +955,7 @@ bool CUnicodeTypeInfo::assignableFrom(ITypeInfo *t2)
 
 //---------------------------------------------------------------------------
 
-CVarUnicodeTypeInfo::CVarUnicodeTypeInfo(unsigned len, _ATOM _locale) : CUnicodeTypeInfo(len, _locale) 
+CVarUnicodeTypeInfo::CVarUnicodeTypeInfo(unsigned len, IAtom * _locale) : CUnicodeTypeInfo(len, _locale)
 {
 #if UNKNOWN_LENGTH != 0
     assertex(len != 0);
@@ -1682,7 +1682,7 @@ extern DEFTYPE_API ITypeInfo *makeQStringType(int len)
     return ret;
 }
 
-extern DEFTYPE_API ITypeInfo *makeUnicodeType(unsigned len, _ATOM locale)
+extern DEFTYPE_API ITypeInfo *makeUnicodeType(unsigned len, IAtom * locale)
 {
     if(!locale)
         locale = emptyAtom;
@@ -1706,7 +1706,7 @@ extern DEFTYPE_API ITypeInfo *makeUnicodeType(unsigned len, _ATOM locale)
     return ret;
 }
 
-extern DEFTYPE_API ITypeInfo *makeVarUnicodeType(unsigned len, _ATOM locale)
+extern DEFTYPE_API ITypeInfo *makeVarUnicodeType(unsigned len, IAtom * locale)
 {
     if(!locale)
         locale = emptyAtom;
@@ -1731,7 +1731,7 @@ extern DEFTYPE_API ITypeInfo *makeVarUnicodeType(unsigned len, _ATOM locale)
     return ret;
 }
 
-extern DEFTYPE_API ITypeInfo *makeUtf8Type(unsigned len, _ATOM locale)
+extern DEFTYPE_API ITypeInfo *makeUtf8Type(unsigned len, IAtom * locale)
 {
     if(!locale)
         locale = emptyAtom;
@@ -2987,12 +2987,12 @@ ICharsetInfo * CCollationInfo::getCharset()
 
 //---------------------------------------------------------------------------
 
-CTranslationInfo::CTranslationInfo(_ATOM _name, ICharsetInfo * _src, ICharsetInfo * _tgt) : src(_src), tgt(_tgt)
+CTranslationInfo::CTranslationInfo(IAtom * _name, ICharsetInfo * _src, ICharsetInfo * _tgt) : src(_src), tgt(_tgt)
 {
     name = _name;
 }
 
-_ATOM CTranslationInfo::queryName()
+IAtom * CTranslationInfo::queryName()
 {
     return name;
 }
@@ -3061,7 +3061,7 @@ StringBuffer & CEbcdic2AsciiTranslationInfo::translate(StringBuffer & tgt, unsig
 
 //---------------------------------------------------------------------------
 
-ICharsetInfo * getCharset(_ATOM atom)
+ICharsetInfo * getCharset(IAtom * atom)
 {
     if ((atom == NULL) || (atom == asciiAtom))
     {
@@ -3090,7 +3090,7 @@ ICharsetInfo * getCharset(_ATOM atom)
     return NULL;
 }
 
-ICollationInfo * getCollation(_ATOM atom)
+ICollationInfo * getCollation(IAtom * atom)
 {
 #if _DEBUG
     const char* name = atom->str();
@@ -3232,7 +3232,7 @@ bool haveCommonLocale(ITypeInfo * type1, ITypeInfo * type2)
     return ((type1->queryLocale() == type2->queryLocale()) || hasDefaultLocale(type1) || hasDefaultLocale(type2));
 }
 
-_ATOM getCommonLocale(ITypeInfo * type1, ITypeInfo * type2)
+IAtom * getCommonLocale(ITypeInfo * type1, ITypeInfo * type2)
 {
     //for the moment, disallow binary ops unless locales identical or one is default --- may later change, e.g. to use common parent where present
     if(!hasDefaultLocale(type1))

+ 10 - 10
common/deftype/deftype.hpp

@@ -139,7 +139,7 @@ interface ICollationInfo;
 interface ICharsetInfo : public serializable
 {
 public:
-    virtual _ATOM queryName() = 0;
+    virtual IAtom * queryName() = 0;
     virtual ICollationInfo * queryDefaultCollation() = 0;
     virtual unsigned char queryFillChar() = 0;
     virtual char const * queryCodepageName() = 0;
@@ -148,7 +148,7 @@ public:
 interface ICollationInfo : public serializable
 {
 public:
-    virtual _ATOM queryName() = 0;
+    virtual IAtom * queryName() = 0;
     virtual ICharsetInfo * getCharset() = 0;
     virtual int compare(const char * left, const char * right, unsigned len) = 0;
     virtual const char * getCompareName(bool varLength) = 0;
@@ -157,7 +157,7 @@ public:
 interface ITranslationInfo : public IInterface
 {
 public:
-    virtual _ATOM queryName() = 0;
+    virtual IAtom * queryName() = 0;
     virtual const char * queryRtlFunction() = 0;
     virtual const char * queryVarRtlFunction() = 0;
     virtual ICharsetInfo * querySourceCharset() = 0;
@@ -193,7 +193,7 @@ public:
     virtual ITypeInfo * queryChildType() = 0;
     virtual ICharsetInfo * queryCharset() = 0;
     virtual ICollationInfo * queryCollation() = 0;
-    virtual _ATOM queryLocale() = 0;
+    virtual IAtom * queryLocale() = 0;
     virtual IInterface * queryDistributeInfo() = 0;
     virtual IInterface * queryGroupInfo() = 0;
     virtual IInterface * queryGlobalSortInfo() = 0;
@@ -227,9 +227,9 @@ public:
 extern DEFTYPE_API ITypeInfo *makeStringType(unsigned size, ICharsetInfo * _charset = NULL, ICollationInfo * _collation = NULL);
 extern DEFTYPE_API ITypeInfo *makeVarStringType(unsigned size, ICharsetInfo * _charset = NULL, ICollationInfo * _collation = NULL);    //NB: size is numchars+1
 extern DEFTYPE_API ITypeInfo *makeQStringType(int len);
-extern DEFTYPE_API ITypeInfo *makeUnicodeType(unsigned len, _ATOM locale); // takes length in UChars, i.e. bytes/2 if known; locale is like fr_BE_EURO, or 0 for default
-extern DEFTYPE_API ITypeInfo *makeVarUnicodeType(unsigned len, _ATOM locale); // takes length in UChars + 1, i.e. bytes/2 + 1 if known; locale is like fr_BE_EURO, or 0 for default
-extern DEFTYPE_API ITypeInfo *makeUtf8Type(unsigned len, _ATOM locale);       // takes length in UChars, i.e. bytes/4 if known; locale is like fr_BE_EURO, or 0 for default
+extern DEFTYPE_API ITypeInfo *makeUnicodeType(unsigned len, IAtom * locale); // takes length in UChars, i.e. bytes/2 if known; locale is like fr_BE_EURO, or 0 for default
+extern DEFTYPE_API ITypeInfo *makeVarUnicodeType(unsigned len, IAtom * locale); // takes length in UChars + 1, i.e. bytes/2 + 1 if known; locale is like fr_BE_EURO, or 0 for default
+extern DEFTYPE_API ITypeInfo *makeUtf8Type(unsigned len, IAtom * locale);       // takes length in UChars, i.e. bytes/4 if known; locale is like fr_BE_EURO, or 0 for default
 extern DEFTYPE_API ITypeInfo *makeCharType(bool caseSensitive = false);
 extern DEFTYPE_API ITypeInfo *makeIntType(int size, bool isSigned);
 extern DEFTYPE_API ITypeInfo *makeSwapIntType(int size, bool isSigned);
@@ -277,8 +277,8 @@ extern DEFTYPE_API MemoryBuffer & appendBufferFromMem(MemoryBuffer & mem, ITypeI
 
 extern DEFTYPE_API void ClearTypeCache();
 
-extern DEFTYPE_API ICharsetInfo * getCharset(_ATOM charset);
-extern DEFTYPE_API ICollationInfo * getCollation(_ATOM collation);
+extern DEFTYPE_API ICharsetInfo * getCharset(IAtom * charset);
+extern DEFTYPE_API ICollationInfo * getCollation(IAtom * collation);
 extern DEFTYPE_API ITranslationInfo * getDefaultTranslation(ICharsetInfo * tgt, ICharsetInfo * src);
 extern DEFTYPE_API ITranslationInfo * queryDefaultTranslation(ICharsetInfo * tgt, ICharsetInfo * src);
 extern DEFTYPE_API bool isAscii(ITypeInfo * type);
@@ -300,7 +300,7 @@ extern DEFTYPE_API ITypeInfo * getAsciiType(ITypeInfo * type);
 extern DEFTYPE_API ITypeInfo * getBandType(ITypeInfo * type1, ITypeInfo * type2);
 extern DEFTYPE_API ITypeInfo * getBorType(ITypeInfo * type1, ITypeInfo * type2);
 extern DEFTYPE_API bool haveCommonLocale(ITypeInfo * type1, ITypeInfo * type2);
-extern DEFTYPE_API _ATOM getCommonLocale(ITypeInfo * type1, ITypeInfo * type2);
+extern DEFTYPE_API IAtom * getCommonLocale(ITypeInfo * type1, ITypeInfo * type2);
 extern DEFTYPE_API ITypeInfo * getPromotedCompareType(ITypeInfo * left, ITypeInfo * right);
 
 extern DEFTYPE_API bool isNumericType(ITypeInfo * type);

+ 19 - 19
common/deftype/deftype.ipp

@@ -64,7 +64,7 @@ public:
     virtual ITypeInfo * queryPromotedType()     { return this; }    // very common implementation
     virtual ICharsetInfo * queryCharset()       { return NULL; }
     virtual ICollationInfo * queryCollation()   { return NULL; }
-    virtual _ATOM queryLocale()                 { return NULL; }
+    virtual IAtom * queryLocale()                 { return NULL; }
     virtual ITypeInfo * queryTypeBase()         { return this; }
     virtual unsigned getCrc();
     virtual typemod_t queryModifier()           { return typemod_none; }
@@ -143,7 +143,7 @@ protected:
 class CUnicodeTypeInfo : public CTypeInfo
 {
 public:
-    CUnicodeTypeInfo(unsigned _length, _ATOM _locale) : CTypeInfo(_length), locale(_locale) {}
+    CUnicodeTypeInfo(unsigned _length, IAtom * _locale) : CTypeInfo(_length), locale(_locale) {}
 
     virtual type_t getTypeCode() const { return type_unicode; };
     virtual unsigned getDigits() { return getStringLen(); }
@@ -159,20 +159,20 @@ public:
     virtual bool assignableFrom(ITypeInfo *t2);
 
     virtual StringBuffer &getECLType(StringBuffer & out);
-    virtual _ATOM queryLocale()         { return locale; }
+    virtual IAtom * queryLocale()         { return locale; }
     virtual const char *queryTypeName()         { return "UChar"; }
     virtual bool isInteger()                    { return false; };
     virtual bool isScalar()                     { return true; }
 
     virtual void serialize(MemoryBuffer &tgt)   { CTypeInfo::serialize(tgt); tgt.append(getStringLen()).append(locale->str()); }
 protected:
-    _ATOM locale;
+    IAtom * locale;
 };
 
 class CVarUnicodeTypeInfo : public CUnicodeTypeInfo
 {
 public:
-    CVarUnicodeTypeInfo(unsigned len, _ATOM _locale);
+    CVarUnicodeTypeInfo(unsigned len, IAtom * _locale);
     virtual type_t getTypeCode() const                { return type_varunicode; };
     virtual unsigned getStringLen()             { return length != UNKNOWN_LENGTH ? length/2-1 : UNKNOWN_LENGTH; };
 
@@ -185,7 +185,7 @@ public:
 class CUtf8TypeInfo : public CUnicodeTypeInfo
 {
 public:
-    CUtf8TypeInfo(unsigned len, _ATOM _locale) : CUnicodeTypeInfo(len, _locale) {}
+    CUtf8TypeInfo(unsigned len, IAtom * _locale) : CUnicodeTypeInfo(len, _locale) {}
 
     virtual type_t getTypeCode() const          { return type_utf8; };
     virtual unsigned getSize()                  { return UNKNOWN_LENGTH; };
@@ -849,7 +849,7 @@ public:
     virtual ITypeInfo * queryChildType()                            { return baseType->queryChildType(); }
     virtual ICharsetInfo * queryCharset()                           { return baseType->queryCharset(); }
     virtual ICollationInfo * queryCollation()                       { return baseType->queryCollation(); }
-    virtual _ATOM queryLocale()                                     { return baseType->queryLocale(); }
+    virtual IAtom * queryLocale()                                     { return baseType->queryLocale(); }
     virtual IInterface * queryLocalUngroupedSortInfo()                      { return baseType->queryLocalUngroupedSortInfo(); }
     virtual IInterface * queryGlobalSortInfo()                      { return baseType->queryGlobalSortInfo(); }
     virtual IInterface * queryGroupInfo()                           { return baseType->queryGroupInfo(); }
@@ -894,7 +894,7 @@ protected:
 class CCharsetInfo : public CInterface, implements ICharsetInfo
 {
 public:
-    CCharsetInfo(_ATOM _name, unsigned char _fillChar, _ATOM _codepage)
+    CCharsetInfo(IAtom * _name, unsigned char _fillChar, IAtom * _codepage)
     {
         name = _name;
         defaultCollation = NULL;
@@ -904,7 +904,7 @@ public:
     ~CCharsetInfo();
     IMPLEMENT_IINTERFACE
 
-    virtual _ATOM queryName()                           { return name; }
+    virtual IAtom * queryName()                           { return name; }
     virtual ICollationInfo * queryDefaultCollation();
     virtual unsigned char queryFillChar()               { return fillChar; }
     virtual char const * queryCodepageName()            { return codepage->str(); }
@@ -915,8 +915,8 @@ public:
     }
     virtual void deserialize(MemoryBuffer &) { UNIMPLEMENTED; }
 protected:
-    _ATOM   name;
-    _ATOM   codepage;
+    IAtom *   name;
+    IAtom *   codepage;
     ICollationInfo * defaultCollation;
     unsigned char fillChar;
 };
@@ -924,11 +924,11 @@ protected:
 class CCollationInfo : public CInterface, implements ICollationInfo
 {
 public:
-    CCollationInfo(_ATOM _name) { name = _name; }
+    CCollationInfo(IAtom * _name) { name = _name; }
     ~CCollationInfo();
     IMPLEMENT_IINTERFACE
 
-    virtual _ATOM queryName()                           { return name; }
+    virtual IAtom * queryName()                           { return name; }
     virtual ICharsetInfo * getCharset();
 
     virtual void serialize(MemoryBuffer &tgt) 
@@ -937,14 +937,14 @@ public:
     }
     virtual void deserialize(MemoryBuffer &) { UNIMPLEMENTED; }
 protected:
-    _ATOM   name;
+    IAtom *   name;
 };
 
 
 class CSimpleCollationInfo : public CCollationInfo
 {
 public:
-    CSimpleCollationInfo(_ATOM _name) : CCollationInfo(_name) 
+    CSimpleCollationInfo(IAtom * _name) : CCollationInfo(_name)
     { // loose format for debug
     }
 
@@ -956,7 +956,7 @@ public:
 class CNoCaseCollationInfo : public CCollationInfo
 {
 public:
-    CNoCaseCollationInfo(_ATOM _name) : CCollationInfo(_name) {}
+    CNoCaseCollationInfo(IAtom * _name) : CCollationInfo(_name) {}
 
     virtual int compare(const char * left, const char * right, unsigned len)        { return memicmp(left, right, len); }
     virtual const char * getCompareName(bool varLength)                             { return varLength ? "stricmp" : "memicmp"; }
@@ -965,15 +965,15 @@ public:
 class CTranslationInfo : public CInterface, implements ITranslationInfo
 {
 public:
-    CTranslationInfo(_ATOM _name, ICharsetInfo * src, ICharsetInfo * tgt);
+    CTranslationInfo(IAtom * _name, ICharsetInfo * src, ICharsetInfo * tgt);
     IMPLEMENT_IINTERFACE
 
-    virtual _ATOM queryName();
+    virtual IAtom * queryName();
     virtual ICharsetInfo * querySourceCharset();
     virtual ICharsetInfo * queryTargetCharset();
 
 protected:
-    _ATOM name;
+    IAtom * name;
     Owned<ICharsetInfo> src;
     Owned<ICharsetInfo> tgt;
 };

+ 2 - 2
common/deftype/defvalue.cpp

@@ -36,8 +36,8 @@
 
 BoolValue *BoolValue::trueconst;
 BoolValue *BoolValue::falseconst;
-static _ATOM asciiAtom;
-static _ATOM ebcdicAtom;
+static IAtom * asciiAtom;
+static IAtom * ebcdicAtom;
 
 MODULE_INIT(INIT_PRIORITY_DEFVALUE)
 {

+ 7 - 7
common/fileview2/fvtransform.cpp

@@ -37,10 +37,10 @@ static ViewTransformerRegistry * theTransformerRegistry;
 static ITypeInfo * stringType;
 static ITypeInfo * utf8Type;
 static ITypeInfo * unicodeType;
-static _ATOM addAtom;
+static IAtom * addAtom;
 MODULE_INIT(INIT_PRIORITY_STANDARD)
 {
-    addAtom = createIdentifierAtom("add");
+    addAtom = createLowerCaseAtom("add");
     stringType = makeStringType(UNKNOWN_LENGTH, NULL, NULL);
     utf8Type = makeUtf8Type(UNKNOWN_LENGTH, NULL);
     unicodeType = makeUnicodeType(UNKNOWN_LENGTH, NULL);
@@ -276,17 +276,17 @@ void ViewTransformerRegistry::addTransformer(ViewFieldTransformer * ownedTransfo
 
 void ViewTransformerRegistry::addFieldUtf8Transformer(const char * name, utf8FieldTransformerFunction func)
 {
-    transformers.append(* new ViewFieldUtf8Transformer(createIdentifierAtom(name), func));
+    transformers.append(* new ViewFieldUtf8Transformer(createLowerCaseAtom(name), func));
 }
 
 void ViewTransformerRegistry::addFieldStringTransformer(const char * name, stringFieldTransformerFunction func)
 {
-    transformers.append(* new ViewFieldStringTransformer(createIdentifierAtom(name), func));
+    transformers.append(* new ViewFieldStringTransformer(createLowerCaseAtom(name), func));
 }
 
 void ViewTransformerRegistry::addFieldUnicodeTransformer(const char * name, unicodeFieldTransformerFunction func)
 {
-    transformers.append(* new ViewFieldUnicodeTransformer(createIdentifierAtom(name), func));
+    transformers.append(* new ViewFieldUnicodeTransformer(createLowerCaseAtom(name), func));
 }
 
 void ViewTransformerRegistry::addPlugins(const char * name)
@@ -431,7 +431,7 @@ ViewFieldTransformer * find(const ViewFieldTransformerArray & transformers, cons
 {
     if (!name)
         return NULL;
-    _ATOM search = createIdentifierAtom(name);
+    IIdAtom * search = createIdAtom(name);
     ForEachItemIn(i, transformers)
     {
         ViewFieldTransformer & cur = transformers.item(i);
@@ -474,7 +474,7 @@ bool containsFail(const ViewFieldTransformerArray & transforms)
 {
     ForEachItemIn(i, transforms)
     {
-        if (transforms.item(i).matches(failAtom))
+        if (transforms.item(i).matches(failId))
             return true;
     }
     return false;

+ 7 - 7
common/fileview2/fvtransform.ipp

@@ -61,12 +61,12 @@ void getInvertedCardinality(StringBuffer & out, const char * cardinality);
 class FILEVIEW_API ViewFieldTransformer : public CInterface
 {
 public:
-    ViewFieldTransformer(_ATOM _name)
+    ViewFieldTransformer(IAtom * _name)
         : name(_name)
     {}
 
-    inline bool matches(_ATOM search) const { return name == search; }
-    inline _ATOM queryName() const { return name; }
+    inline bool matches(IIdAtom * search) const { return name == search->lower(); }
+    inline IAtom * queryName() const { return name; }
     
     virtual ViewFieldTransformer * bind(const HqlExprArray & args);
 
@@ -76,7 +76,7 @@ protected:
     virtual void transform(unsigned & lenTarget, char * & target, unsigned lenSource, const char * source) = 0;
 
 protected:
-    _ATOM name;
+    IAtom * name;
 };
 
 class FILEVIEW_API ViewFailTransformer : public ViewFieldTransformer
@@ -117,7 +117,7 @@ protected:
 class FILEVIEW_API ViewFieldUtf8Transformer : public ViewFieldTransformer
 {
 public:
-    ViewFieldUtf8Transformer(_ATOM _name, utf8FieldTransformerFunction _function)
+    ViewFieldUtf8Transformer(IAtom * _name, utf8FieldTransformerFunction _function)
         : ViewFieldTransformer(_name), function(_function)
     {}
 
@@ -133,7 +133,7 @@ protected:
 class FILEVIEW_API ViewFieldUnicodeTransformer : public ViewFieldTransformer
 {
 public:
-    ViewFieldUnicodeTransformer(_ATOM _name, unicodeFieldTransformerFunction _function)
+    ViewFieldUnicodeTransformer(IAtom * _name, unicodeFieldTransformerFunction _function)
         : ViewFieldTransformer(_name), function(_function)
     {}
 
@@ -149,7 +149,7 @@ protected:
 class FILEVIEW_API ViewFieldStringTransformer : public ViewFieldTransformer
 {
 public:
-    ViewFieldStringTransformer(_ATOM _name, stringFieldTransformerFunction _function)
+    ViewFieldStringTransformer(IAtom * _name, stringFieldTransformerFunction _function)
         : ViewFieldTransformer(_name), function(_function)
     {}
 

+ 18 - 18
common/fileview2/fvwugen.cpp

@@ -39,15 +39,15 @@ output(simple);
 
   */
 
-_ATOM fileposName;
-_ATOM insertedAtom;
-_ATOM recordlenName;
+IIdAtom * fileposId;
+IIdAtom * recordlenName;
+IAtom * insertedAtom;
 
 MODULE_INIT(INIT_PRIORITY_STANDARD)
 {
-    fileposName = createIdentifierAtom("__filepos__");
+    fileposId = createIdAtom("__filepos__");
+    recordlenName = createIdAtom("__recordlen__");
     insertedAtom = createLowerCaseAtom("inserted");
-    recordlenName = createIdentifierAtom("__recordlen__");
     return true;
 }
 
@@ -55,14 +55,14 @@ IHqlExpression * addFilter(IHqlExpression * dataset, IHqlExpression * limitField
 {
     IHqlExpression * lower = createConstant(limitField->queryType()->castFrom(true, (__int64)0));
     lower = createValue(no_colon, lower, createValue(no_stored, createConstant(LOWER_LIMIT_ID)));
-    lower = createSymbol(createIdentifierAtom(LOWER_LIMIT_ID), lower, ob_private);
+    lower = createSymbol(createIdAtom(LOWER_LIMIT_ID), lower, ob_private);
     dataset = createDataset(no_filter, LINK(dataset), createBoolExpr(no_ge, LINK(limitField), lower));
 
     IHqlExpression * upper = createConstant((int)DISKREAD_PAGE_SIZE);
     upper = createValue(no_colon, upper, createValue(no_stored, createConstant(RECORD_LIMIT_ID)));
-    upper = createSymbol(createIdentifierAtom(RECORD_LIMIT_ID), upper, ob_private);
+    upper = createSymbol(createIdAtom(RECORD_LIMIT_ID), upper, ob_private);
     dataset = createDataset(no_choosen, dataset, upper);
-    dataset = createSymbol(createIdentifierAtom("_Filtered_"), dataset, ob_private);
+    dataset = createSymbol(createIdAtom("_Filtered_"), dataset, ob_private);
     return dataset;
 }
 
@@ -79,7 +79,7 @@ IHqlExpression * addSimplifyProject(IHqlExpression * dataset)
     if (!projectRecord)
         return LINK(dataset);
 
-    projectRecord = createSymbol(createIdentifierAtom("_TargetRecord_"), projectRecord, ob_private);
+    projectRecord = createSymbol(createIdAtom("_TargetRecord_"), projectRecord, ob_private);
     return createDataset(no_newusertable, LINK(dataset), createComma(projectRecord, getSimplifiedTransform(projectRecord, record, dataset)));
 }
 
@@ -88,7 +88,7 @@ IHqlExpression * addSimplifyProject(IHqlExpression * dataset)
 
 IHqlExpression * buildWorkUnitViewerEcl(IHqlExpression * record, const char * wuid, unsigned sequence, const char * name)
 {
-    OwnedHqlExpr newRecord = createSymbol(createIdentifierAtom("_SourceRecord_"), LINK(record), ob_private);
+    OwnedHqlExpr newRecord = createSymbol(createIdAtom("_SourceRecord_"), LINK(record), ob_private);
     IHqlExpression * arg = name ? createConstant(name) : createConstant((int)sequence);
     OwnedHqlExpr dataset = createDataset(no_workunit_dataset, newRecord.getLink(), createComma(createConstant(wuid), arg));
     OwnedHqlExpr projected = addSimplifyProject(dataset);
@@ -101,7 +101,7 @@ IHqlExpression * buildDiskFileViewerEcl(const char * logicalName, IHqlExpression
 {
     //Add filepos to the incomming record structure...
     IHqlExpression * filePosAttr = createAttribute(virtualAtom, createAttribute(filepositionAtom));
-    OwnedHqlExpr filepos = createField(fileposName, makeIntType(8, false), NULL, filePosAttr);
+    OwnedHqlExpr filepos = createField(fileposId, makeIntType(8, false), NULL, filePosAttr);
     IHqlExpression * sizeofAttr = createAttribute(virtualAtom, createAttribute(sizeofAtom));
     OwnedHqlExpr reclen = createField(recordlenName, makeIntType(2, false), NULL, sizeofAttr);
     HqlExprArray fields;
@@ -110,7 +110,7 @@ IHqlExpression * buildDiskFileViewerEcl(const char * logicalName, IHqlExpression
     fields.append(*reclen.getLink());
 
     OwnedHqlExpr newRecord = createRecord(fields);
-    newRecord.setown(createSymbol(createIdentifierAtom("_SourceRecord_"), newRecord.getLink(), ob_private));
+    newRecord.setown(createSymbol(createIdAtom("_SourceRecord_"), newRecord.getLink(), ob_private));
 
     OwnedHqlExpr dataset = createNewDataset(createConstant(logicalName), newRecord.getLink(), createValue(no_thor), NULL, NULL, NULL);
     OwnedHqlExpr filtered = addFilter(dataset, filepos);
@@ -133,7 +133,7 @@ IHqlExpression * buildDiskOutputEcl(const char * logicalName, IHqlExpression * r
 static HqlTransformerInfo positionTransformerInfo("PositionTransformer");
 PositionTransformer::PositionTransformer()  : NewHqlTransformer(positionTransformerInfo)
 { 
-    insertedAttr.setown(createAttribute(insertedAtom)); 
+    insertedAttr.setown(createAttribute(insertedAtom));
 }
 
 IHqlExpression * PositionTransformer::createTransformed(IHqlExpression * _expr)
@@ -153,7 +153,7 @@ IHqlExpression * PositionTransformer::createTransformed(IHqlExpression * _expr)
                 unwindChildren(fields, transformed->queryChild(1));
                 IHqlExpression * filePosAttr = createComma(createAttribute(virtualAtom, createAttribute(filepositionAtom)), insertedAttr.getLink());
                 IHqlExpression * sizeofAttr = createComma(createAttribute(virtualAtom, createAttribute(sizeofAtom)), insertedAttr.getLink());
-                fields.append(*createField(fileposName, makeIntType(8, false), NULL, filePosAttr));
+                fields.append(*createField(fileposId, makeIntType(8, false), NULL, filePosAttr));
                 fields.append(*createField(recordlenName, makeIntType(2, false), NULL, sizeofAttr));
 
                 unwindChildren(args, transformed);
@@ -180,7 +180,7 @@ IHqlExpression * PositionTransformer::createTransformed(IHqlExpression * _expr)
                 IHqlExpression * child = inRecord->queryChild(idx);
                 if (child->hasProperty(insertedAtom))
                 {
-                    IHqlExpression * newTarget = createField(child->queryName(), child->getType(), LINK(child), insertedAttr.getLink());
+                    IHqlExpression * newTarget = createField(child->queryId(), child->getType(), LINK(child), insertedAttr.getLink());
                     fields.append(*newTarget);
                     assigns.append(*createValue(no_assign, makeVoidType(), newTarget, createSelectExpr(createValue(no_left), LINK(newTarget))));
                 }
@@ -210,7 +210,7 @@ IHqlExpression * PositionTransformer::createTransformed(IHqlExpression * _expr)
             {
                 IHqlExpression * child = record->queryChild(idx);
                 if (child->hasProperty(insertedAtom))
-                    fields.append(*createField(child->queryName(), child->getType(), LINK(child), insertedAttr.getLink()));
+                    fields.append(*createField(child->queryId(), child->getType(), LINK(child), insertedAttr.getLink()));
             }
 
             HqlExprArray args;
@@ -239,7 +239,7 @@ IHqlExpression * PositionTransformer::createTransformed(IHqlExpression * _expr)
                     {
                         IHqlExpression * child = record->queryChild(idx);
                         if (!child->hasProperty(insertedAtom))
-                            fields.append(*createField(child->queryName(), child->getType(), LINK(child)));
+                            fields.append(*createField(child->queryId(), child->getType(), LINK(child)));
                     }
                 }
                 else
@@ -300,7 +300,7 @@ IHqlExpression * buildQueryViewerEcl(IHqlExpression * selectFields)
     if (!transformed)
         return NULL;
     IHqlSimpleScope * scope = transformed->queryRecord()->querySimpleScope();
-    OwnedHqlExpr filterField = scope->lookupSymbol(fileposName);
+    OwnedHqlExpr filterField = scope->lookupSymbol(fileposId);
     OwnedHqlExpr filtered = addFilter(transformed, filterField);
     OwnedHqlExpr output = addOutput(filtered);
     return output.getClear();

+ 4 - 4
common/thorhelper/layouttrans.cpp

@@ -22,7 +22,7 @@
 
 char const * const scopeSeparator = ".";
 
-static _ATOM internalFposAtom;
+static IAtom * internalFposAtom;
 MODULE_INIT(INIT_PRIORITY_STANDARD)
 {
     internalFposAtom = createAtom("__internal_fpos__");
@@ -58,7 +58,7 @@ FieldSearcher::FieldSearcher(IDefRecordElement const * elem)
         tab.setValue(elem->queryChild(i)->queryName(), i);
 }
 
-bool FieldSearcher::search(_ATOM search, unsigned & pos) const
+bool FieldSearcher::search(IAtom * search, unsigned & pos) const
 {
     unsigned * ret = tab.getValue(search);
     if(ret)
@@ -810,7 +810,7 @@ public:
         {
             Owned<IDefRecordBuilder> builder = createDErecord(4096);
             Owned<ITypeInfo> type;
-            _ATOM name;
+            IAtom * name;
             size32_t size;
             unsigned keyed;
             unsigned f;
@@ -897,7 +897,7 @@ public:
     }
 
 private:
-    bool getFieldData(unsigned m, unsigned f, Owned<ITypeInfo> & type, _ATOM & name, size32_t & size, unsigned & keyed)
+    bool getFieldData(unsigned m, unsigned f, Owned<ITypeInfo> & type, IAtom * & name, size32_t & size, unsigned & keyed)
     {
         switch(m)
         {

+ 2 - 2
common/thorhelper/layouttrans.ipp

@@ -38,10 +38,10 @@ class FieldSearcher
 {
 public:
     FieldSearcher(IDefRecordElement const * elem);
-    bool search(_ATOM search, unsigned & pos) const;
+    bool search(IAtom * search, unsigned & pos) const;
 
 private:
-    MapBetween<_ATOM, _ATOM, unsigned, unsigned> tab;
+    MapBetween<IAtom *, IAtom *, unsigned, unsigned> tab;
 };
 
 class FieldMapping : public CInterface

+ 4 - 4
common/thorhelper/thorparse.cpp

@@ -21,7 +21,7 @@
 #include "eclrtl.hpp"
 #include "eclhelper.hpp"
 
-_ATOM separatorTagAtom;
+IAtom * separatorTagAtom;
 MODULE_INIT(INIT_PRIORITY_STANDARD)
 {
     separatorTagAtom = createAtom("<separator>");
@@ -336,7 +336,7 @@ void CMatchedResults::kill()
 //---------------------------------------------------------------------------
 
 
-_ATOM NlpMatchWalker::queryName()     
+IAtom * NlpMatchWalker::queryName()
 { 
     return curMatch->queryName(); 
 }
@@ -405,7 +405,7 @@ static void expandElementText(StringBuffer & s, IMatchWalker * walker)
 
 static void getDefaultParseTree(StringBuffer & s, IMatchWalker * cur)
 {
-    _ATOM name = cur->queryName();
+    IAtom * name = cur->queryName();
     if (name != separatorTagAtom)
     {
         if (name)
@@ -446,7 +446,7 @@ void getDefaultParseTree(IMatchWalker * walker, unsigned & len, char * & text)
 
 static void getXmlParseTree(StringBuffer & s, IMatchWalker * walker, unsigned indent)
 {
-    _ATOM name = walker->queryName();
+    IAtom * name = walker->queryName();
     if (name != separatorTagAtom)
     {
         unsigned max = walker->numChildren();

+ 6 - 6
common/thorhelper/thorparse.hpp

@@ -34,7 +34,7 @@ enum { NLPAregexStack, NLPAtomita, NLPAregexHeap };
 interface IMatchWalker : public IInterface
 {
 public:
-    virtual _ATOM queryName() = 0;
+    virtual IAtom * queryName() = 0;
     virtual unsigned queryID() = 0;
     virtual size32_t queryMatchSize() = 0;
     virtual const void * queryMatchStart() = 0;
@@ -58,18 +58,18 @@ interface IMatchedElement : public IInterface
 };
 
 class RegexNamed;
-extern _ATOM separatorTagAtom;
+extern IAtom * separatorTagAtom;
 //MORE: Remove the vmt to make constructing more efficient... use id and name fields instead.
 class THORHELPER_API MatchState
 {
 public:
     MatchState() { next = NULL; firstChild = NULL; name = NULL; id = 0; }   // other fields get filled in later.
-    MatchState(_ATOM _name, regexid_t _id) { next = NULL; firstChild = NULL; name = _name; id = _id; }  // other fields get filled in later.
+    MatchState(IAtom * _name, regexid_t _id) { next = NULL; firstChild = NULL; name = _name; id = _id; }  // other fields get filled in later.
 
-    inline _ATOM queryName()                              { return name; }
+    inline IAtom * queryName()                              { return name; }
     inline regexid_t queryID()                            { return id; }
 
-    inline void reset(_ATOM _name, regexid_t _id) { next = NULL; firstChild = NULL; name = _name; id = _id; }
+    inline void reset(IAtom * _name, regexid_t _id) { next = NULL; firstChild = NULL; name = _name; id = _id; }
 
 public:
     const byte * start;
@@ -77,7 +77,7 @@ public:
     MatchState * next;
     MatchState * firstChild;
     MatchState * parent;
-    _ATOM name;
+    IAtom * name;
     regexid_t id;
 };
 

+ 1 - 1
common/thorhelper/thorparse.ipp

@@ -193,7 +193,7 @@ public:
     NlpMatchWalker(MatchState * state) { curMatch = state; }
     IMPLEMENT_IINTERFACE
 
-    virtual _ATOM queryName();
+    virtual IAtom * queryName();
     virtual unsigned queryID()                              { return curMatch->id; }
     virtual size32_t queryMatchSize();
     virtual const void * queryMatchStart();

+ 3 - 3
common/thorhelper/thorralgo.ipp

@@ -136,7 +136,7 @@ class THORHELPER_API RegexMatchState : public CInterface, public MatchState
 {
 public:
     RegexMatchState() : MatchState() { }
-    RegexMatchState(_ATOM _name, regexid_t _id) : MatchState(_name, _id) { }
+    RegexMatchState(IAtom * _name, regexid_t _id) : MatchState(_name, _id) { }
     RegexMatchState(RegexNamed * owner) : MatchState(owner->queryName(), owner->queryID()) {}
     IMPLEMENT_IINTERFACE
 
@@ -148,7 +148,7 @@ class THORHELPER_API RegexMatchStateSave : public RegexMatchState
 {
 public:
     RegexMatchStateSave() : RegexMatchState() { }
-    RegexMatchStateSave(_ATOM _name, regexid_t _id) : RegexMatchState(_name, _id) { }
+    RegexMatchStateSave(IAtom * _name, regexid_t _id) : RegexMatchState(_name, _id) { }
     RegexMatchStateSave(RegexNamed * owner) : RegexMatchState(owner) {}
 
 public:
@@ -161,7 +161,7 @@ class RegexStateCache
 public:
     RegexMatchState * createState(RegexNamed * def);
     RegexMatchStateSave * createStateSave(RegexNamed * def);
-    RegexMatchStateSave * createStateSave(_ATOM _name, regexid_t _id);
+    RegexMatchStateSave * createStateSave(IAtom * _name, regexid_t _id);
     void destroyState(RegexMatchState * state);
     void destroyStateSave(RegexMatchStateSave * state);
 

+ 2 - 2
common/thorhelper/thorrparse.cpp

@@ -199,7 +199,7 @@ MemoryBuffer & serializeKind(MemoryBuffer & out, ThorRegexKind kind)
     return out.append((byte)kind);
 }
 
-void deserialize(MemoryBuffer & in, _ATOM & name)
+void deserialize(MemoryBuffer & in, IAtom * & name)
 {
     StringAttr x;
     in.read(x);
@@ -3148,7 +3148,7 @@ RegexMatchStateSave * RegexStateCache::createStateSave(RegexNamed * def)
     return new RegexMatchStateSave(def);
 }
 
-RegexMatchStateSave * RegexStateCache::createStateSave(_ATOM _name, regexid_t _id)
+RegexMatchStateSave * RegexStateCache::createStateSave(IAtom * _name, regexid_t _id)
 {
     if (matchStateSaves.ordinality())
     {

+ 3 - 3
common/thorhelper/thorrparse.hpp

@@ -124,9 +124,9 @@ class THORHELPER_API RegexNamed : public CInterface
 {
 public:
     RegexNamed() { name = NULL; id = 0; }
-    RegexNamed(_ATOM _name, regexid_t _id) { name = _name; id = _id; }
+    RegexNamed(IAtom * _name, regexid_t _id) { name = _name; id = _id; }
 
-    inline _ATOM queryName() { return name; }
+    inline IAtom * queryName() { return name; }
     inline regexid_t queryID() { return id; }
     RegexMatchAction match(RegexState & state, RegexPattern * instance);
     RegexMatchAction match(RegexState & state, RegexPattern * instance, MatchState & match);
@@ -148,7 +148,7 @@ public:
 
 protected:
     OwnedRegexPattern first;
-    _ATOM name;
+    IAtom * name;
     regexid_t id;
 };
 

+ 1 - 1
common/thorhelper/thortalgo.cpp

@@ -1050,7 +1050,7 @@ void LRTableBuilder::addGoto(symbol_id id, unsigned newState)
     curState->gotos[id - table.numTokens] = newState;
 }
 
-void LRTableBuilder::addProduction(unsigned id, unsigned ruleId, _ATOM ruleName, unsigned numToPop, int penalty, bool transformClonesFirstSymbol)
+void LRTableBuilder::addProduction(unsigned id, unsigned ruleId, IAtom * ruleName, unsigned numToPop, int penalty, bool transformClonesFirstSymbol)
 {
     assertex(id < table.numProductions); 
     LRProduction & cur = table.productions[id];

+ 2 - 2
common/thorhelper/thortalgo.ipp

@@ -224,7 +224,7 @@ public:
 protected:
     unsigned prodId;   
     symbol_id ruleId;
-    _ATOM ruleName;
+    IAtom * ruleName;
     unsigned numSymbols;
     ProductionFeatureInfo feature;
     int penalty;
@@ -327,7 +327,7 @@ public:
     void addAccept(token_id id);
     void addShift(token_id id, state_id newState);
     void addGoto(symbol_id id, state_id newState);
-    void addProduction(unsigned id, unsigned ruleId, _ATOM ruleName, unsigned numToPop, int penalty, bool transformClonesFirstSymbol);
+    void addProduction(unsigned id, unsigned ruleId, IAtom * ruleName, unsigned numToPop, int penalty, bool transformClonesFirstSymbol);
     void addReduce(token_id id, unsigned prod);
     void addValidator(unsigned prodId, byte kind, unsigned low, unsigned high, AsciiDfa * dfa);
     void beginState(unsigned id);

+ 2 - 2
common/thorhelper/thortparse.cpp

@@ -83,7 +83,7 @@ Terminal::Terminal(symbol_id _id, const FeatureInfo * featureInfo, unsigned _len
 
 //---------------------------------------------------------------------------
 
-NonTerminal::NonTerminal(symbol_id _id, _ATOM _name, FeatureValue & _features, unsigned numSymbols, GrammarSymbol * * symbols, const byte * _reducePtr, size32_t _resultSize, byte * _resultRow) : GrammarSymbol(_id), resultSize(_resultSize), resultRow(_resultRow)
+NonTerminal::NonTerminal(symbol_id _id, IAtom * _name, FeatureValue & _features, unsigned numSymbols, GrammarSymbol * * symbols, const byte * _reducePtr, size32_t _resultSize, byte * _resultRow) : GrammarSymbol(_id), resultSize(_resultSize), resultRow(_resultRow)
 {
     unsigned nullCount = 0;
     unsigned nonNullIndex;
@@ -235,7 +235,7 @@ TomitaMatchWalker::TomitaMatchWalker(const PackedSymbolChoice & _choice, Grammar
     }
 }
 
-_ATOM TomitaMatchWalker::queryName()
+IAtom * TomitaMatchWalker::queryName()
 {
     return symbol->queryName();
 }

+ 6 - 6
common/thorhelper/thortparse.ipp

@@ -75,7 +75,7 @@ public:
     virtual bool isPacked() const                           { return false; }
     virtual unsigned numChildren() const                    { return 0; }
     virtual GrammarSymbol * queryChild(unsigned i)          { return NULL; }
-    virtual _ATOM queryName() const                         { return NULL; }
+    virtual IAtom * queryName() const                         { return NULL; }
     virtual GrammarSymbol * queryPacked(unsigned i)         { return NULL; }
     virtual size32_t queryResultSize() const                { return 0; }
     virtual byte * queryResultRow() const                   { return NULL; }
@@ -112,13 +112,13 @@ protected:
 class NonTerminal : public GrammarSymbol
 {
 public:
-    NonTerminal(symbol_id id, _ATOM _name, FeatureValue & _features, unsigned numSymbols, GrammarSymbol * * symbols, const byte * _reducePtr, size32_t _resultSize, byte * _resultRow);
+    NonTerminal(symbol_id id, IAtom * _name, FeatureValue & _features, unsigned numSymbols, GrammarSymbol * * symbols, const byte * _reducePtr, size32_t _resultSize, byte * _resultRow);
     ~NonTerminal();
 
     virtual bool isNull() const                             { return cachedIsNull; }
     virtual const byte * queryStartPtr() const;
     virtual const byte * queryEndPtr() const;
-    virtual _ATOM queryName() const                         { return name; }
+    virtual IAtom * queryName() const                         { return name; }
 
     virtual void resetPosition(const byte * pos);
     virtual unsigned numChildren() const                    { return reduced.ordinality(); }
@@ -129,7 +129,7 @@ public:
 protected:
     const byte * reducePtr;
     byte * resultRow;
-    _ATOM name;
+    IAtom * name;
     size32_t resultSize;                            // This really shouldn't be needed - it is needed to support old style record cloning, and doRowsMatch - which needs to be done with a helper.
     CIArrayOf<GrammarSymbol> reduced;
     bool cachedIsNull;
@@ -150,7 +150,7 @@ public:
     virtual bool isPacked() const                           { return true; }
     virtual unsigned numChildren() const                    { UNIMPLEMENTED; }
     virtual GrammarSymbol * queryChild(unsigned i)          { UNIMPLEMENTED; }
-    virtual _ATOM queryName() const                         { return equivalents.item(0).queryName(); }
+    virtual IAtom * queryName() const                         { return equivalents.item(0).queryName(); }
     virtual GrammarSymbol * queryPacked(unsigned i);
 
 private:
@@ -166,7 +166,7 @@ public:
     TomitaMatchWalker(const PackedSymbolChoice & _choice, GrammarSymbol * _symbol);
     IMPLEMENT_IINTERFACE
 
-    virtual _ATOM queryName();
+    virtual IAtom * queryName();
     virtual unsigned queryID();
     virtual size32_t queryMatchSize();
     virtual const void * queryMatchStart();

+ 2 - 2
ecl/eclcc/eclcc.cpp

@@ -1160,7 +1160,7 @@ void EclCC::processFile(EclCompileInstance & instance)
                 //Associate the contents of the directory with an internal module called _local_directory_
                 //(If it was root it might override existing root symbols).  $ is the only public way to get at the symbol
                 const char * moduleName = "_local_directory_";
-                _ATOM moduleNameAtom = createAtom(moduleName);
+                IIdAtom * moduleNameId = createIdAtom(moduleName);
 
                 StringBuffer thisDirectory;
                 StringBuffer thisTail;
@@ -1172,7 +1172,7 @@ void EclCC::processFile(EclCompileInstance & instance)
 
                 Owned<IEclSourceCollection> directory = createFileSystemEclCollection(instance.errs, thisDirectory, 0, 0);
                 Owned<IEclRepository> directoryRepository = createRepository(directory, moduleName);
-                Owned<IEclRepository> nested = createNestedRepository(moduleNameAtom, directoryRepository);
+                Owned<IEclRepository> nested = createNestedRepository(moduleNameId, directoryRepository);
                 repositories.append(*LINK(nested));
             }
         }

+ 1 - 1
ecl/hql/hql.hpp

@@ -184,7 +184,7 @@ interface IEclRepositoryCallback : public IEclRepository
 {
 //Should only be called and implemented for concrete repositories
     virtual bool loadModule(IHqlRemoteScope * rScope, IErrorReceiver * errs, bool forceAll) = 0;
-    virtual IHqlExpression * loadSymbol(IHqlRemoteScope *scope, IAtom * searchName) = 0;
+    virtual IHqlExpression * loadSymbol(IHqlRemoteScope *scope, IIdAtom * searchName) = 0;
 };
 
 

+ 441 - 421
ecl/hql/hqlatoms.cpp

@@ -17,396 +17,406 @@
 #include "hql.hpp"
 #include "hqlatoms.hpp"
 
-_ATOM abstractAtom;
-_ATOM accessAtom;
-_ATOM actionAtom;
-_ATOM activeAtom;
-_ATOM activeFailureAtom;
-_ATOM activeNlpAtom;
-_ATOM afterAtom;
-_ATOM aggregateAtom;
-_ATOM algorithmAtom;
-_ATOM allAtom;
-_ATOM allocatorAtom;
-_ATOM alreadyVisitedAtom;
-_ATOM _alreadyAssignedNestedTag_Atom;
-_ATOM _alreadyVisitedMarker_Atom;
-_ATOM alwaysAtom;
-_ATOM _array_Atom;
-_ATOM asciiAtom;
-_ATOM assertAtom;
-_ATOM assertConstAtom;
-_ATOM atAtom;
-_ATOM atmostAtom;
-_ATOM _attrAligned_Atom;
-_ATOM _attrDiskSerializedForm_Atom;
-_ATOM _attrInternalSerializedForm_Atom;
-_ATOM _attrLocationIndependent_Atom;
-_ATOM _attrRecordCount_Atom;
-_ATOM _attrSize_Atom;
-_ATOM _attrUnadorned_Atom;
-_ATOM aveAtom;
-_ATOM backupAtom;
-_ATOM bcdAtom;
-_ATOM beforeAtom;
-_ATOM bestAtom;
-_ATOM bindBooleanParamAtom;
-_ATOM bindDataParamAtom;
-_ATOM bindRealParamAtom;
-_ATOM bindSetParamAtom;
-_ATOM bindSignedParamAtom;
-_ATOM bindStringParamAtom;
-_ATOM bindVStringParamAtom;
-_ATOM bindUnicodeParamAtom;
-_ATOM bindUnsignedParamAtom;
-_ATOM bindUtf8ParamAtom;
-_ATOM bitmapAtom;
-_ATOM blobAtom;
-_ATOM cAtom;
-_ATOM cardinalityAtom;
-_ATOM caseAtom;
-_ATOM checkinAtom;
-_ATOM checkoutAtom;
-_ATOM _childAttr_Atom;
-_ATOM choosenAtom;
-_ATOM clusterAtom;
-_ATOM _colocal_Atom;
-_ATOM commonAtom;
-_ATOM compileEmbeddedScriptAtom;
-_ATOM _complexKeyed_Atom;
-_ATOM compressedAtom;
-_ATOM __compressed__Atom;
-_ATOM _conditionFolded_Atom;
-_ATOM constAtom;
-_ATOM contextAtom;
-_ATOM contextSensitiveAtom;
-_ATOM costAtom;
-_ATOM countAtom;
-_ATOM _countProject_Atom;
-_ATOM cppAtom;
-_ATOM _cppBody_Atom;
-_ATOM csvAtom;
-_ATOM ctxmethodAtom;
-_ATOM dataAtom;
-_ATOM _dataset_Atom;
-_ATOM debugAtom;
-_ATOM dedupAtom;
-_ATOM defaultAtom;
-_ATOM _default_Atom;
-_ATOM defaultFieldNameAtom;
-_ATOM defineAtom;
-_ATOM definitionAtom;
-_ATOM deprecatedAtom;
-_ATOM descAtom;
-_ATOM diskAtom;
-_ATOM distributedAtom;
-_ATOM _distributed_Atom;
-_ATOM _dot_Atom;
-_ATOM dynamicAtom;
-_ATOM ebcdicAtom;
-_ATOM eclrtlAtom;
-_ATOM embeddedAtom;
-_ATOM _empty_str_Atom;
-_ATOM encodingAtom;
-_ATOM encryptAtom;
-_ATOM ensureAtom;
-_ATOM enthAtom;
-_ATOM entrypointAtom;
-_ATOM errorAtom;
-_ATOM exceptAtom;
-_ATOM exclusiveAtom;
-_ATOM expireAtom;
-_ATOM exportAtom;
-_ATOM extendAtom;
-_ATOM externalAtom;
-_ATOM failAtom;
-_ATOM failureAtom;
-_ATOM falseAtom;
-_ATOM fastAtom;
-_ATOM fewAtom;
-_ATOM fieldAtom;
-_ATOM fieldsAtom;
-_ATOM __fileposAtom;
-_ATOM filenameAtom;
-_ATOM filepositionAtom;
-_ATOM _files_Atom;
-_ATOM filterAtom;
-_ATOM filteredAtom;
-_ATOM _filtered_Atom;
-_ATOM firstAtom;
-_ATOM firstLeftAtom;
-_ATOM firstRightAtom;
-_ATOM fixedAtom;
-_ATOM flagAtom;
-_ATOM flagsAtom;
-_ATOM flatAtom;
-_ATOM _folded_Atom;
-_ATOM formatAtom;
-_ATOM forwardAtom;
-_ATOM fullonlyAtom;
-_ATOM fullouterAtom;
-_ATOM _function_Atom;
-_ATOM globalContextAtom;
-_ATOM gctxmethodAtom;
-_ATOM getAtom;
-_ATOM getEmbedContextAtom;
-_ATOM getBooleanResultAtom;
-_ATOM getDataResultAtom;
-_ATOM getRealResultAtom;
-_ATOM getSetResultAtom;
-_ATOM getSignedResultAtom;
-_ATOM getStringResultAtom;
-_ATOM getUnicodeResultAtom;
-_ATOM getUnsignedResultAtom;
-_ATOM getUTF8ResultAtom;
-_ATOM globalAtom;
-_ATOM graphAtom;
-_ATOM groupAtom;
-_ATOM groupedAtom;
-_ATOM hashAtom;
-_ATOM headingAtom;
-_ATOM _hidden_Atom;
-_ATOM hintAtom;
-_ATOM holeAtom;
-_ATOM holeposAtom;
-_ATOM __ifblockAtom;
-_ATOM ignoreAtom;
-_ATOM ignoreBaseAtom;
-_ATOM implementsAtom;
-_ATOM _implicitFpos_Atom;
-_ATOM _implicitSorted_Atom;
-_ATOM importAtom;
-_ATOM includeAtom;
-_ATOM indeterminateAtom;
-_ATOM indexAtom;
-_ATOM initfunctionAtom;
-_ATOM inlineAtom;
-_ATOM innerAtom;
-_ATOM interfaceAtom;
-_ATOM internalAtom;
-_ATOM _internal_Atom;
-_ATOM internalFlagsAtom;
-_ATOM _isFunctional_Atom;
-_ATOM _isBlobInIndex_Atom;
-_ATOM isNullAtom;
-_ATOM isValidAtom;
-_ATOM jobAtom;
-_ATOM jobTempAtom;
-_ATOM keepAtom;
-_ATOM keyedAtom;
-_ATOM labeledAtom;
-_ATOM languageAtom;
-_ATOM lastAtom;
-_ATOM leftAtom;
-_ATOM leftonlyAtom;
-_ATOM leftouterAtom;
-_ATOM libraryAtom;
-_ATOM lightweightAtom;
-_ATOM _lightweight_Atom;
-_ATOM limitAtom;
-_ATOM lineIdAtom;
-_ATOM linkAtom;
-_ATOM _linkCounted_Atom;
-_ATOM literalAtom;
-_ATOM loadAtom;
-_ATOM localAtom;
-_ATOM localUploadAtom;
-_ATOM localeAtom;
-_ATOM localFilePositionAtom;
-_ATOM _location_Atom;
-_ATOM logAtom;
-_ATOM logicalFilenameAtom;
-_ATOM lookupAtom;
-_ATOM lzwAtom;
-_ATOM macroAtom;
-_ATOM manyAtom;
-_ATOM markerAtom;
-_ATOM matchxxxPseudoFileAtom;
-_ATOM maxAtom;
-_ATOM maxCountAtom;
-_ATOM maxLengthAtom;
-_ATOM maxSizeAtom;
-_ATOM mergeAtom;
-_ATOM mergeTransformAtom;
-_ATOM _metadata_Atom;
-_ATOM methodAtom;
-_ATOM minAtom;
-_ATOM minimalAtom;
-_ATOM memoryAtom;
-_ATOM moduleAtom;
-_ATOM mofnAtom;
-_ATOM nameAtom;
-_ATOM namedAtom;
-_ATOM namespaceAtom;
-_ATOM newAtom;
-_ATOM newSetAtom;
-_ATOM noBoundCheckAtom;
-_ATOM noCaseAtom;
-_ATOM _noHoist_Atom;
-_ATOM noLocalAtom;
-_ATOM _nonEmpty_Atom;
-_ATOM noOverwriteAtom;
-_ATOM _normalized_Atom;
-_ATOM noRootAtom;
-_ATOM noScanAtom;
-_ATOM noSortAtom;
-_ATOM _noStreaming_Atom;
-_ATOM notAtom;
-_ATOM notMatchedAtom;
-_ATOM notMatchedOnlyAtom;
-_ATOM noTrimAtom;
-_ATOM noTypeAtom;
-_ATOM noXpathAtom;
-_ATOM oldSetFormatAtom;
-_ATOM omethodAtom;
-_ATOM _omitted_Atom;
-_ATOM onceAtom;
-_ATOM onFailAtom;
-_ATOM onWarningAtom;
-_ATOM optAtom;
-_ATOM _ordered_Atom;
-_ATOM _orderedPull_Atom;
-_ATOM _origin_Atom;
-_ATOM _original_Atom;
-_ATOM outAtom;
-_ATOM outoflineAtom;
-_ATOM outputAtom;
-_ATOM overwriteAtom;
-_ATOM ownedAtom;
-_ATOM packedAtom;
-_ATOM parallelAtom;
-_ATOM parameterAtom;
-_ATOM partitionAtom;
-_ATOM partitionLeftAtom;
-_ATOM partitionRightAtom;
-_ATOM _payload_Atom;
-_ATOM persistAtom;
-_ATOM physicalFilenameAtom;
-_ATOM physicalLengthAtom;
-_ATOM pluginAtom;
-_ATOM prefetchAtom;
-_ATOM preloadAtom;
-_ATOM priorityAtom;
-_ATOM privateAtom;
-_ATOM pseudoentrypointAtom;
-_ATOM pullAtom;
-_ATOM pulledAtom;
-_ATOM pureAtom;
-_ATOM quoteAtom;
-_ATOM randomAtom;
-_ATOM rangeAtom;
-_ATOM rawAtom;
-_ATOM recordAtom;
-_ATOM recursiveAtom;
-_ATOM referenceAtom;
-_ATOM refreshAtom;
-_ATOM _remote_Atom;
-_ATOM renameAtom;
-_ATOM repeatAtom;
-_ATOM _resourced_Atom;
-_ATOM responseAtom;
-_ATOM restartAtom;
-_ATOM resultAtom;
-_ATOM _results_Atom;
-_ATOM retryAtom;
-_ATOM rightAtom;
-_ATOM rightonlyAtom;
-_ATOM rightouterAtom;
-_ATOM rollbackAtom;
-_ATOM _root_Atom;
-_ATOM rowAtom;
-_ATOM _rowsid_Atom;
-_ATOM rowLimitAtom;
-_ATOM ruleAtom;
-_ATOM saveAtom;
-_ATOM scanAtom;
-_ATOM scanAllAtom;
-_ATOM scopeAtom;
-_ATOM scopeCheckingAtom;
-_ATOM sectionAtom;
-_ATOM _selectors_Atom;
-_ATOM _selectorSequence_Atom;
-_ATOM selfAtom;
-_ATOM separatorAtom;
-_ATOM escapeAtom;
-_ATOM sequenceAtom;
-_ATOM _sequence_Atom;
-_ATOM sequentialAtom;
-_ATOM serializationAtom;
-_ATOM setAtom;
-_ATOM sharedAtom;
-_ATOM shutdownAtom;
-_ATOM _sideEffect_Atom;
-_ATOM sizeAtom;
-_ATOM sizeofAtom;
-_ATOM skewAtom;
-_ATOM skipAtom;
-_ATOM singleAtom;
-_ATOM snapshotAtom;
-_ATOM soapActionAtom;
-_ATOM syntaxCheckAtom;
-_ATOM httpHeaderAtom;
-_ATOM prototypeAtom;
-_ATOM proxyAddressAtom;
-_ATOM sort_AllAtom;
-_ATOM sort_KeyedAtom;
-_ATOM sortedAtom;
-_ATOM sourceAtom;
-_ATOM stableAtom;
-_ATOM _state_Atom;
-_ATOM steppedAtom;
-_ATOM storeAtom;
-_ATOM storedAtom;
-_ATOM streamedAtom;
-_ATOM _streaming_Atom;
-_ATOM successAtom;
-_ATOM supportsImportAtom;
-_ATOM supportsScriptAtom;
-_ATOM sysAtom;
-_ATOM tempAtom;
-_ATOM templateAtom;
-_ATOM terminateAtom;
-_ATOM terminatorAtom;
-_ATOM thorAtom;
-_ATOM thresholdAtom;
-_ATOM timeoutAtom;
-_ATOM timeLimitAtom;
-_ATOM timestampAtom;
-_ATOM tinyAtom;
-_ATOM trimAtom;
-_ATOM trueAtom;
-_ATOM tomitaAtom;
-_ATOM topAtom;
-_ATOM typeAtom;
-_ATOM _uid_Atom;
-_ATOM unnamedAtom;
-_ATOM unknownAtom;
-_ATOM unknownSizeFieldAtom;
-_ATOM unicodeAtom;
-_ATOM unorderedAtom;
-_ATOM unsortedAtom;
-_ATOM unstableAtom;
-_ATOM updateAtom;
-_ATOM userMatchFunctionAtom;
-_ATOM valueAtom;
-_ATOM versionAtom;
-_ATOM virtualAtom;
-_ATOM _virtualSeq_Atom;
-_ATOM volatileAtom;
-_ATOM warningAtom;
-_ATOM wholeAtom;
-_ATOM widthAtom;
-_ATOM wipeAtom;
-_ATOM _workflow_Atom;
-_ATOM _workflowPersist_Atom;
-_ATOM workunitAtom;
-_ATOM wuidAtom;
-_ATOM xmlAtom;
-_ATOM xmlDefaultAtom;
-_ATOM xpathAtom;
+IIdAtom * atId;
+IIdAtom * defaultFieldNameId;
+IIdAtom * failId;
+IIdAtom * bindBooleanParamId;
+IIdAtom * bindDataParamId;
+IIdAtom * bindRealParamId;
+IIdAtom * bindSetParamId;
+IIdAtom * bindSignedParamId;
+IIdAtom * bindStringParamId;
+IIdAtom * bindVStringParamId;
+IIdAtom * bindUnicodeParamId;
+IIdAtom * bindUnsignedParamId;
+IIdAtom * bindUtf8ParamId;
+IIdAtom * compileEmbeddedScriptId;
+IIdAtom * getEmbedContextId;
+IIdAtom * getBooleanResultId;
+IIdAtom * getDataResultId;
+IIdAtom * getRealResultId;
+IIdAtom * getSetResultId;
+IIdAtom * getSignedResultId;
+IIdAtom * getStringResultId;
+IIdAtom * getUnicodeResultId;
+IIdAtom * getUnsignedResultId;
+IIdAtom * getUTF8ResultId;
+IIdAtom * importId;
+IIdAtom * lineId;
+IIdAtom * loadId;
+IIdAtom * macroId;
+IIdAtom * maxLengthId;
+IIdAtom * maxSizeId;
+IIdAtom * outputId;
+IIdAtom * physicalLengthId;
+IIdAtom * selfId;
+IIdAtom * sharedId;
+IIdAtom * storeId;
+IIdAtom * supportsImportId;
+IIdAtom * supportsScriptId;
+IIdAtom * syntaxCheckId;
+IIdAtom * unknownId;
+IIdAtom * unnamedId;
+IIdAtom * valueId;
 
+IAtom * abstractAtom;
+IAtom * accessAtom;
+IAtom * actionAtom;
+IAtom * activeAtom;
+IAtom * activeFailureAtom;
+IAtom * activeNlpAtom;
+IAtom * afterAtom;
+IAtom * aggregateAtom;
+IAtom * algorithmAtom;
+IAtom * allAtom;
+IAtom * allocatorAtom;
+IAtom * alreadyVisitedAtom;
+IAtom * _alreadyAssignedNestedTag_Atom;
+IAtom * _alreadyVisitedMarker_Atom;
+IAtom * alwaysAtom;
+IAtom * _array_Atom;
+IAtom * asciiAtom;
+IAtom * assertAtom;
+IAtom * assertConstAtom;
+IAtom * atmostAtom;
+IAtom * _attrAligned_Atom;
+IAtom * _attrDiskSerializedForm_Atom;
+IAtom * _attrInternalSerializedForm_Atom;
+IAtom * _attrLocationIndependent_Atom;
+IAtom * _attrRecordCount_Atom;
+IAtom * _attrSize_Atom;
+IAtom * _attrUnadorned_Atom;
+IAtom * aveAtom;
+IAtom * backupAtom;
+IAtom * bcdAtom;
+IAtom * beforeAtom;
+IAtom * bestAtom;
+IAtom * bitmapAtom;
+IAtom * blobAtom;
+IAtom * cAtom;
+IAtom * cardinalityAtom;
+IAtom * caseAtom;
+IAtom * checkinAtom;
+IAtom * checkoutAtom;
+IAtom * _childAttr_Atom;
+IAtom * choosenAtom;
+IAtom * clusterAtom;
+IAtom * _colocal_Atom;
+IAtom * commonAtom;
+IAtom * _complexKeyed_Atom;
+IAtom * compressedAtom;
+IAtom * __compressed__Atom;
+IAtom * _conditionFolded_Atom;
+IAtom * constAtom;
+IAtom * contextAtom;
+IAtom * contextSensitiveAtom;
+IAtom * costAtom;
+IAtom * countAtom;
+IAtom * _countProject_Atom;
+IAtom * cppAtom;
+IAtom * _cppBody_Atom;
+IAtom * csvAtom;
+IAtom * ctxmethodAtom;
+IAtom * dataAtom;
+IAtom * _dataset_Atom;
+IAtom * debugAtom;
+IAtom * dedupAtom;
+IAtom * defaultAtom;
+IAtom * _default_Atom;
+IAtom * defineAtom;
+IAtom * definitionAtom;
+IAtom * deprecatedAtom;
+IAtom * descAtom;
+IAtom * diskAtom;
+IAtom * distributedAtom;
+IAtom * _distributed_Atom;
+IAtom * _dot_Atom;
+IAtom * dynamicAtom;
+IAtom * ebcdicAtom;
+IAtom * eclrtlAtom;
+IAtom * embeddedAtom;
+IAtom * _empty_str_Atom;
+IAtom * encodingAtom;
+IAtom * encryptAtom;
+IAtom * ensureAtom;
+IAtom * enthAtom;
+IAtom * entrypointAtom;
+IAtom * errorAtom;
+IAtom * exceptAtom;
+IAtom * exclusiveAtom;
+IAtom * expireAtom;
+IAtom * exportAtom;
+IAtom * extendAtom;
+IAtom * externalAtom;
+IAtom * failAtom;
+IAtom * failureAtom;
+IAtom * falseAtom;
+IAtom * fastAtom;
+IAtom * fewAtom;
+IAtom * fieldAtom;
+IAtom * fieldsAtom;
+IAtom * __fileposAtom;
+IAtom * filenameAtom;
+IAtom * filepositionAtom;
+IAtom * _files_Atom;
+IAtom * filterAtom;
+IAtom * filteredAtom;
+IAtom * _filtered_Atom;
+IAtom * firstAtom;
+IAtom * firstLeftAtom;
+IAtom * firstRightAtom;
+IAtom * fixedAtom;
+IAtom * flagAtom;
+IAtom * flagsAtom;
+IAtom * flatAtom;
+IAtom * _folded_Atom;
+IAtom * formatAtom;
+IAtom * forwardAtom;
+IAtom * fullonlyAtom;
+IAtom * fullouterAtom;
+IAtom * _function_Atom;
+IAtom * globalContextAtom;
+IAtom * gctxmethodAtom;
+IAtom * getAtom;
+IAtom * globalAtom;
+IAtom * graphAtom;
+IAtom * groupAtom;
+IAtom * groupedAtom;
+IAtom * hashAtom;
+IAtom * headingAtom;
+IAtom * _hidden_Atom;
+IAtom * hintAtom;
+IAtom * holeAtom;
+IAtom * holeposAtom;
+IAtom * __ifblockAtom;
+IAtom * ignoreAtom;
+IAtom * ignoreBaseAtom;
+IAtom * implementsAtom;
+IAtom * _implicitFpos_Atom;
+IAtom * _implicitSorted_Atom;
+IAtom * importAtom;
+IAtom * includeAtom;
+IAtom * indeterminateAtom;
+IAtom * indexAtom;
+IAtom * initfunctionAtom;
+IAtom * inlineAtom;
+IAtom * innerAtom;
+IAtom * interfaceAtom;
+IAtom * internalAtom;
+IAtom * _internal_Atom;
+IAtom * internalFlagsAtom;
+IAtom * _isFunctional_Atom;
+IAtom * _isBlobInIndex_Atom;
+IAtom * isNullAtom;
+IAtom * isValidAtom;
+IAtom * jobAtom;
+IAtom * jobTempAtom;
+IAtom * keepAtom;
+IAtom * keyedAtom;
+IAtom * labeledAtom;
+IAtom * languageAtom;
+IAtom * lastAtom;
+IAtom * leftAtom;
+IAtom * leftonlyAtom;
+IAtom * leftouterAtom;
+IAtom * libraryAtom;
+IAtom * lightweightAtom;
+IAtom * _lightweight_Atom;
+IAtom * limitAtom;
+IAtom * linkAtom;
+IAtom * _linkCounted_Atom;
+IAtom * literalAtom;
+IAtom * localAtom;
+IAtom * localUploadAtom;
+IAtom * localeAtom;
+IAtom * localFilePositionAtom;
+IAtom * _location_Atom;
+IAtom * logAtom;
+IAtom * logicalFilenameAtom;
+IAtom * lookupAtom;
+IAtom * lzwAtom;
+IAtom * macroAtom;
+IAtom * manyAtom;
+IAtom * markerAtom;
+IAtom * matchxxxPseudoFileAtom;
+IAtom * maxAtom;
+IAtom * maxCountAtom;
+IAtom * maxLengthAtom;
+IAtom * maxSizeAtom;
+IAtom * mergeAtom;
+IAtom * mergeTransformAtom;
+IAtom * _metadata_Atom;
+IAtom * methodAtom;
+IAtom * minAtom;
+IAtom * minimalAtom;
+IAtom * memoryAtom;
+IAtom * moduleAtom;
+IAtom * mofnAtom;
+IAtom * nameAtom;
+IAtom * namedAtom;
+IAtom * namespaceAtom;
+IAtom * newAtom;
+IAtom * newSetAtom;
+IAtom * noBoundCheckAtom;
+IAtom * noCaseAtom;
+IAtom * _noHoist_Atom;
+IAtom * noLocalAtom;
+IAtom * _nonEmpty_Atom;
+IAtom * noOverwriteAtom;
+IAtom * _normalized_Atom;
+IAtom * noRootAtom;
+IAtom * noScanAtom;
+IAtom * noSortAtom;
+IAtom * _noStreaming_Atom;
+IAtom * notAtom;
+IAtom * notMatchedAtom;
+IAtom * notMatchedOnlyAtom;
+IAtom * noTrimAtom;
+IAtom * noTypeAtom;
+IAtom * noXpathAtom;
+IAtom * oldSetFormatAtom;
+IAtom * omethodAtom;
+IAtom * _omitted_Atom;
+IAtom * onceAtom;
+IAtom * onFailAtom;
+IAtom * onWarningAtom;
+IAtom * optAtom;
+IAtom * _ordered_Atom;
+IAtom * _orderedPull_Atom;
+IAtom * _origin_Atom;
+IAtom * _original_Atom;
+IAtom * outAtom;
+IAtom * outoflineAtom;
+IAtom * outputAtom;
+IAtom * overwriteAtom;
+IAtom * ownedAtom;
+IAtom * packedAtom;
+IAtom * parallelAtom;
+IAtom * parameterAtom;
+IAtom * partitionAtom;
+IAtom * partitionLeftAtom;
+IAtom * partitionRightAtom;
+IAtom * _payload_Atom;
+IAtom * persistAtom;
+IAtom * physicalFilenameAtom;
+IAtom * pluginAtom;
+IAtom * prefetchAtom;
+IAtom * preloadAtom;
+IAtom * priorityAtom;
+IAtom * privateAtom;
+IAtom * pseudoentrypointAtom;
+IAtom * pullAtom;
+IAtom * pulledAtom;
+IAtom * pureAtom;
+IAtom * quoteAtom;
+IAtom * randomAtom;
+IAtom * rangeAtom;
+IAtom * rawAtom;
+IAtom * recordAtom;
+IAtom * recursiveAtom;
+IAtom * referenceAtom;
+IAtom * refreshAtom;
+IAtom * _remote_Atom;
+IAtom * renameAtom;
+IAtom * repeatAtom;
+IAtom * _resourced_Atom;
+IAtom * responseAtom;
+IAtom * restartAtom;
+IAtom * resultAtom;
+IAtom * _results_Atom;
+IAtom * retryAtom;
+IAtom * rightAtom;
+IAtom * rightonlyAtom;
+IAtom * rightouterAtom;
+IAtom * rollbackAtom;
+IAtom * _root_Atom;
+IAtom * rowAtom;
+IAtom * _rowsid_Atom;
+IAtom * rowLimitAtom;
+IAtom * ruleAtom;
+IAtom * saveAtom;
+IAtom * scanAtom;
+IAtom * scanAllAtom;
+IAtom * scopeAtom;
+IAtom * scopeCheckingAtom;
+IAtom * sectionAtom;
+IAtom * _selectors_Atom;
+IAtom * _selectorSequence_Atom;
+IAtom * selfAtom;
+IAtom * separatorAtom;
+IAtom * escapeAtom;
+IAtom * sequenceAtom;
+IAtom * _sequence_Atom;
+IAtom * sequentialAtom;
+IAtom * serializationAtom;
+IAtom * setAtom;
+IAtom * sharedAtom;
+IAtom * shutdownAtom;
+IAtom * _sideEffect_Atom;
+IAtom * sizeAtom;
+IAtom * sizeofAtom;
+IAtom * skewAtom;
+IAtom * skipAtom;
+IAtom * singleAtom;
+IAtom * snapshotAtom;
+IAtom * soapActionAtom;
+IAtom * httpHeaderAtom;
+IAtom * prototypeAtom;
+IAtom * proxyAddressAtom;
+IAtom * sort_AllAtom;
+IAtom * sort_KeyedAtom;
+IAtom * sortedAtom;
+IAtom * sourceAtom;
+IAtom * stableAtom;
+IAtom * _state_Atom;
+IAtom * steppedAtom;
+IAtom * storedAtom;
+IAtom * streamedAtom;
+IAtom * _streaming_Atom;
+IAtom * successAtom;
+IAtom * sysAtom;
+IAtom * tempAtom;
+IAtom * templateAtom;
+IAtom * terminateAtom;
+IAtom * terminatorAtom;
+IAtom * thorAtom;
+IAtom * thresholdAtom;
+IAtom * timeoutAtom;
+IAtom * timeLimitAtom;
+IAtom * timestampAtom;
+IAtom * tinyAtom;
+IAtom * trimAtom;
+IAtom * trueAtom;
+IAtom * tomitaAtom;
+IAtom * topAtom;
+IAtom * typeAtom;
+IAtom * _uid_Atom;
+IAtom * unknownAtom;
+IAtom * unknownSizeFieldAtom;
+IAtom * unicodeAtom;
+IAtom * unorderedAtom;
+IAtom * unsortedAtom;
+IAtom * unstableAtom;
+IAtom * updateAtom;
+IAtom * userMatchFunctionAtom;
+IAtom * versionAtom;
+IAtom * virtualAtom;
+IAtom * _virtualSeq_Atom;
+IAtom * volatileAtom;
+IAtom * warningAtom;
+IAtom * wholeAtom;
+IAtom * widthAtom;
+IAtom * wipeAtom;
+IAtom * _workflow_Atom;
+IAtom * _workflowPersist_Atom;
+IAtom * workunitAtom;
+IAtom * wuidAtom;
+IAtom * xmlAtom;
+IAtom * xmlDefaultAtom;
+IAtom * xpathAtom;
+
+#define MAKEID(x)   x##Id = createIdAtom(#x)
 #define MAKEATOM(x) x##Atom = createLowerCaseAtom(#x)
-#define MAKEID(x)   x##IdAtom = createIdentifierAtom(#x)
 
 SysAtom::SysAtom(const void * k) : Atom(k) 
 { 
@@ -421,13 +431,55 @@ class SysAtomTable : public KeptHashTableOf<SysAtom, 0U>
 };
 SysAtomTable * sysAtomTable;
 
-_ATOM createSystemAtom(const char * s) { return sysAtomTable->create(s); }
+IAtom * createSystemAtom(const char * s) { return sysAtomTable->create(s); }
 
 #define MAKESYSATOM(x)  _##x##_Atom = createSystemAtom("$_" #x "_")
 #define MAKESYSATOMX(x)  static_cast<SysAtom *>(_##x##_Atom = createSystemAtom("$_" #x "_"))
 
 MODULE_INIT(INIT_PRIORITY_HQLATOM)
 {
+    MAKEID(at);
+    MAKEID(bindBooleanParam);
+    MAKEID(bindDataParam);
+    MAKEID(bindRealParam);
+    MAKEID(bindSetParam);
+    MAKEID(bindSignedParam);
+    MAKEID(bindStringParam);
+    MAKEID(bindVStringParam);
+    MAKEID(bindUnicodeParam);
+    MAKEID(bindUnsignedParam);
+    MAKEID(bindUtf8Param);
+    MAKEID(compileEmbeddedScript);
+    defaultFieldNameId = createIdAtom("__f1__");
+    MAKEID(fail);
+    MAKEID(getEmbedContext);
+    MAKEID(getBooleanResult);
+    MAKEID(getDataResult);
+    MAKEID(getRealResult);
+    MAKEID(getSetResult);
+    MAKEID(getSignedResult);
+    MAKEID(getStringResult);
+    MAKEID(getUnicodeResult);
+    MAKEID(getUnsignedResult);
+    MAKEID(getUTF8Result);
+    MAKEID(import);
+    MAKEID(line);
+    MAKEID(load);
+    MAKEID(macro);
+    MAKEID(maxLength);
+    MAKEID(maxSize);
+    MAKEID(output);
+    MAKEID(physicalLength);
+    MAKEID(self);
+    MAKEID(shared);
+    MAKEID(store);
+    MAKEID(supportsImport);
+    MAKEID(supportsScript);
+    MAKEID(syntaxCheck);
+    MAKEID(unknown);
+    unnamedId = createIdAtom("<unnamed>");
+    MAKEID(value);
+
     sysAtomTable = new SysAtomTable;
     MAKEATOM(abstract);
     MAKEATOM(access);
@@ -448,7 +500,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKEATOM(ascii);
     MAKEATOM(assert);
     MAKEATOM(assertConst);
-    MAKEATOM(at);
     MAKEATOM(atmost);
     MAKESYSATOMX(attrAligned)->setAttrId(EAaligned);
     MAKESYSATOMX(attrLocationIndependent)->setAttrId(EAlocationIndependent);
@@ -462,16 +513,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKEATOM(bcd);
     MAKEATOM(before);
     MAKEATOM(best);
-    MAKEATOM(bindBooleanParam);
-    MAKEATOM(bindDataParam);
-    MAKEATOM(bindRealParam);
-    MAKEATOM(bindSetParam);
-    MAKEATOM(bindSignedParam);
-    MAKEATOM(bindStringParam);
-    MAKEATOM(bindVStringParam);
-    MAKEATOM(bindUnicodeParam);
-    MAKEATOM(bindUnsignedParam);
-    MAKEATOM(bindUtf8Param);
     MAKEATOM(bitmap);
     MAKEATOM(blob);
     MAKEATOM(c);
@@ -484,7 +525,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKEATOM(cluster);
     MAKESYSATOM(colocal);
     MAKEATOM(common);
-    MAKEATOM(compileEmbeddedScript);
     MAKESYSATOM(complexKeyed);
     MAKEATOM(compressed);
     MAKEATOM(__compressed__);
@@ -505,7 +545,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKEATOM(dedup);
     MAKEATOM(default);
     MAKESYSATOM(default);
-    defaultFieldNameAtom = createIdentifierAtom("__f1__");
     MAKEATOM(define);
     MAKEATOM(definition);
     MAKEATOM(deprecated);
@@ -560,16 +599,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKESYSATOM(function);
     MAKEATOM(gctxmethod);
     MAKEATOM(get);
-    MAKEATOM(getEmbedContext);
-    MAKEATOM(getBooleanResult);
-    MAKEATOM(getDataResult);
-    MAKEATOM(getRealResult);
-    MAKEATOM(getSetResult);
-    MAKEATOM(getSignedResult);
-    MAKEATOM(getStringResult);
-    MAKEATOM(getUnicodeResult);
-    MAKEATOM(getUnsignedResult);
-    MAKEATOM(getUTF8Result);
     MAKEATOM(global);
     MAKEATOM(globalContext);
     MAKEATOM(graph);
@@ -617,11 +646,9 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKEATOM(lightweight);
     MAKESYSATOM(lightweight);
     MAKEATOM(limit);
-    MAKEID(line);
     MAKEATOM(link);
     MAKESYSATOM(linkCounted);
     MAKEATOM(literal);
-    MAKEATOM(load);
     MAKEATOM(local);
     MAKEATOM(localUpload);
     MAKEATOM(locale);
@@ -695,7 +722,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKESYSATOM(payload);
     MAKEATOM(persist);
     MAKEATOM(physicalFilename);
-    MAKEATOM(physicalLength);
     MAKEATOM(plugin);
     MAKEATOM(prefetch);
     MAKEATOM(preload);
@@ -758,7 +784,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKEATOM(skip);
     MAKEATOM(snapshot);
     MAKEATOM(soapAction);
-    MAKEATOM(syntaxCheck);
     sort_AllAtom = createLowerCaseAtom("SORT ALL");
     sort_KeyedAtom = createLowerCaseAtom("SORT KEYED");
     MAKEATOM(sorted);
@@ -766,13 +791,10 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKEATOM(stable);
     MAKESYSATOM(state);
     MAKEATOM(stepped);
-    MAKEATOM(store);
     MAKEATOM(stored);
     MAKEATOM(streamed);
     MAKESYSATOM(streaming);
     MAKEATOM(success);
-    MAKEATOM(supportsImport);
-    MAKEATOM(supportsScript);
     MAKEATOM(sys);
     MAKEATOM(temp);
     MAKEATOM(template);
@@ -791,7 +813,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKEATOM(true);
     MAKEATOM(type);
     MAKESYSATOM(uid);
-    unnamedAtom = createAtom("<unnamed>");
     MAKEATOM(unknown);
     MAKEATOM(unknownSizeField);
     MAKEATOM(unicode);
@@ -800,7 +821,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKEATOM(unstable);
     MAKEATOM(update);
     MAKEATOM(userMatchFunction);
-    MAKEATOM(value);
     MAKEATOM(version);
     MAKEATOM(virtual);
     MAKESYSATOM(virtualSeq);

+ 401 - 394
ecl/hql/hqlatoms.hpp

@@ -19,398 +19,407 @@
 
 #include "jhash.hpp"        // strangely also includes hqlatom.ipp
 
+extern HQL_API IIdAtom * atId;
+extern HQL_API IIdAtom * bindBooleanParamId;
+extern HQL_API IIdAtom * bindDataParamId;
+extern HQL_API IIdAtom * bindRealParamId;
+extern HQL_API IIdAtom * bindSetParamId;
+extern HQL_API IIdAtom * bindSignedParamId;
+extern HQL_API IIdAtom * bindStringParamId;
+extern HQL_API IIdAtom * bindVStringParamId;
+extern HQL_API IIdAtom * bindUnicodeParamId;
+extern HQL_API IIdAtom * bindUnsignedParamId;
+extern HQL_API IIdAtom * bindUtf8ParamId;
+extern HQL_API IIdAtom * compileEmbeddedScriptId;
+extern HQL_API IIdAtom * defaultFieldNameId;
+extern HQL_API IIdAtom * failId;
+extern HQL_API IIdAtom * getEmbedContextId;
+extern HQL_API IIdAtom * getBooleanResultId;
+extern HQL_API IIdAtom * getDataResultId;
+extern HQL_API IIdAtom * getRealResultId;
+extern HQL_API IIdAtom * getSetResultId;
+extern HQL_API IIdAtom * getSignedResultId;
+extern HQL_API IIdAtom * getStringResultId;
+extern HQL_API IIdAtom * getUnicodeResultId;
+extern HQL_API IIdAtom * getUnsignedResultId;
+extern HQL_API IIdAtom * getUTF8ResultId;
+extern HQL_API IIdAtom * importId;
+extern HQL_API IIdAtom * lineId;
+extern HQL_API IIdAtom * loadId;
+extern HQL_API IIdAtom * macroId;
+extern HQL_API IIdAtom * maxLengthId;
+extern HQL_API IIdAtom * maxSizeId;
+extern HQL_API IIdAtom * outputId;
+extern HQL_API IIdAtom * physicalLengthId;
+extern HQL_API IIdAtom * selfId;
+extern HQL_API IIdAtom * sharedId;
+extern HQL_API IIdAtom * storeId;
+extern HQL_API IIdAtom * supportsImportId;
+extern HQL_API IIdAtom * supportsScriptId;
+extern HQL_API IIdAtom * syntaxCheckId;
+extern HQL_API IIdAtom * unknownId;
+extern HQL_API IIdAtom * unnamedId;
+extern HQL_API IIdAtom * valueId;
 
-extern HQL_API _ATOM abstractAtom;
-extern HQL_API _ATOM accessAtom;
-extern HQL_API _ATOM actionAtom;
-extern HQL_API _ATOM activeAtom;
-extern HQL_API _ATOM activeFailureAtom;
-extern HQL_API _ATOM activeNlpAtom;
-extern HQL_API _ATOM afterAtom;
-extern HQL_API _ATOM aggregateAtom;
-extern HQL_API _ATOM allAtom;
-extern HQL_API _ATOM algorithmAtom;
-extern HQL_API _ATOM allocatorAtom;
-extern HQL_API _ATOM _alreadyAssignedNestedTag_Atom;
-extern HQL_API _ATOM alreadyVisitedAtom;
-extern HQL_API _ATOM _alreadyVisitedMarker_Atom;
-extern HQL_API _ATOM alwaysAtom;
-extern HQL_API _ATOM _array_Atom;
-extern HQL_API _ATOM asciiAtom;
-extern HQL_API _ATOM assertAtom;
-extern HQL_API _ATOM assertConstAtom;
-extern HQL_API _ATOM atAtom;
-extern HQL_API _ATOM atmostAtom;
-extern HQL_API _ATOM _attrAligned_Atom;
-extern HQL_API _ATOM _attrDiskSerializedForm_Atom;
-extern HQL_API _ATOM _attrInternalSerializedForm_Atom;
-extern HQL_API _ATOM _attrLocationIndependent_Atom;
-extern HQL_API _ATOM _attrRecordCount_Atom;
-extern HQL_API _ATOM _attrSize_Atom;
-extern HQL_API _ATOM _attrUnadorned_Atom;
-extern HQL_API _ATOM aveAtom;
-extern HQL_API _ATOM backupAtom;
-extern HQL_API _ATOM bcdAtom;
-extern HQL_API _ATOM beforeAtom;
-extern HQL_API _ATOM bestAtom;
-extern HQL_API _ATOM bindBooleanParamAtom;
-extern HQL_API _ATOM bindDataParamAtom;
-extern HQL_API _ATOM bindRealParamAtom;
-extern HQL_API _ATOM bindSetParamAtom;
-extern HQL_API _ATOM bindSignedParamAtom;
-extern HQL_API _ATOM bindStringParamAtom;
-extern HQL_API _ATOM bindVStringParamAtom;
-extern HQL_API _ATOM bindUnicodeParamAtom;
-extern HQL_API _ATOM bindUnsignedParamAtom;
-extern HQL_API _ATOM bindUtf8ParamAtom;
-extern HQL_API _ATOM bitmapAtom;
-extern HQL_API _ATOM blobAtom;
-extern HQL_API _ATOM cAtom;
-extern HQL_API _ATOM caseAtom;
-extern HQL_API _ATOM cardinalityAtom;
-extern HQL_API _ATOM checkinAtom;
-extern HQL_API _ATOM checkoutAtom;
-extern HQL_API _ATOM _childAttr_Atom;
-extern HQL_API _ATOM choosenAtom;
-extern HQL_API _ATOM clusterAtom;
-extern HQL_API _ATOM _colocal_Atom;
-extern HQL_API _ATOM commonAtom;
-extern HQL_API _ATOM compileEmbeddedScriptAtom;
-extern HQL_API _ATOM _complexKeyed_Atom;
-extern HQL_API _ATOM compressedAtom;
-extern HQL_API _ATOM __compressed__Atom;
-extern HQL_API _ATOM _conditionFolded_Atom;
-extern HQL_API _ATOM constAtom;
-extern HQL_API _ATOM contextAtom;
-extern HQL_API _ATOM contextSensitiveAtom;
-extern HQL_API _ATOM costAtom;
-extern HQL_API _ATOM countAtom;
-extern HQL_API _ATOM _countProject_Atom;
-extern HQL_API _ATOM cppAtom;
-extern HQL_API _ATOM _cppBody_Atom;
-extern HQL_API _ATOM csvAtom;
-extern HQL_API _ATOM ctxmethodAtom;
-extern HQL_API _ATOM dataAtom;
-extern HQL_API _ATOM _dataset_Atom;
-extern HQL_API _ATOM debugAtom;
-extern HQL_API _ATOM dedupAtom;
-extern HQL_API _ATOM defaultAtom;
-extern HQL_API _ATOM _default_Atom;
-extern HQL_API _ATOM defaultFieldNameAtom;
-extern HQL_API _ATOM defineAtom;
-extern HQL_API _ATOM definitionAtom;
-extern HQL_API _ATOM deprecatedAtom;
-extern HQL_API _ATOM descAtom;
-extern HQL_API _ATOM diskAtom;
-extern HQL_API _ATOM distributedAtom;
-extern HQL_API _ATOM _distributed_Atom;
-extern HQL_API _ATOM _dot_Atom;
-extern HQL_API _ATOM dynamicAtom;
-extern HQL_API _ATOM ebcdicAtom;
-extern HQL_API _ATOM eclrtlAtom;
-extern HQL_API _ATOM embeddedAtom;
-extern HQL_API _ATOM _empty_str_Atom;
-extern HQL_API _ATOM encodingAtom;
-extern HQL_API _ATOM encryptAtom;
-extern HQL_API _ATOM ensureAtom;
-extern HQL_API _ATOM enthAtom;
-extern HQL_API _ATOM entrypointAtom;
-extern HQL_API _ATOM errorAtom;
-extern HQL_API _ATOM exceptAtom;
-extern HQL_API _ATOM exclusiveAtom;
-extern HQL_API _ATOM expireAtom;
-extern HQL_API _ATOM exportAtom;
-extern HQL_API _ATOM extendAtom;
-extern HQL_API _ATOM externalAtom;
-extern HQL_API _ATOM failAtom;
-extern HQL_API _ATOM failureAtom;
-extern HQL_API _ATOM falseAtom;
-extern HQL_API _ATOM fastAtom;
-extern HQL_API _ATOM fewAtom;
-extern HQL_API _ATOM fieldAtom;
-extern HQL_API _ATOM fieldsAtom;
-extern HQL_API _ATOM filenameAtom;
-extern HQL_API _ATOM __fileposAtom;
-extern HQL_API _ATOM filepositionAtom;
-extern HQL_API _ATOM _files_Atom;
-extern HQL_API _ATOM filterAtom;
-extern HQL_API _ATOM filteredAtom;
-extern HQL_API _ATOM _filtered_Atom;
-extern HQL_API _ATOM firstAtom;
-extern HQL_API _ATOM firstLeftAtom;
-extern HQL_API _ATOM firstRightAtom;
-extern HQL_API _ATOM fixedAtom;
-extern HQL_API _ATOM flagAtom;
-extern HQL_API _ATOM flagsAtom;
-extern HQL_API _ATOM flatAtom;
-extern HQL_API _ATOM _folded_Atom;
-extern HQL_API _ATOM formatAtom;
-extern HQL_API _ATOM forwardAtom;
-extern HQL_API _ATOM fullonlyAtom;
-extern HQL_API _ATOM fullouterAtom;
-extern HQL_API _ATOM _function_Atom;
-extern HQL_API _ATOM gctxmethodAtom;
-extern HQL_API _ATOM getAtom;
-extern HQL_API _ATOM getEmbedContextAtom;
-extern HQL_API _ATOM getBooleanResultAtom;
-extern HQL_API _ATOM getDataResultAtom;
-extern HQL_API _ATOM getRealResultAtom;
-extern HQL_API _ATOM getSetResultAtom;
-extern HQL_API _ATOM getSignedResultAtom;
-extern HQL_API _ATOM getStringResultAtom;
-extern HQL_API _ATOM getUnicodeResultAtom;
-extern HQL_API _ATOM getUnsignedResultAtom;
-extern HQL_API _ATOM getUTF8ResultAtom;
-extern HQL_API _ATOM globalAtom;
-extern HQL_API _ATOM globalContextAtom;
-extern HQL_API _ATOM graphAtom;
-extern HQL_API _ATOM _graphLocal_Atom;
-extern HQL_API _ATOM groupAtom;
-extern HQL_API _ATOM groupedAtom;
-extern HQL_API _ATOM hashAtom;
-extern HQL_API _ATOM headingAtom;
-extern HQL_API _ATOM _hidden_Atom;
-extern HQL_API _ATOM hintAtom;
-extern HQL_API _ATOM holeAtom;
-extern HQL_API _ATOM holeposAtom;
-extern HQL_API _ATOM __ifblockAtom;
-extern HQL_API _ATOM ignoreAtom;
-extern HQL_API _ATOM ignoreBaseAtom;
-extern HQL_API _ATOM implementsAtom;
-extern HQL_API _ATOM _implicitFpos_Atom;
-extern HQL_API _ATOM _implicitSorted_Atom;
-extern HQL_API _ATOM importAtom;
-extern HQL_API _ATOM includeAtom;
-extern HQL_API _ATOM indeterminateAtom;
-extern HQL_API _ATOM indexAtom;
-extern HQL_API _ATOM initfunctionAtom;
-extern HQL_API _ATOM inlineAtom;
-extern HQL_API _ATOM innerAtom;
-extern HQL_API _ATOM interfaceAtom;
-extern HQL_API _ATOM internalAtom;
-extern HQL_API _ATOM _internal_Atom;
-extern HQL_API _ATOM internalFlagsAtom;
-extern HQL_API _ATOM _isBlobInIndex_Atom;
-extern HQL_API _ATOM _isFunctional_Atom;
-extern HQL_API _ATOM isNullAtom;
-extern HQL_API _ATOM isValidAtom;
-extern HQL_API _ATOM jobAtom;
-extern HQL_API _ATOM jobTempAtom;
-extern HQL_API _ATOM keepAtom;
-extern HQL_API _ATOM keyedAtom;
-extern HQL_API _ATOM labeledAtom;
-extern HQL_API _ATOM languageAtom;
-extern HQL_API _ATOM lastAtom;
-extern HQL_API _ATOM leftAtom;
-extern HQL_API _ATOM leftonlyAtom;
-extern HQL_API _ATOM leftouterAtom;
-extern HQL_API _ATOM libraryAtom;
-extern HQL_API _ATOM lightweightAtom;
-extern HQL_API _ATOM _lightweight_Atom;
-extern HQL_API _ATOM limitAtom;
-extern HQL_API _ATOM lineIdAtom;
-extern HQL_API _ATOM linkAtom;
-extern HQL_API _ATOM _linkCounted_Atom;
-extern HQL_API _ATOM literalAtom;
-extern HQL_API _ATOM loadAtom;
-extern HQL_API _ATOM localAtom;
-extern HQL_API _ATOM localUploadAtom;
-extern HQL_API _ATOM localeAtom;
-extern HQL_API _ATOM localFilePositionAtom;
-extern HQL_API _ATOM _location_Atom;
-extern HQL_API _ATOM logAtom;
-extern HQL_API _ATOM logicalFilenameAtom;
-extern HQL_API _ATOM lookupAtom;
-extern HQL_API _ATOM lzwAtom;
-extern HQL_API _ATOM macroAtom;
-extern HQL_API _ATOM manyAtom;
-extern HQL_API _ATOM markerAtom;
-extern HQL_API _ATOM matchxxxPseudoFileAtom;
-extern HQL_API _ATOM maxAtom;
-extern HQL_API _ATOM maxCountAtom;
-extern HQL_API _ATOM maxLengthAtom;
-extern HQL_API _ATOM maxSizeAtom;
-extern HQL_API _ATOM memoryAtom;
-extern HQL_API _ATOM mergeAtom;
-extern HQL_API _ATOM mergeTransformAtom;
-extern HQL_API _ATOM _metadata_Atom;
-extern HQL_API _ATOM methodAtom;
-extern HQL_API _ATOM minAtom;
-extern HQL_API _ATOM minimalAtom;
-extern HQL_API _ATOM moduleAtom;
-extern HQL_API _ATOM mofnAtom;
-extern HQL_API _ATOM nameAtom;
-extern HQL_API _ATOM namedAtom;
-extern HQL_API _ATOM namespaceAtom;
-extern HQL_API _ATOM newAtom;
-extern HQL_API _ATOM newSetAtom;
-extern HQL_API _ATOM noBoundCheckAtom;
-extern HQL_API _ATOM noCaseAtom;
-extern HQL_API _ATOM _noHoist_Atom;
-extern HQL_API _ATOM noLocalAtom;
-extern HQL_API _ATOM _nonEmpty_Atom;
-extern HQL_API _ATOM noOverwriteAtom;
-extern HQL_API _ATOM _normalized_Atom;
-extern HQL_API _ATOM noRootAtom;
-extern HQL_API _ATOM noScanAtom;
-extern HQL_API _ATOM noSortAtom;
-extern HQL_API _ATOM notAtom;
-extern HQL_API _ATOM notMatchedAtom;
-extern HQL_API _ATOM notMatchedOnlyAtom;
-extern HQL_API _ATOM _noStreaming_Atom;
-extern HQL_API _ATOM noTrimAtom;
-extern HQL_API _ATOM noTypeAtom;
-extern HQL_API _ATOM noXpathAtom;
-extern HQL_API _ATOM oldSetFormatAtom;
-extern HQL_API _ATOM omethodAtom;
-extern HQL_API _ATOM _omitted_Atom;
-extern HQL_API _ATOM onceAtom;
-extern HQL_API _ATOM onFailAtom;
-extern HQL_API _ATOM onWarningAtom;
-extern HQL_API _ATOM optAtom;
-extern HQL_API _ATOM _ordered_Atom;
-extern HQL_API _ATOM _orderedPull_Atom;
-extern HQL_API _ATOM _origin_Atom;
-extern HQL_API _ATOM _original_Atom;
-extern HQL_API _ATOM outAtom;
-extern HQL_API _ATOM outoflineAtom;
-extern HQL_API _ATOM outputAtom;
-extern HQL_API _ATOM overwriteAtom;
-extern HQL_API _ATOM ownedAtom;
-extern HQL_API _ATOM packedAtom;
-extern HQL_API _ATOM parallelAtom;
-extern HQL_API _ATOM parameterAtom;
-extern HQL_API _ATOM partitionAtom;
-extern HQL_API _ATOM partitionLeftAtom;
-extern HQL_API _ATOM partitionRightAtom;
-extern HQL_API _ATOM payloadAtom;
-extern HQL_API _ATOM _payload_Atom;
-extern HQL_API _ATOM persistAtom;
-extern HQL_API _ATOM physicalFilenameAtom;
-extern HQL_API _ATOM physicalLengthAtom;
-extern HQL_API _ATOM pluginAtom;
-extern HQL_API _ATOM prefetchAtom;
-extern HQL_API _ATOM preloadAtom;
-extern HQL_API _ATOM priorityAtom;
-extern HQL_API _ATOM privateAtom;
-extern HQL_API _ATOM pseudoentrypointAtom;
-extern HQL_API _ATOM pullAtom;
-extern HQL_API _ATOM pulledAtom;
-extern HQL_API _ATOM pureAtom;
-extern HQL_API _ATOM quoteAtom;
-extern HQL_API _ATOM randomAtom;
-extern HQL_API _ATOM rangeAtom;
-extern HQL_API _ATOM rawAtom;
-extern HQL_API _ATOM recordAtom;
-extern HQL_API _ATOM recursiveAtom;
-extern HQL_API _ATOM referenceAtom;
-extern HQL_API _ATOM refreshAtom;
-extern HQL_API _ATOM _remote_Atom;
-extern HQL_API _ATOM renameAtom;
-extern HQL_API _ATOM repeatAtom;
-extern HQL_API _ATOM _resourced_Atom;
-extern HQL_API _ATOM responseAtom;
-extern HQL_API _ATOM restartAtom;
-extern HQL_API _ATOM resultAtom;
-extern HQL_API _ATOM _results_Atom;
-extern HQL_API _ATOM retryAtom;
-extern HQL_API _ATOM rightAtom;
-extern HQL_API _ATOM rightonlyAtom;
-extern HQL_API _ATOM rightouterAtom;
-extern HQL_API _ATOM rollbackAtom;
-extern HQL_API _ATOM _root_Atom;
-extern HQL_API _ATOM rowAtom;
-extern HQL_API _ATOM _rowsid_Atom;
-extern HQL_API _ATOM rowLimitAtom;
-extern HQL_API _ATOM ruleAtom;
-extern HQL_API _ATOM saveAtom;
-extern HQL_API _ATOM scanAtom;
-extern HQL_API _ATOM scanAllAtom;
-extern HQL_API _ATOM scopeAtom;
-extern HQL_API _ATOM scopeCheckingAtom;
-extern HQL_API _ATOM sectionAtom;
-extern HQL_API _ATOM _selectorSequence_Atom;
-extern HQL_API _ATOM selfAtom;
-extern HQL_API _ATOM _selectors_Atom;
-extern HQL_API _ATOM separatorAtom;
-extern HQL_API _ATOM sequenceAtom;
-extern HQL_API _ATOM _sequence_Atom;
-extern HQL_API _ATOM sequentialAtom;
-extern HQL_API _ATOM serializationAtom;
-extern HQL_API _ATOM setAtom;
-extern HQL_API _ATOM sharedAtom;
-extern HQL_API _ATOM shutdownAtom;
-extern HQL_API _ATOM _sideEffect_Atom;
-extern HQL_API _ATOM singleAtom;
-extern HQL_API _ATOM sizeAtom;
-extern HQL_API _ATOM sizeofAtom;
-extern HQL_API _ATOM skewAtom;
-extern HQL_API _ATOM skipAtom;
-extern HQL_API _ATOM snapshotAtom;
-extern HQL_API _ATOM soapActionAtom;
-extern HQL_API _ATOM syntaxCheckAtom;
-extern HQL_API _ATOM httpHeaderAtom;
-extern HQL_API _ATOM prototypeAtom;
-extern HQL_API _ATOM proxyAddressAtom;
-extern HQL_API _ATOM sort_AllAtom;
-extern HQL_API _ATOM sort_KeyedAtom;
-extern HQL_API _ATOM sortedAtom;
-extern HQL_API _ATOM sourceAtom;
-extern HQL_API _ATOM stableAtom;
-extern HQL_API _ATOM _state_Atom;
-extern HQL_API _ATOM steppedAtom;
-extern HQL_API _ATOM storeAtom;
-extern HQL_API _ATOM storedAtom;
-extern HQL_API _ATOM streamedAtom;
-extern HQL_API _ATOM _streaming_Atom;
-extern HQL_API _ATOM successAtom;
-extern HQL_API _ATOM supportsImportAtom;
-extern HQL_API _ATOM supportsScriptAtom;
-extern HQL_API _ATOM sysAtom;
-extern HQL_API _ATOM tempAtom;
-extern HQL_API _ATOM templateAtom;
-extern HQL_API _ATOM terminateAtom;
-extern HQL_API _ATOM terminatorAtom;
-extern HQL_API _ATOM escapeAtom;
-extern HQL_API _ATOM thorAtom;
-extern HQL_API _ATOM thresholdAtom;
-extern HQL_API _ATOM timeoutAtom;
-extern HQL_API _ATOM timeLimitAtom;
-extern HQL_API _ATOM timestampAtom;
-extern HQL_API _ATOM tinyAtom;
-extern HQL_API _ATOM tomitaAtom;
-extern HQL_API _ATOM topAtom;
-extern HQL_API _ATOM trimAtom;
-extern HQL_API _ATOM trueAtom;
-extern HQL_API _ATOM typeAtom;
-extern HQL_API _ATOM _uid_Atom;
-extern HQL_API _ATOM unnamedAtom;
-extern HQL_API _ATOM unknownAtom;
-extern HQL_API _ATOM unknownSizeFieldAtom;
-extern HQL_API _ATOM unicodeAtom;
-extern HQL_API _ATOM unorderedAtom;
-extern HQL_API _ATOM unsortedAtom;
-extern HQL_API _ATOM unstableAtom;
-extern HQL_API _ATOM updateAtom;
-extern HQL_API _ATOM userMatchFunctionAtom;
-extern HQL_API _ATOM valueAtom;
-extern HQL_API _ATOM versionAtom;
-extern HQL_API _ATOM virtualAtom;
-extern HQL_API _ATOM _virtualSeq_Atom;
-extern HQL_API _ATOM volatileAtom;
-extern HQL_API _ATOM warningAtom;
-extern HQL_API _ATOM wholeAtom;
-extern HQL_API _ATOM widthAtom;
-extern HQL_API _ATOM wipeAtom;
-extern HQL_API _ATOM _workflow_Atom;
-extern HQL_API _ATOM _workflowPersist_Atom;
-extern HQL_API _ATOM workunitAtom;
-extern HQL_API _ATOM wuidAtom;
-extern HQL_API _ATOM xmlAtom;
-extern HQL_API _ATOM xmlDefaultAtom;
-extern HQL_API _ATOM xpathAtom;
+extern HQL_API IAtom * abstractAtom;
+extern HQL_API IAtom * accessAtom;
+extern HQL_API IAtom * actionAtom;
+extern HQL_API IAtom * activeAtom;
+extern HQL_API IAtom * activeFailureAtom;
+extern HQL_API IAtom * activeNlpAtom;
+extern HQL_API IAtom * afterAtom;
+extern HQL_API IAtom * aggregateAtom;
+extern HQL_API IAtom * allAtom;
+extern HQL_API IAtom * algorithmAtom;
+extern HQL_API IAtom * allocatorAtom;
+extern HQL_API IAtom * _alreadyAssignedNestedTag_Atom;
+extern HQL_API IAtom * alreadyVisitedAtom;
+extern HQL_API IAtom * _alreadyVisitedMarker_Atom;
+extern HQL_API IAtom * alwaysAtom;
+extern HQL_API IAtom * _array_Atom;
+extern HQL_API IAtom * asciiAtom;
+extern HQL_API IAtom * assertAtom;
+extern HQL_API IAtom * assertConstAtom;
+extern HQL_API IAtom * atmostAtom;
+extern HQL_API IAtom * _attrAligned_Atom;
+extern HQL_API IAtom * _attrDiskSerializedForm_Atom;
+extern HQL_API IAtom * _attrInternalSerializedForm_Atom;
+extern HQL_API IAtom * _attrLocationIndependent_Atom;
+extern HQL_API IAtom * _attrRecordCount_Atom;
+extern HQL_API IAtom * _attrSize_Atom;
+extern HQL_API IAtom * _attrUnadorned_Atom;
+extern HQL_API IAtom * aveAtom;
+extern HQL_API IAtom * backupAtom;
+extern HQL_API IAtom * bcdAtom;
+extern HQL_API IAtom * beforeAtom;
+extern HQL_API IAtom * bestAtom;
+extern HQL_API IAtom * bitmapAtom;
+extern HQL_API IAtom * blobAtom;
+extern HQL_API IAtom * cAtom;
+extern HQL_API IAtom * caseAtom;
+extern HQL_API IAtom * cardinalityAtom;
+extern HQL_API IAtom * checkinAtom;
+extern HQL_API IAtom * checkoutAtom;
+extern HQL_API IAtom * _childAttr_Atom;
+extern HQL_API IAtom * choosenAtom;
+extern HQL_API IAtom * clusterAtom;
+extern HQL_API IAtom * _colocal_Atom;
+extern HQL_API IAtom * commonAtom;
+extern HQL_API IAtom * _complexKeyed_Atom;
+extern HQL_API IAtom * compressedAtom;
+extern HQL_API IAtom * __compressed__Atom;
+extern HQL_API IAtom * _conditionFolded_Atom;
+extern HQL_API IAtom * constAtom;
+extern HQL_API IAtom * contextAtom;
+extern HQL_API IAtom * contextSensitiveAtom;
+extern HQL_API IAtom * costAtom;
+extern HQL_API IAtom * countAtom;
+extern HQL_API IAtom * _countProject_Atom;
+extern HQL_API IAtom * cppAtom;
+extern HQL_API IAtom * _cppBody_Atom;
+extern HQL_API IAtom * csvAtom;
+extern HQL_API IAtom * ctxmethodAtom;
+extern HQL_API IAtom * dataAtom;
+extern HQL_API IAtom * _dataset_Atom;
+extern HQL_API IAtom * debugAtom;
+extern HQL_API IAtom * dedupAtom;
+extern HQL_API IAtom * defaultAtom;
+extern HQL_API IAtom * _default_Atom;
+extern HQL_API IAtom * defineAtom;
+extern HQL_API IAtom * definitionAtom;
+extern HQL_API IAtom * deprecatedAtom;
+extern HQL_API IAtom * descAtom;
+extern HQL_API IAtom * diskAtom;
+extern HQL_API IAtom * distributedAtom;
+extern HQL_API IAtom * _distributed_Atom;
+extern HQL_API IAtom * _dot_Atom;
+extern HQL_API IAtom * dynamicAtom;
+extern HQL_API IAtom * ebcdicAtom;
+extern HQL_API IAtom * eclrtlAtom;
+extern HQL_API IAtom * embeddedAtom;
+extern HQL_API IAtom * _empty_str_Atom;
+extern HQL_API IAtom * encodingAtom;
+extern HQL_API IAtom * encryptAtom;
+extern HQL_API IAtom * ensureAtom;
+extern HQL_API IAtom * enthAtom;
+extern HQL_API IAtom * entrypointAtom;
+extern HQL_API IAtom * errorAtom;
+extern HQL_API IAtom * exceptAtom;
+extern HQL_API IAtom * exclusiveAtom;
+extern HQL_API IAtom * expireAtom;
+extern HQL_API IAtom * exportAtom;
+extern HQL_API IAtom * extendAtom;
+extern HQL_API IAtom * externalAtom;
+extern HQL_API IAtom * failAtom;
+extern HQL_API IAtom * failureAtom;
+extern HQL_API IAtom * falseAtom;
+extern HQL_API IAtom * fastAtom;
+extern HQL_API IAtom * fewAtom;
+extern HQL_API IAtom * fieldAtom;
+extern HQL_API IAtom * fieldsAtom;
+extern HQL_API IAtom * filenameAtom;
+extern HQL_API IAtom * __fileposAtom;
+extern HQL_API IAtom * filepositionAtom;
+extern HQL_API IAtom * _files_Atom;
+extern HQL_API IAtom * filterAtom;
+extern HQL_API IAtom * filteredAtom;
+extern HQL_API IAtom * _filtered_Atom;
+extern HQL_API IAtom * firstAtom;
+extern HQL_API IAtom * firstLeftAtom;
+extern HQL_API IAtom * firstRightAtom;
+extern HQL_API IAtom * fixedAtom;
+extern HQL_API IAtom * flagAtom;
+extern HQL_API IAtom * flagsAtom;
+extern HQL_API IAtom * flatAtom;
+extern HQL_API IAtom * _folded_Atom;
+extern HQL_API IAtom * formatAtom;
+extern HQL_API IAtom * forwardAtom;
+extern HQL_API IAtom * fullonlyAtom;
+extern HQL_API IAtom * fullouterAtom;
+extern HQL_API IAtom * _function_Atom;
+extern HQL_API IAtom * gctxmethodAtom;
+extern HQL_API IAtom * getAtom;
+extern HQL_API IAtom * globalAtom;
+extern HQL_API IAtom * globalContextAtom;
+extern HQL_API IAtom * graphAtom;
+extern HQL_API IAtom * _graphLocal_Atom;
+extern HQL_API IAtom * groupAtom;
+extern HQL_API IAtom * groupedAtom;
+extern HQL_API IAtom * hashAtom;
+extern HQL_API IAtom * headingAtom;
+extern HQL_API IAtom * _hidden_Atom;
+extern HQL_API IAtom * hintAtom;
+extern HQL_API IAtom * holeAtom;
+extern HQL_API IAtom * holeposAtom;
+extern HQL_API IAtom * __ifblockAtom;
+extern HQL_API IAtom * ignoreAtom;
+extern HQL_API IAtom * ignoreBaseAtom;
+extern HQL_API IAtom * implementsAtom;
+extern HQL_API IAtom * _implicitFpos_Atom;
+extern HQL_API IAtom * _implicitSorted_Atom;
+extern HQL_API IAtom * importAtom;
+extern HQL_API IAtom * includeAtom;
+extern HQL_API IAtom * indeterminateAtom;
+extern HQL_API IAtom * indexAtom;
+extern HQL_API IAtom * initfunctionAtom;
+extern HQL_API IAtom * inlineAtom;
+extern HQL_API IAtom * innerAtom;
+extern HQL_API IAtom * interfaceAtom;
+extern HQL_API IAtom * internalAtom;
+extern HQL_API IAtom * _internal_Atom;
+extern HQL_API IAtom * internalFlagsAtom;
+extern HQL_API IAtom * _isBlobInIndex_Atom;
+extern HQL_API IAtom * _isFunctional_Atom;
+extern HQL_API IAtom * isNullAtom;
+extern HQL_API IAtom * isValidAtom;
+extern HQL_API IAtom * jobAtom;
+extern HQL_API IAtom * jobTempAtom;
+extern HQL_API IAtom * keepAtom;
+extern HQL_API IAtom * keyedAtom;
+extern HQL_API IAtom * labeledAtom;
+extern HQL_API IAtom * languageAtom;
+extern HQL_API IAtom * lastAtom;
+extern HQL_API IAtom * leftAtom;
+extern HQL_API IAtom * leftonlyAtom;
+extern HQL_API IAtom * leftouterAtom;
+extern HQL_API IAtom * libraryAtom;
+extern HQL_API IAtom * lightweightAtom;
+extern HQL_API IAtom * _lightweight_Atom;
+extern HQL_API IAtom * limitAtom;
+extern HQL_API IAtom * linkAtom;
+extern HQL_API IAtom * _linkCounted_Atom;
+extern HQL_API IAtom * literalAtom;
+extern HQL_API IAtom * localAtom;
+extern HQL_API IAtom * localUploadAtom;
+extern HQL_API IAtom * localeAtom;
+extern HQL_API IAtom * localFilePositionAtom;
+extern HQL_API IAtom * _location_Atom;
+extern HQL_API IAtom * logAtom;
+extern HQL_API IAtom * logicalFilenameAtom;
+extern HQL_API IAtom * lookupAtom;
+extern HQL_API IAtom * lzwAtom;
+extern HQL_API IAtom * macroAtom;
+extern HQL_API IAtom * manyAtom;
+extern HQL_API IAtom * markerAtom;
+extern HQL_API IAtom * matchxxxPseudoFileAtom;
+extern HQL_API IAtom * maxAtom;
+extern HQL_API IAtom * maxCountAtom;
+extern HQL_API IAtom * maxLengthAtom;
+extern HQL_API IAtom * maxSizeAtom;
+extern HQL_API IAtom * memoryAtom;
+extern HQL_API IAtom * mergeAtom;
+extern HQL_API IAtom * mergeTransformAtom;
+extern HQL_API IAtom * _metadata_Atom;
+extern HQL_API IAtom * methodAtom;
+extern HQL_API IAtom * minAtom;
+extern HQL_API IAtom * minimalAtom;
+extern HQL_API IAtom * moduleAtom;
+extern HQL_API IAtom * mofnAtom;
+extern HQL_API IAtom * nameAtom;
+extern HQL_API IAtom * namedAtom;
+extern HQL_API IAtom * namespaceAtom;
+extern HQL_API IAtom * newAtom;
+extern HQL_API IAtom * newSetAtom;
+extern HQL_API IAtom * noBoundCheckAtom;
+extern HQL_API IAtom * noCaseAtom;
+extern HQL_API IAtom * _noHoist_Atom;
+extern HQL_API IAtom * noLocalAtom;
+extern HQL_API IAtom * _nonEmpty_Atom;
+extern HQL_API IAtom * noOverwriteAtom;
+extern HQL_API IAtom * _normalized_Atom;
+extern HQL_API IAtom * noRootAtom;
+extern HQL_API IAtom * noScanAtom;
+extern HQL_API IAtom * noSortAtom;
+extern HQL_API IAtom * notAtom;
+extern HQL_API IAtom * notMatchedAtom;
+extern HQL_API IAtom * notMatchedOnlyAtom;
+extern HQL_API IAtom * _noStreaming_Atom;
+extern HQL_API IAtom * noTrimAtom;
+extern HQL_API IAtom * noTypeAtom;
+extern HQL_API IAtom * noXpathAtom;
+extern HQL_API IAtom * oldSetFormatAtom;
+extern HQL_API IAtom * omethodAtom;
+extern HQL_API IAtom * _omitted_Atom;
+extern HQL_API IAtom * onceAtom;
+extern HQL_API IAtom * onFailAtom;
+extern HQL_API IAtom * onWarningAtom;
+extern HQL_API IAtom * optAtom;
+extern HQL_API IAtom * _ordered_Atom;
+extern HQL_API IAtom * _orderedPull_Atom;
+extern HQL_API IAtom * _origin_Atom;
+extern HQL_API IAtom * _original_Atom;
+extern HQL_API IAtom * outAtom;
+extern HQL_API IAtom * outoflineAtom;
+extern HQL_API IAtom * outputAtom;
+extern HQL_API IAtom * overwriteAtom;
+extern HQL_API IAtom * ownedAtom;
+extern HQL_API IAtom * packedAtom;
+extern HQL_API IAtom * parallelAtom;
+extern HQL_API IAtom * parameterAtom;
+extern HQL_API IAtom * partitionAtom;
+extern HQL_API IAtom * partitionLeftAtom;
+extern HQL_API IAtom * partitionRightAtom;
+extern HQL_API IAtom * payloadAtom;
+extern HQL_API IAtom * _payload_Atom;
+extern HQL_API IAtom * persistAtom;
+extern HQL_API IAtom * physicalFilenameAtom;
+extern HQL_API IAtom * pluginAtom;
+extern HQL_API IAtom * prefetchAtom;
+extern HQL_API IAtom * preloadAtom;
+extern HQL_API IAtom * priorityAtom;
+extern HQL_API IAtom * privateAtom;
+extern HQL_API IAtom * pseudoentrypointAtom;
+extern HQL_API IAtom * pullAtom;
+extern HQL_API IAtom * pulledAtom;
+extern HQL_API IAtom * pureAtom;
+extern HQL_API IAtom * quoteAtom;
+extern HQL_API IAtom * randomAtom;
+extern HQL_API IAtom * rangeAtom;
+extern HQL_API IAtom * rawAtom;
+extern HQL_API IAtom * recordAtom;
+extern HQL_API IAtom * recursiveAtom;
+extern HQL_API IAtom * referenceAtom;
+extern HQL_API IAtom * refreshAtom;
+extern HQL_API IAtom * _remote_Atom;
+extern HQL_API IAtom * renameAtom;
+extern HQL_API IAtom * repeatAtom;
+extern HQL_API IAtom * _resourced_Atom;
+extern HQL_API IAtom * responseAtom;
+extern HQL_API IAtom * restartAtom;
+extern HQL_API IAtom * resultAtom;
+extern HQL_API IAtom * _results_Atom;
+extern HQL_API IAtom * retryAtom;
+extern HQL_API IAtom * rightAtom;
+extern HQL_API IAtom * rightonlyAtom;
+extern HQL_API IAtom * rightouterAtom;
+extern HQL_API IAtom * rollbackAtom;
+extern HQL_API IAtom * _root_Atom;
+extern HQL_API IAtom * rowAtom;
+extern HQL_API IAtom * _rowsid_Atom;
+extern HQL_API IAtom * rowLimitAtom;
+extern HQL_API IAtom * ruleAtom;
+extern HQL_API IAtom * saveAtom;
+extern HQL_API IAtom * scanAtom;
+extern HQL_API IAtom * scanAllAtom;
+extern HQL_API IAtom * scopeAtom;
+extern HQL_API IAtom * scopeCheckingAtom;
+extern HQL_API IAtom * sectionAtom;
+extern HQL_API IAtom * _selectorSequence_Atom;
+extern HQL_API IAtom * selfAtom;
+extern HQL_API IAtom * _selectors_Atom;
+extern HQL_API IAtom * separatorAtom;
+extern HQL_API IAtom * sequenceAtom;
+extern HQL_API IAtom * _sequence_Atom;
+extern HQL_API IAtom * sequentialAtom;
+extern HQL_API IAtom * serializationAtom;
+extern HQL_API IAtom * setAtom;
+extern HQL_API IAtom * sharedAtom;
+extern HQL_API IAtom * shutdownAtom;
+extern HQL_API IAtom * _sideEffect_Atom;
+extern HQL_API IAtom * singleAtom;
+extern HQL_API IAtom * sizeAtom;
+extern HQL_API IAtom * sizeofAtom;
+extern HQL_API IAtom * skewAtom;
+extern HQL_API IAtom * skipAtom;
+extern HQL_API IAtom * snapshotAtom;
+extern HQL_API IAtom * soapActionAtom;
+extern HQL_API IAtom * httpHeaderAtom;
+extern HQL_API IAtom * prototypeAtom;
+extern HQL_API IAtom * proxyAddressAtom;
+extern HQL_API IAtom * sort_AllAtom;
+extern HQL_API IAtom * sort_KeyedAtom;
+extern HQL_API IAtom * sortedAtom;
+extern HQL_API IAtom * sourceAtom;
+extern HQL_API IAtom * stableAtom;
+extern HQL_API IAtom * _state_Atom;
+extern HQL_API IAtom * steppedAtom;
+extern HQL_API IAtom * storedAtom;
+extern HQL_API IAtom * streamedAtom;
+extern HQL_API IAtom * _streaming_Atom;
+extern HQL_API IAtom * successAtom;
+extern HQL_API IAtom * sysAtom;
+extern HQL_API IAtom * tempAtom;
+extern HQL_API IAtom * templateAtom;
+extern HQL_API IAtom * terminateAtom;
+extern HQL_API IAtom * terminatorAtom;
+extern HQL_API IAtom * escapeAtom;
+extern HQL_API IAtom * thorAtom;
+extern HQL_API IAtom * thresholdAtom;
+extern HQL_API IAtom * timeoutAtom;
+extern HQL_API IAtom * timeLimitAtom;
+extern HQL_API IAtom * timestampAtom;
+extern HQL_API IAtom * tinyAtom;
+extern HQL_API IAtom * tomitaAtom;
+extern HQL_API IAtom * topAtom;
+extern HQL_API IAtom * trimAtom;
+extern HQL_API IAtom * trueAtom;
+extern HQL_API IAtom * typeAtom;
+extern HQL_API IAtom * _uid_Atom;
+extern HQL_API IAtom * unknownAtom;
+extern HQL_API IAtom * unknownSizeFieldAtom;
+extern HQL_API IAtom * unicodeAtom;
+extern HQL_API IAtom * unorderedAtom;
+extern HQL_API IAtom * unsortedAtom;
+extern HQL_API IAtom * unstableAtom;
+extern HQL_API IAtom * updateAtom;
+extern HQL_API IAtom * userMatchFunctionAtom;
+extern HQL_API IAtom * versionAtom;
+extern HQL_API IAtom * virtualAtom;
+extern HQL_API IAtom * _virtualSeq_Atom;
+extern HQL_API IAtom * volatileAtom;
+extern HQL_API IAtom * warningAtom;
+extern HQL_API IAtom * wholeAtom;
+extern HQL_API IAtom * widthAtom;
+extern HQL_API IAtom * wipeAtom;
+extern HQL_API IAtom * _workflow_Atom;
+extern HQL_API IAtom * _workflowPersist_Atom;
+extern HQL_API IAtom * workunitAtom;
+extern HQL_API IAtom * wuidAtom;
+extern HQL_API IAtom * xmlAtom;
+extern HQL_API IAtom * xmlDefaultAtom;
+extern HQL_API IAtom * xpathAtom;
 
-inline bool isInternalAttributeName(_ATOM name) { return (name->str()[0] == '$'); }
+inline bool isInternalAttributeName(IAtom * name) { return (name->str()[0] == '$'); }
 
 //Information which is associated with system attributes.
 enum
@@ -438,9 +447,9 @@ public:
     byte attrId;
 };
 
-extern HQL_API _ATOM createSystemAtom(const char * s);
+extern HQL_API IAtom * createSystemAtom(const char * s);
 
-inline byte getAttributeId(_ATOM x) { return static_cast<SysAtom *>(x)->attrId; }
+inline byte getAttributeId(IAtom * x) { return static_cast<SysAtom *>(x)->attrId; }
 
 /*
  * This is part of an experiment to make identifiers in the language case sensitive - at least optionally, possibly only for syntax checking.
@@ -451,8 +460,6 @@ inline byte getAttributeId(_ATOM x) { return static_cast<SysAtom *>(x)->attrId;
  */
 
 inline bool identifiersAreCaseSensitive() { return false; }
-inline _ATOM createIdentifierAtom(const char * name) { return createAtom(name); }
-inline _ATOM createIdentifierAtom(const char * name, unsigned len) { return createAtom(name, len); }
 
 #endif
 

+ 38 - 33
ecl/hql/hqlattr.cpp

@@ -616,10 +616,11 @@ unsigned getOperatorMetaFlags(node_operator op)
     case no_mix:
     case no_persist_check:
     case no_dataset_from_transform:
+    case no_id:
 
     case no_unused6:
     case no_unused13: case no_unused14: case no_unused15:
-    case no_unused23: case no_unused24: case no_unused25: case no_unused28: case no_unused29:
+    case no_unused24: case no_unused25: case no_unused28: case no_unused29:
     case no_unused30: case no_unused31: case no_unused32: case no_unused33: case no_unused34: case no_unused35: case no_unused36: case no_unused37: case no_unused38:
     case no_unused40: case no_unused41: case no_unused42: case no_unused43: case no_unused44: case no_unused45: case no_unused46: case no_unused47: case no_unused48: case no_unused49:
     case no_unused50: case no_unused52:
@@ -766,11 +767,11 @@ static unsigned guessSize(unsigned minLen, unsigned maxLen)
 }
 
 
-static IHqlExpression * querySerializedForm(IHqlExpression * expr, _ATOM variation)
+static IHqlExpression * querySerializedForm(IHqlExpression * expr, IAtom * variation)
 {
     if (expr)
     {
-        _ATOM attrName;
+        IAtom * attrName;
         if (variation == diskAtom)
             attrName = _attrDiskSerializedForm_Atom;
         else if (variation == internalAtom)
@@ -790,7 +791,7 @@ static HqlTransformerInfo serializedRecordCreatorInfo("SerializedRecordCreator")
 class SerializedRecordCreator : public QuickHqlTransformer
 {
 public:
-    SerializedRecordCreator(_ATOM _variety) : QuickHqlTransformer(serializedRecordCreatorInfo, NULL), variety(_variety) {}
+    SerializedRecordCreator(IAtom * _variety) : QuickHqlTransformer(serializedRecordCreatorInfo, NULL), variety(_variety) {}
 
     virtual IHqlExpression * createTransformedBody(IHqlExpression * expr)
     {
@@ -816,10 +817,10 @@ public:
     }
 
 protected:
-    _ATOM variety;
+    IAtom * variety;
 };
 
-static IHqlExpression * evaluateSerializedRecord(IHqlExpression * expr, _ATOM variation)
+static IHqlExpression * evaluateSerializedRecord(IHqlExpression * expr, IAtom * variation)
 {
     SerializedRecordCreator transformer(variation);
     return transformer.transform(expr);
@@ -830,13 +831,13 @@ static IHqlExpression * evaluateSerializedRecord(IHqlExpression * expr, _ATOM va
 class CHqlExprMeta
 {
 public:
-    static inline IHqlExpression * addAttribute(IHqlExpression * expr, _ATOM name, IHqlExpression * value)
+    static inline IHqlExpression * addAttribute(IHqlExpression * expr, IAtom * name, IHqlExpression * value)
     {
         CHqlExpression * cexpr = static_cast<CHqlExpression *>(expr);
         cexpr->addAttribute(name, value);
         return value;
     }
-    static inline IHqlExpression * queryExistingAttribute(IHqlExpression * expr, _ATOM name)
+    static inline IHqlExpression * queryExistingAttribute(IHqlExpression * expr, IAtom * name)
     {
         CHqlExpression * cexpr = static_cast<CHqlExpression *>(expr);
         return cexpr->queryExistingAttribute(name);
@@ -845,7 +846,7 @@ public:
 
 //-- Attribute: serialized form -------------------------------------------------------------------------------
 
-static IHqlExpression * evaluateAttrSerializedForm(IHqlExpression * expr, _ATOM attr, _ATOM variation)
+static IHqlExpression * evaluateAttrSerializedForm(IHqlExpression * expr, IAtom * attr, IAtom * variation)
 {
     if (expr->getOperator() == no_record || expr->getOperator() == no_field)
     {
@@ -915,7 +916,7 @@ static IHqlExpression * evaluateFieldAttrSize(IHqlExpression * expr)
                     IHqlExpression * attr = expr->queryChild(i);
                     if (attr->isAttribute())
                     {
-                        _ATOM name = attr->queryName();
+                        IAtom * name = attr->queryName();
                         if (name == countAtom)
                             count = attr->queryChild(0);
                         else if (name == sizeofAtom)
@@ -1241,12 +1242,12 @@ static IHqlExpression * evaluateAttrSize(IHqlExpression * expr)
 }
 
 
-IHqlExpression * getSerializedForm(IHqlExpression * expr, _ATOM variation)
+IHqlExpression * getSerializedForm(IHqlExpression * expr, IAtom * variation)
 {
     return LINK(querySerializedForm(expr, variation));
 }
 
-ITypeInfo * getSerializedForm(ITypeInfo * type, _ATOM variation)
+ITypeInfo * getSerializedForm(ITypeInfo * type, IAtom * variation)
 {
     if (!type)
         return NULL;
@@ -1294,15 +1295,15 @@ ITypeInfo * getSerializedForm(ITypeInfo * type, _ATOM variation)
 class HqlCachedAttributeTransformer : public QuickHqlTransformer
 {
 public:
-    HqlCachedAttributeTransformer(HqlTransformerInfo & _transformInfo, _ATOM _attrName);
+    HqlCachedAttributeTransformer(HqlTransformerInfo & _transformInfo, IAtom * _attrName);
 
     virtual IHqlExpression * transform(IHqlExpression * expr);
 
 protected:
-    _ATOM attrName;
+    IAtom * attrName;
 };
 
-HqlCachedAttributeTransformer::HqlCachedAttributeTransformer(HqlTransformerInfo & _transformInfo, _ATOM _attrName)
+HqlCachedAttributeTransformer::HqlCachedAttributeTransformer(HqlTransformerInfo & _transformInfo, IAtom * _attrName)
 : QuickHqlTransformer(_transformInfo, NULL), attrName(_attrName)
 {
 }
@@ -1377,8 +1378,12 @@ IHqlExpression * HqlUnadornedNormalizer::createTransformed(IHqlExpression * expr
 
             ITypeInfo * type = expr->queryType();
             OwnedITypeInfo newType = transformType(type);
-            if (type != newType)
-                return createField(expr->queryName(), newType.getClear(), children);
+            IIdAtom * id = expr->queryId();
+            //Fields names compare case-insignificantly therefore the field name is converted to lower case so that
+            //equivalent fields are mapped to the same normalized expression.
+            IIdAtom * newid = createIdAtom(id->lower()->str());
+            if ((type != newType) || (id != newid))
+                return createField(newid, newType.getClear(), children);
 
             if (same)
                 return LINK(expr);
@@ -1390,7 +1395,7 @@ IHqlExpression * HqlUnadornedNormalizer::createTransformed(IHqlExpression * expr
             OwnedITypeInfo newType = transformType(type);
             HqlExprArray children;
             transformChildren(expr, children);      // could just unwind
-            return createParameter(expr->queryName(), UnadornedParameterIndex, newType.getClear(), children);
+            return createParameter(expr->queryId(), UnadornedParameterIndex, newType.getClear(), children);
         }
     }
 
@@ -2308,7 +2313,7 @@ bool HqlRowCountInfo::extractHint(IHqlExpression * hint)
         return true;
     case no_attr:
         {
-            _ATOM name = arg->queryName();
+            IAtom * name = arg->queryName();
             RowCountMagnitude magnitude = RCMnone;
             if (name == tinyAtom)
                 magnitude = RCMtiny;
@@ -3018,7 +3023,7 @@ bool hasNoMoreRowsThan(IHqlExpression * expr, __int64 limit)
 
 // Functions for accessing attributes from types etc.
 
-IHqlExpression * queryProperty(ITypeInfo * type, _ATOM search)
+IHqlExpression * queryProperty(ITypeInfo * type, IAtom * search)
 {
     loop
     {
@@ -3047,7 +3052,7 @@ IHqlExpression * queryProperty(ITypeInfo * type, _ATOM search)
     }
 }
 
-IHqlExpression * queryPropertyChild(ITypeInfo * type, _ATOM search, unsigned idx)
+IHqlExpression * queryPropertyChild(ITypeInfo * type, IAtom * search, unsigned idx)
 {
     IHqlExpression * match = queryProperty(type, search);
     if (match)
@@ -3058,7 +3063,7 @@ IHqlExpression * queryPropertyChild(ITypeInfo * type, _ATOM search, unsigned idx
 
 // Functions for extracting and preserving attribute information on types and fields.
 
-void cloneFieldModifier(Shared<ITypeInfo> & type, ITypeInfo * donorType, _ATOM attr)
+void cloneFieldModifier(Shared<ITypeInfo> & type, ITypeInfo * donorType, IAtom * attr)
 {
     IHqlExpression * match = queryProperty(donorType, attr);
     if (!match)
@@ -3078,7 +3083,7 @@ ITypeInfo * cloneEssentialFieldModifiers(ITypeInfo * donor, ITypeInfo * rawtype)
     return type.getClear();
 }
 
-ITypeInfo * removeProperty(ITypeInfo * t, _ATOM search)
+ITypeInfo * removeProperty(ITypeInfo * t, IAtom * search)
 {
     typemod_t curModifier = t->queryModifier();
     if (curModifier == typemod_none)
@@ -3102,7 +3107,7 @@ bool isUninheritedFieldAttribute(IHqlExpression * expr)
 {
     if (expr->isAttribute())
     {
-        _ATOM name = expr->queryName();
+        IAtom * name = expr->queryName();
         //MORE: Attributes of datasets need a different representation - should probably be include in the type somehow...
         if ((name == virtualAtom) || (name == countAtom))
             return true;
@@ -3255,7 +3260,7 @@ bool maxRecordSizeCanBeDerived(IHqlExpression * record)
 //---------------------------------------------------------------------------------
 
 
-bool recordRequiresSerialization(IHqlExpression * expr, _ATOM serializeForm)
+bool recordRequiresSerialization(IHqlExpression * expr, IAtom * serializeForm)
 {
     if (!expr)
         return false;
@@ -3285,12 +3290,12 @@ bool recordRequiresLinkCount(IHqlExpression * expr)
     return recordRequiresDestructor(expr);
 }
 
-bool recordSerializationDiffers(IHqlExpression * expr, _ATOM serializeForm1, _ATOM serializeForm2)
+bool recordSerializationDiffers(IHqlExpression * expr, IAtom * serializeForm1, IAtom * serializeForm2)
 {
     return querySerializedForm(expr, serializeForm1) != querySerializedForm(expr, serializeForm2);
 }
 
-extern HQL_API bool typeRequiresDeserialization(ITypeInfo * type, _ATOM serializeForm)
+extern HQL_API bool typeRequiresDeserialization(ITypeInfo * type, IAtom * serializeForm)
 {
     Owned<ITypeInfo> serializedType = getSerializedForm(type, serializeForm);
 
@@ -3443,7 +3448,7 @@ IHqlExpression * HqlLocationIndependentNormalizer::doCreateTransformed(IHqlExpre
             ITypeInfo * type = expr->queryType();
             OwnedITypeInfo newType = transformType(type);
             if (type != newType)
-                return createField(expr->queryName(), newType.getClear(), children);
+                return createField(expr->queryId(), newType.getClear(), children);
 
             if (same)
                 return LINK(expr);
@@ -3498,7 +3503,7 @@ IHqlExpression * queryLocationIndependent(IHqlExpression * expr)
 }
 
 
-static void clonePropertyAsModifier(Owned<ITypeInfo> & type, IHqlExpression * donor, _ATOM attr)
+static void clonePropertyAsModifier(Owned<ITypeInfo> & type, IHqlExpression * donor, IAtom * attr)
 {
     if (queryProperty(type, attr))
         return;
@@ -3533,7 +3538,7 @@ ITypeInfo * preserveTypeQualifiers(ITypeInfo * ownedType, IHqlExpression * donor
     return type.getClear();
 }
 
-static bool cloneModifierAsProperty(HqlExprArray & args, ITypeInfo * donor, _ATOM attr)
+static bool cloneModifierAsProperty(HqlExprArray & args, ITypeInfo * donor, IAtom * attr)
 {
     IHqlExpression * match = queryProperty(donor, attr);
     if (!match)
@@ -3688,7 +3693,7 @@ ITypeInfo * setStreamedAttr(ITypeInfo * _type, bool setValue)
 
 //---------------------------------------------------------------------------------------------------------------------
 
-IHqlExpression * CHqlExpression::queryExistingAttribute(_ATOM propName) const
+IHqlExpression * CHqlExpression::queryExistingAttribute(IAtom * propName) const
 {
     CriticalBlock block(*attributeCS);
     CHqlDynamicAttribute * cur = attributes;
@@ -3706,7 +3711,7 @@ IHqlExpression * CHqlExpression::queryExistingAttribute(_ATOM propName) const
     return NULL;
 }
 
-void CHqlExpression::addAttribute(_ATOM name, IHqlExpression * value)
+void CHqlExpression::addAttribute(IAtom * name, IHqlExpression * value)
 {
     if (value == this)
         value = NULL;
@@ -3720,7 +3725,7 @@ void CHqlExpression::addAttribute(_ATOM name, IHqlExpression * value)
 }
 
 
-IHqlExpression * CHqlExpression::queryAttribute(_ATOM propName)
+IHqlExpression * CHqlExpression::queryAttribute(IAtom * propName)
 {
 #ifdef _DEBUG
     assertex(isInternalAttributeName(propName));

+ 9 - 9
ecl/hql/hqlattr.hpp

@@ -22,11 +22,11 @@
 
 #define MAX_MAXLENGTH (INFINITE_LENGTH-1)
 
-extern HQL_API IHqlExpression * queryProperty(ITypeInfo * type, _ATOM search);
-extern HQL_API IHqlExpression * queryPropertyChild(ITypeInfo * type, _ATOM search, unsigned idx);
-extern HQL_API void cloneFieldModifier(Owned<ITypeInfo> & type, ITypeInfo * donorType, _ATOM attr);
+extern HQL_API IHqlExpression * queryProperty(ITypeInfo * type, IAtom * search);
+extern HQL_API IHqlExpression * queryPropertyChild(ITypeInfo * type, IAtom * search, unsigned idx);
+extern HQL_API void cloneFieldModifier(Owned<ITypeInfo> & type, ITypeInfo * donorType, IAtom * attr);
 extern HQL_API ITypeInfo * cloneEssentialFieldModifiers(ITypeInfo * donor, ITypeInfo * rawtype);
-extern HQL_API ITypeInfo * removeProperty(ITypeInfo * type, _ATOM search);
+extern HQL_API ITypeInfo * removeProperty(ITypeInfo * type, IAtom * search);
 
 extern HQL_API size32_t getMinRecordSize(IHqlExpression * record);
 extern HQL_API size32_t getExpectedRecordSize(IHqlExpression * record);
@@ -42,11 +42,11 @@ inline bool isFixedSizeRecord(IHqlExpression * record) { return !isVariableSizeR
 
 extern HQL_API bool recordRequiresLinkCount(IHqlExpression * expr);
 extern HQL_API bool recordRequiresDestructor(IHqlExpression * expr);
-extern HQL_API bool recordRequiresSerialization(IHqlExpression * expr, _ATOM serializeForm);
-extern HQL_API bool typeRequiresDeserialization(ITypeInfo * type, _ATOM serializeForm); // or can we use the serialized form directly
-extern HQL_API bool recordSerializationDiffers(IHqlExpression * expr, _ATOM serializeForm1, _ATOM serializeForm2);
-extern HQL_API IHqlExpression * getSerializedForm(IHqlExpression * expr, _ATOM variation);
-extern HQL_API ITypeInfo * getSerializedForm(ITypeInfo * type, _ATOM variation);
+extern HQL_API bool recordRequiresSerialization(IHqlExpression * expr, IAtom * serializeForm);
+extern HQL_API bool typeRequiresDeserialization(ITypeInfo * type, IAtom * serializeForm); // or can we use the serialized form directly
+extern HQL_API bool recordSerializationDiffers(IHqlExpression * expr, IAtom * serializeForm1, IAtom * serializeForm2);
+extern HQL_API IHqlExpression * getSerializedForm(IHqlExpression * expr, IAtom * variation);
+extern HQL_API ITypeInfo * getSerializedForm(ITypeInfo * type, IAtom * variation);
 extern HQL_API IHqlExpression * getPackedRecord(IHqlExpression * expr);
 
 //This returns a record that compares equal with another result if the normalized records will compare equal

+ 38 - 38
ecl/hql/hqlcollect.cpp

@@ -53,33 +53,33 @@ public:
 class CEclSource : public CInterfaceOf<IEclSource>
 {
 public:
-    CEclSource(_ATOM _eclName, EclSourceType _type) : eclName(_eclName), type(_type) { }
+    CEclSource(IIdAtom * _eclId, EclSourceType _type) : eclId(_eclId), type(_type) { }
 
 //interface IEclSource
     virtual IProperties * getProperties() { return NULL; }
-    virtual _ATOM queryEclName() const { return eclName; }
+    virtual IIdAtom * queryEclId() const { return eclId; }
     virtual EclSourceType queryType() const { return type; }
 
 // new virtuals implemented by the child classes
-    virtual IEclSource * getSource(_ATOM searchName) = 0;
+    virtual IEclSource * getSource(IIdAtom * searchName) = 0;
     virtual IEclSourceIterator * getContained() = 0;
 
 protected:
     EclSourceType type;
-    _ATOM eclName;
+    IIdAtom * eclId;
 };
 
 
 class CEclCollection : public CEclSource
 {
 public:
-    CEclCollection(_ATOM _eclName, EclSourceType _type) : CEclSource(_eclName, _type) { expandedChildren = false; fullyDefined = false; }
+    CEclCollection(IIdAtom * _eclName, EclSourceType _type) : CEclSource(_eclName, _type) { expandedChildren = false; fullyDefined = false; }
 
 //interface IEclSource
     virtual IFileContents * queryFileContents() { return NULL; }
 
 //CEclSource virtuals
-    virtual IEclSource * getSource(_ATOM searchName);
+    virtual IEclSource * getSource(IIdAtom * searchName);
     virtual IEclSourceIterator * getContained();
     virtual void populateChildren() {}
     virtual void populateDefinition() {}
@@ -87,7 +87,7 @@ public:
 protected:
     void ensureChildren();
     void ensureDefinition();
-    CEclSource * find(_ATOM searchName);
+    CEclSource * find(IIdAtom * searchName);
 
 protected:
     IArrayOf<IEclSource> contents;
@@ -97,7 +97,7 @@ protected:
 };
 
 
-IEclSource * CEclCollection::getSource(_ATOM searchName)
+IEclSource * CEclCollection::getSource(IIdAtom * searchName)
 {
     ensureChildren();
     return find(searchName);
@@ -109,12 +109,12 @@ IEclSourceIterator * CEclCollection::getContained()
     return new CArrayIteratorOf<IEclSource, IEclSourceIterator>(contents, 0, NULL);
 }
 
-CEclSource * CEclCollection::find(_ATOM name)
+CEclSource * CEclCollection::find(IIdAtom * name)
 {
     ForEachItemIn(i, contents)
     {
         IEclSource & cur = contents.item(i);
-        if (cur.queryEclName() == name)
+        if (cur.queryEclId()->lower() == name->lower())
             return &static_cast<CEclSource &>(cur);
     }
     return NULL;
@@ -151,7 +151,7 @@ public:
     virtual IFileContents * queryFileContents() { return fileContents; }
 
 //CEclSource virtuals
-    virtual IEclSource * getSource(_ATOM searchName) { return NULL; }
+    virtual IEclSource * getSource(IIdAtom * searchName) { return NULL; }
     virtual IEclSourceIterator * getContained() { return NULL; }
 
     bool checkValid();
@@ -168,7 +168,7 @@ public:
 class FileSystemDirectory : public CEclCollection
 {
 public:
-    FileSystemDirectory(_ATOM _eclName, IFile * _directory)
+    FileSystemDirectory(IIdAtom * _eclName, IFile * _directory)
         : CEclCollection(_eclName, ESTcontainer), directory(_directory)
     {
     }
@@ -194,7 +194,7 @@ public:
     }
 
 //interface IEclSourceCollection
-    virtual IEclSource * getSource(IEclSource * optParent, _ATOM searchName);
+    virtual IEclSource * getSource(IEclSource * optParent, IIdAtom * searchName);
     virtual IEclSourceIterator * getContained(IEclSource * optParent);
     virtual void checkCacheValid();
 
@@ -223,22 +223,22 @@ EclSourceType getEclSourceType(const char * tailname)
     return ESTnone;
 }
 
-static _ATOM deriveEclName(const char * filename)
+static IIdAtom * deriveEclName(const char * filename)
 {
     if (!filename)
         return NULL;
 
     const char * tailname = pathTail(filename);
     const char *ext = strrchr(tailname, '.');
-    _ATOM name;
+    IIdAtom * id;
     if (ext)
-        name = createAtom(tailname, ext-tailname);
+        id = createIdAtom(tailname, ext-tailname);
     else
-        name = createAtom(tailname);
+        id = createIdAtom(tailname);
 
-    if (!isCIdentifier(name->str()))
+    if (!isCIdentifier(id->str()))
         return NULL;
-    return name;
+    return id;
 }
 
 //---------------------------------------------------------------------------------------
@@ -262,7 +262,7 @@ FileSystemFile::FileSystemFile(EclSourceType _type, IFile & _file)
 
 bool FileSystemFile::checkValid()
 {
-    if (!eclName)
+    if (!eclId)
         return false;
 
     if (type == ESTplugin)
@@ -285,7 +285,7 @@ bool FileSystemFile::checkValid()
                     if (p(&pb) && (pb.magicVersion == PLUGIN_VERSION) && pb.ECL)
                     {
                         //Name in the plugin overrides the name of the plugin, and the filename where errors are reported.
-                        eclName = createAtom(pb.moduleName);
+                        eclId = createIdAtom(pb.moduleName);
                         version.set(pb.version);
 
                         Owned<ISourcePath> pluginPath = createSourcePath(pb.moduleName);
@@ -380,9 +380,9 @@ void FileSystemDirectory::addFile(IFile &file, bool allowPlugins)
             newSource.setown(new FileSystemDirectory(deriveEclName(tail), &file));
         }
 
-        if (newSource && newSource->queryEclName())
+        if (newSource && newSource->queryEclId())
         {
-            if (!find(newSource->queryEclName()))
+            if (!find(newSource->queryEclId()))
                 contents.append(*newSource.getClear());
             else
             {
@@ -415,7 +415,7 @@ void FileSystemDirectory::populateChildren()
 
 //---------------------------------------------------------------------------------------
 
-IEclSource * FileSystemEclCollection::getSource(IEclSource * optParent, _ATOM searchName)
+IEclSource * FileSystemEclCollection::getSource(IEclSource * optParent, IIdAtom * searchName)
 {
     if (!optParent)
         return root.getSource(searchName);
@@ -518,13 +518,13 @@ static const char * queryText(IPropertyTree * tree)
 class CXmlEclElement : public CEclCollection
 {
 public:
-    CXmlEclElement(_ATOM _name, EclSourceType _type, IPropertyTree * _elemTree, CXmlEclElement * _container);
+    CXmlEclElement(IIdAtom * _name, EclSourceType _type, IPropertyTree * _elemTree, CXmlEclElement * _container);
 
 //interface IEclSource
     virtual IProperties * getProperties();
     virtual IFileContents * queryFileContents();
 
-    virtual CXmlEclElement * createElement(_ATOM _name, EclSourceType _type, IPropertyTree * _elemTree)
+    virtual CXmlEclElement * createElement(IIdAtom * _name, EclSourceType _type, IPropertyTree * _elemTree)
     {
         return new CXmlEclElement(_name, _type, _elemTree, this);
     }
@@ -532,8 +532,8 @@ public:
     virtual void populateChildren();
     virtual void setTree(IPropertyTree * _elemTree) { elemTree.set(_elemTree); }
 
-    CXmlEclElement * find(_ATOM searchName) { return static_cast<CXmlEclElement *>(CEclCollection::find(searchName)); }
-    CXmlEclElement * select(_ATOM eclName, EclSourceType _type, IPropertyTree * _tree);
+    CXmlEclElement * find(IIdAtom * searchName) { return static_cast<CXmlEclElement *>(CEclCollection::find(searchName)); }
+    CXmlEclElement * select(IIdAtom * eclName, EclSourceType _type, IPropertyTree * _tree);
     void setFlags(unsigned _flags) { extraFlags = _flags; }
 
 protected:
@@ -551,7 +551,7 @@ public:
 
 
 
-CXmlEclElement::CXmlEclElement(_ATOM _name, EclSourceType _type, IPropertyTree * _elemTree, CXmlEclElement * _container)
+CXmlEclElement::CXmlEclElement(IIdAtom * _name, EclSourceType _type, IPropertyTree * _elemTree, CXmlEclElement * _container)
 : CEclCollection(_name, _type), elemTree(_elemTree), container(_container)
 {
     extraFlags = 0;
@@ -599,12 +599,12 @@ void CXmlEclElement::expandModule(const char * modname, IPropertyTree * tree)
         const char * dot = strchr(modname, '.');
         if (dot)
         {
-            _ATOM name = createAtom(modname, dot-modname);
+            IIdAtom * name = createIdAtom(modname, dot-modname);
             select(name, ESTcontainer, NULL)->expandModule(dot+1, tree);
             return;
         }
 
-        _ATOM thisName = createAtom(modname);
+        IIdAtom * thisName = createIdAtom(modname);
         EclSourceType thisType = ESTcontainer;
         const char * text = queryText(tree);
 
@@ -636,7 +636,7 @@ void CXmlEclElement::expandModule(const char * modname, IPropertyTree * tree)
 
 void CXmlEclElement::expandAttribute(const char * modname, IPropertyTree * tree)
 {
-    _ATOM thisName = createAtom(modname);
+    IIdAtom * thisName = createIdAtom(modname);
     CXmlEclElement * match = select(thisName, ESTdefinition, tree);
 
     unsigned iflags = tree->getPropInt("@flags", 0);
@@ -654,7 +654,7 @@ void CXmlEclElement::getFullName(StringBuffer & target)
         if (target.length() != prev)
             target.append('.');
     }
-    target.append(eclName);
+    target.append(eclId->str());
 }
 
 IFileContents * CXmlEclElement::queryFileContents()
@@ -712,7 +712,7 @@ IProperties * CXmlEclElement::getProperties()
 }
 
 
-CXmlEclElement * CXmlEclElement::select(_ATOM _name, EclSourceType _type, IPropertyTree * _tree)
+CXmlEclElement * CXmlEclElement::select(IIdAtom * _name, EclSourceType _type, IPropertyTree * _tree)
 {
     //Critial section??
     CXmlEclElement * match = find(_name);
@@ -748,7 +748,7 @@ public:
     }
 
 //interface IEclSourceCollection
-    virtual IEclSource * getSource(IEclSource * optParent, _ATOM searchName);
+    virtual IEclSource * getSource(IEclSource * optParent, IIdAtom * searchName);
     virtual IEclSourceIterator * getContained(IEclSource * optParent);
 
 public:
@@ -759,7 +759,7 @@ public:
 
 //---------------------------------------------------------------------------------------
 
-IEclSource * PropertyTreeEclCollection::getSource(IEclSource * optParent, _ATOM searchName)
+IEclSource * PropertyTreeEclCollection::getSource(IEclSource * optParent, IIdAtom * searchName)
 {
     if (!optParent)
         return root->getSource(searchName);
@@ -845,7 +845,7 @@ class RemoteXmlEclCollection;
 class CRemoteXmlEclElement : public CXmlEclElement
 {
 public:
-    CRemoteXmlEclElement(_ATOM _name, EclSourceType _type, IPropertyTree * _elemTree, CXmlEclElement * _container, RemoteXmlEclCollection * _collection)
+    CRemoteXmlEclElement(IIdAtom * _name, EclSourceType _type, IPropertyTree * _elemTree, CXmlEclElement * _container, RemoteXmlEclCollection * _collection)
         : CXmlEclElement(_name, _type, _elemTree, _container), collection(_collection)
     {
         updateKey();
@@ -854,7 +854,7 @@ public:
     }
 
 //interface IEclSource
-    virtual CXmlEclElement * createElement(_ATOM _name, EclSourceType _type, IPropertyTree * _elemTree)
+    virtual CXmlEclElement * createElement(IIdAtom * _name, EclSourceType _type, IPropertyTree * _elemTree)
     {
         return new CRemoteXmlEclElement(_name, _type, _elemTree, this, collection);
     }

+ 2 - 2
ecl/hql/hqlcollect.hpp

@@ -48,7 +48,7 @@ interface IEclSource : public IInterface
 {
     virtual IFileContents * queryFileContents() = 0;
     virtual IProperties * getProperties() = 0;
-    virtual _ATOM queryEclName() const = 0;
+    virtual IIdAtom * queryEclId() const = 0;
     virtual EclSourceType queryType() const = 0;
 
     inline bool isImplicitModule() const
@@ -63,7 +63,7 @@ interface IEclSource : public IInterface
 typedef IIteratorOf<IEclSource> IEclSourceIterator;
 interface IEclSourceCollection : public IInterface
 {
-    virtual IEclSource * getSource(IEclSource * optParent, _ATOM eclName) = 0;
+    virtual IEclSource * getSource(IEclSource * optParent, IIdAtom * eclName) = 0;
     virtual IEclSourceIterator * getContained(IEclSource * optParent) = 0;
     virtual void checkCacheValid() = 0;
 };

+ 2 - 2
ecl/hql/hqldesc.cpp

@@ -29,7 +29,7 @@ void getFullName(StringBuffer & name, IHqlExpression * expr)
     }
     else
     {
-        const char * module = expr->queryFullModuleName()->str();
+        const char * module = expr->queryFullModuleId()->str();
         if (module && *module)
             name.append(module).append(".");
         name.append(expr->queryName());
@@ -54,7 +54,7 @@ void setFullNameProp(IPropertyTree * tree, const char * prop, IHqlExpression * e
     if (scope)
         tree->setProp(prop, scope->queryFullName());
     else
-        setFullNameProp(tree, prop, expr->queryFullModuleName()->str(), expr->queryName()->str());
+        setFullNameProp(tree, prop, expr->queryFullModuleId()->lower()->str(), expr->queryName()->str());
 }
 
 static int compareSymbolsByPosition(IInterface * * pleft, IInterface * * pright)

+ 17 - 15
ecl/hql/hqldsparam.cpp

@@ -54,8 +54,8 @@ IHqlExpression* HqlGram::processAbstractDataset(IHqlExpression* _expr, IHqlExpre
         if ((kid->getOperator() == no_ifblock) || kid->isAttribute())
             continue;
 
-        _ATOM name = kid->queryName();
-        _ATOM mapto = fieldMapTo(mapping, name);
+        IIdAtom * name = kid->queryId();
+        IIdAtom * mapto = fieldMapTo(mapping, name);
 
         OwnedHqlExpr match = actualScope->lookupSymbol(mapto);
         if (match)
@@ -132,35 +132,37 @@ bool HqlGram::checkTemplateFunctionParameters(IHqlExpression* func, HqlExprArray
 }
 
 /* mapping is a no_sortlist of comma pairs */
-_ATOM HqlGram::fieldMapTo(IHqlExpression* mapping, _ATOM name)
+IIdAtom * HqlGram::fieldMapTo(IHqlExpression* mapping, IIdAtom * id)
 {
     if (!mapping)
-        return name;
+        return id;
 
+    IAtom * name = id->lower();
     ForEachChild(i, mapping)
     {
         IHqlExpression * map = mapping->queryChild(i);
         if (map->queryChild(0)->queryName() == name)
-            return map->queryChild(1)->queryName();
+            return map->queryChild(1)->queryId();
     }
 
-    return name;
+    return id;
 }
 
 /* mapping is a no_sortlist of comma pairs */
-_ATOM HqlGram::fieldMapFrom(IHqlExpression* mapping, _ATOM name)
+IIdAtom * HqlGram::fieldMapFrom(IHqlExpression* mapping, IIdAtom * id)
 {
     if (!mapping)
-        return name;
+        return id;
 
+    IAtom * name = id->lower();
     ForEachChild(i, mapping)
     {
         IHqlExpression * map = mapping->queryChild(i);
         if (map->queryChild(1)->queryName() == name)
-            return map->queryChild(0)->queryName();
+            return map->queryChild(0)->queryId();
     }
 
-    return name;
+    return id;
 }
 
 // either a abstract dataset 
@@ -254,13 +256,13 @@ IHqlExpression* HqlGram::bindFieldMap(IHqlExpression* expr, IHqlExpression* map)
                 IHqlExpression * old = oldmap->queryChild(i);
                 IHqlExpression * from = old->queryChild(0);
                 IHqlExpression * to = old->queryChild(1);
-                _ATOM name = from->queryName();
-                _ATOM mappedName = fieldMapFrom(map, name);
+                IIdAtom * name = from->queryId();
+                IIdAtom * mappedName = fieldMapFrom(map, name);
 
                 if (name == mappedName)
                     newmaps.append(*LINK(old));
                 else
-                    newmaps.append(*createComma(createAttribute(mappedName), LINK(to)));
+                    newmaps.append(*createComma(createId(mappedName), LINK(to)));
             }
             map->Release();
             IHqlExpression * newmap = createSortList(newmaps);
@@ -301,8 +303,8 @@ IHqlExpression* HqlGram::bindTemplateFunctionParameters(IHqlExpression* funcdef,
             actual = defaults->queryChild(idx);
             //MORE: rebind the parameter
         }
-        _ATOM parentModuleName = NULL;
-        newScope->defineSymbol(formal->queryName(),parentModuleName,actual,true,false,0);
+        IIdAtom * parentModuleName = NULL;
+        newScope->defineSymbol(formal->queryId(),parentModuleName,actual,true,false,0);
     }
 
     IHqlExpression* expr = reparseTemplateFunction(funcdef, newScope, lookupCtx, fieldMapUsed);

+ 1 - 1
ecl/hql/hqlesp.cpp

@@ -364,7 +364,7 @@ bool retrieveWebServicesInfo(IWorkUnit *workunit, HqlLookupContext & ctx)
     }
 
     //Names are currently stored case insensitively, we want the case sensitive variant.
-    OwnedHqlExpr s1 = ctx.queryRepository()->queryRootScope()->lookupSymbol(createIdentifierAtom(moduleName.str()), LSFpublic, ctx);
+    OwnedHqlExpr s1 = ctx.queryRepository()->queryRootScope()->lookupSymbol(createIdAtom(moduleName.str()), LSFpublic, ctx);
     if (s1 && s1->queryScope())
     {
         const char *caseSensitiveModuleName = s1->queryScope()->queryFullName();

文件差異過大導致無法顯示
+ 286 - 260
ecl/hql/hqlexpr.cpp


+ 71 - 68
ecl/hql/hqlexpr.hpp

@@ -98,7 +98,7 @@ protected:
 
 
 typedef ICopyArrayOf<IHqlExpression> HqlExprCopyArray;
-typedef class MapXToMyClass<_ATOM, _ATOM, _ATOM> KeywordMap;
+typedef class MapXToMyClass<IAtom *, IAtom *, IAtom *> KeywordMap;
 typedef ICopyArrayOf<IAtom> AtomArray;
 
 const unsigned UnadornedParameterIndex = (unsigned)-1;
@@ -351,7 +351,7 @@ enum _node_operator {
         no_delayedscope,
         no_assertconcrete,
         no_unboundselect,
-    no_unused23,
+        no_id,
     no_unused24,
         no_dataset_from_transform,
         no_childquery,
@@ -813,7 +813,7 @@ typedef IArrayOf<IECLError> IECLErrorArray;
 
 interface IHqlSimpleScope : public IInterface
 {
-    virtual IHqlExpression *lookupSymbol(_ATOM name) = 0;
+    virtual IHqlExpression *lookupSymbol(IIdAtom * name) = 0;
 };
 
 interface IHqlAlienTypeInfo : public IInterface
@@ -828,7 +828,7 @@ interface IHqlAlienTypeInfo : public IInterface
     virtual IHqlExpression * queryLoadFunction() = 0;
     virtual IHqlExpression * queryLengthFunction() = 0;
     virtual IHqlExpression * queryStoreFunction() = 0;
-    virtual IHqlExpression * queryFunction(_ATOM name) = 0;
+    virtual IHqlExpression * queryFunction(IIdAtom * name) = 0;
 };
 
 interface IFileContents : public IInterface
@@ -887,7 +887,7 @@ public:
     }
 
     void addForwardReference(IHqlScope * owner, IHasUnlinkedOwnerReference * child);
-    void noteBeginAttribute(IHqlScope * scope, IFileContents * contents, _ATOM name);
+    void noteBeginAttribute(IHqlScope * scope, IFileContents * contents, IIdAtom * name);
     void noteBeginModule(IHqlScope * scope, IFileContents * contents);
     void noteBeginQuery(IHqlScope * scope, IFileContents * contents);
     void noteEndAttribute();
@@ -949,8 +949,8 @@ public:
         functionCache = &parseCtx.defaultFunctionCache;
     }
 
-    void createDependencyEntry(IHqlScope * scope, _ATOM name);
-    void noteBeginAttribute(IHqlScope * scope, IFileContents * contents, _ATOM name);
+    void createDependencyEntry(IHqlScope * scope, IIdAtom * name);
+    void noteBeginAttribute(IHqlScope * scope, IFileContents * contents, IIdAtom * name);
     void noteBeginModule(IHqlScope * scope, IFileContents * contents);
     void noteBeginQuery(IHqlScope * scope, IFileContents * contents);
     inline void noteEndAttribute() { parseCtx.noteEndAttribute(); }
@@ -1011,10 +1011,11 @@ inline unsigned makeLookupFlags(bool sharedOK, bool ignoreBase, bool required)
 interface IHqlScope : public IInterface
 {
     virtual IHqlExpression * queryExpression() = 0;
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx) = 0;
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx) = 0;
 
-    virtual void    getSymbols(HqlExprArray& exprs) const= 0;
-    virtual _ATOM   queryName() const = 0;
+    virtual void getSymbols(HqlExprArray& exprs) const= 0;
+    virtual IAtom * queryName() const = 0;
+    virtual IIdAtom * queryId() const = 0;
     virtual const char * queryFullName() const = 0;
     virtual ISourcePath * querySourcePath() const = 0;
     virtual bool hasBaseClass(IHqlExpression * searchBase) = 0;
@@ -1027,22 +1028,22 @@ interface IHqlScope : public IInterface
 
     virtual bool isImplicit() const = 0;
     virtual bool isPlugin() const = 0;
-    virtual int getPropInt(_ATOM, int) const = 0;
-    virtual bool getProp(_ATOM, StringBuffer &) const = 0;
+    virtual int getPropInt(IAtom *, int) const = 0;
+    virtual bool getProp(IAtom *, StringBuffer &) const = 0;
 
     //IHqlCreateScope
-    virtual void defineSymbol(_ATOM name, _ATOM moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags, IFileContents *fc, int lineno, int column, int _startpos, int _bodypos, int _endpos) = 0;
-    virtual void defineSymbol(_ATOM name, _ATOM moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags) = 0;
+    virtual void defineSymbol(IIdAtom * name, IIdAtom * moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags, IFileContents *fc, int lineno, int column, int _startpos, int _bodypos, int _endpos) = 0;
+    virtual void defineSymbol(IIdAtom * name, IIdAtom * moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags) = 0;
     virtual void defineSymbol(IHqlExpression * expr) = 0;       // use with great care, expr must be a named symbol.
-    virtual void removeSymbol(_ATOM name) = 0;      // use with great care
+    virtual void removeSymbol(IIdAtom * name) = 0;      // use with great care
 };
 
 interface IEclSource;
 interface IHqlRemoteScope : public IInterface
 {
     virtual IHqlScope * queryScope() = 0;
-    virtual void setProp(_ATOM, const char *) = 0;
-    virtual void setProp(_ATOM, int) = 0;
+    virtual void setProp(IAtom *, const char *) = 0;
+    virtual void setProp(IAtom *, int) = 0;
     virtual IEclSource * queryEclSource() const = 0;
 };
 
@@ -1062,7 +1063,8 @@ interface IHqlAnnotation;
 class HQL_API CUsedTablesBuilder;
 interface IHqlExpression : public IInterface
 {
-    virtual _ATOM queryName() const = 0;
+    virtual IAtom * queryName() const = 0;
+    virtual IIdAtom * queryId() const = 0;
     virtual node_operator getOperator() const = 0;
     virtual bool isBoolean() = 0;
     virtual bool isDataset() = 0;
@@ -1089,7 +1091,7 @@ interface IHqlExpression : public IInterface
     virtual unsigned getInfoFlags2() const = 0;
 
     virtual ISourcePath * querySourcePath() const = 0;
-    virtual _ATOM queryFullModuleName() const = 0;              // only defined for a named symbol
+    virtual IIdAtom * queryFullModuleId() const = 0;              // only defined for a named symbol
     virtual int  getStartLine() const = 0;
     virtual int  getStartColumn() const = 0;
     virtual IPropertyTree * getDocumentation() const = 0;
@@ -1114,8 +1116,8 @@ interface IHqlExpression : public IInterface
     virtual IHqlExpression *queryExternalDefinition() const = 0;
     virtual IHqlExpression *queryNormalizedSelector(bool skipIndex=false) = 0;
 
-    virtual IHqlExpression *queryProperty(_ATOM propName) const = 0;
-    virtual IHqlExpression *queryAttribute(_ATOM propName) = 0;
+    virtual IHqlExpression *queryProperty(IAtom * propName) const = 0;
+    virtual IHqlExpression *queryAttribute(IAtom * propName) = 0;
 
     virtual ITypeInfo *queryRecordType() = 0;
     virtual IHqlExpression *queryRecord() = 0;
@@ -1158,7 +1160,7 @@ interface IHqlExpression : public IInterface
     inline bool isAnnotation() const { return getAnnotationKind() != annotate_none; }
     inline bool isNamedSymbol() const { return getAnnotationKind() == annotate_symbol; }
     inline bool isFunctionDefinition() const { return getOperator() == no_funcdef; }
-    inline bool hasProperty(_ATOM propName) const { return queryProperty(propName) != NULL; }
+    inline bool hasProperty(IAtom * propName) const { return queryProperty(propName) != NULL; }
     inline bool hasText() const 
     { 
         IFileContents * contents = queryDefinitionText();
@@ -1179,7 +1181,7 @@ interface IHqlAnnotation : public IInterface
 interface IHqlNamedAnnotation : public IHqlAnnotation
 {
     virtual IFileContents * getBodyContents() = 0;
-    virtual IHqlExpression * cloneSymbol(_ATOM optname, IHqlExpression * optnewbody, IHqlExpression * optnewfuncdef, HqlExprArray * optargs) = 0;
+    virtual IHqlExpression * cloneSymbol(IIdAtom * optname, IHqlExpression * optnewbody, IHqlExpression * optnewfuncdef, HqlExprArray * optargs) = 0;
     virtual bool isExported() const = 0;
     virtual bool isShared() const = 0;
     virtual bool isPublic() const = 0;
@@ -1207,8 +1209,9 @@ extern HQL_API const char *getOpString(node_operator op);
 extern HQL_API IHqlExpression *createValue(node_operator op);
 extern HQL_API IHqlExpression *createValue(node_operator op, IHqlExpression *p1, IHqlExpression *p2);
 extern HQL_API IHqlExpression *createOpenValue(node_operator op, ITypeInfo *type);
-extern HQL_API IHqlExpression *createOpenNamedValue(node_operator op, ITypeInfo *type, _ATOM name);
-extern HQL_API IHqlExpression *createNamedValue(node_operator op, ITypeInfo *type, _ATOM name, HqlExprArray & args);
+extern HQL_API IHqlExpression *createOpenNamedValue(node_operator op, ITypeInfo *type, IIdAtom * id);
+extern HQL_API IHqlExpression *createNamedValue(node_operator op, ITypeInfo *type, IIdAtom * id, HqlExprArray & args);
+extern HQL_API IHqlExpression *createId(IIdAtom * id);
 
 extern HQL_API IHqlExpression *createValue(node_operator op, ITypeInfo * type);
 extern HQL_API IHqlExpression *createValue(node_operator op, ITypeInfo * type, IHqlExpression *p1);
@@ -1231,8 +1234,8 @@ extern HQL_API IHqlExpression *createWrapper(node_operator op, ITypeInfo * type,
 //This doesn't consume its argument!
 extern HQL_API IHqlExpression *createWrappedExpr(IHqlExpression * expr, node_operator op, HqlExprArray & args);
 
-extern HQL_API IHqlExpression *createAlienType(_ATOM, IHqlScope *);
-extern HQL_API IHqlExpression *createAlienType(_ATOM name, IHqlScope * scope, HqlExprArray &newkids, IHqlExpression * funcdef=NULL);
+extern HQL_API IHqlExpression *createAlienType(IIdAtom *, IHqlScope *);
+extern HQL_API IHqlExpression *createAlienType(IIdAtom * name, IHqlScope * scope, HqlExprArray &newkids, IHqlExpression * funcdef=NULL);
 extern HQL_API IHqlExpression *createEnumType(ITypeInfo * _type, IHqlScope *_scope);
 
 extern HQL_API IHqlExpression *createBoolExpr(node_operator op, IHqlExpression *p1);
@@ -1244,8 +1247,8 @@ extern HQL_API IHqlExpression *createList(node_operator op, ITypeInfo *type, IHq
 extern HQL_API IHqlExpression *createBinaryList(node_operator op, HqlExprArray & args);
 extern HQL_API IHqlExpression *createLeftBinaryList(node_operator op, HqlExprArray & args);
 
-extern HQL_API IHqlExpression *createField(_ATOM name, ITypeInfo *type, IHqlExpression *defaultValue, IHqlExpression *attrs=NULL);
-extern HQL_API IHqlExpression *createField(IAtom *name, ITypeInfo *type, HqlExprArray & args);
+extern HQL_API IHqlExpression *createField(IIdAtom * name, ITypeInfo *type, IHqlExpression *defaultValue, IHqlExpression *attrs=NULL);
+extern HQL_API IHqlExpression *createField(IIdAtom *name, ITypeInfo *type, HqlExprArray & args);
 extern HQL_API IHqlExpression *createConstant(bool constant);
 extern HQL_API IHqlExpression *createConstant(__int64 constant);
 extern HQL_API IHqlExpression *createConstant(const char *constant);
@@ -1265,13 +1268,13 @@ extern HQL_API IHqlExpression *createRow(node_operator op, HqlExprArray & args);
 extern HQL_API IHqlExpression *createRowF(node_operator op, ...);
 extern HQL_API IHqlExpression *createRecord();
 extern HQL_API IHqlExpression *createRecord(const HqlExprArray & fields);
-extern HQL_API IHqlExpression *createExternalReference(_ATOM name, ITypeInfo *_type, IHqlExpression *props);
-extern HQL_API IHqlExpression *createExternalReference(_ATOM name, ITypeInfo *_type, HqlExprArray & attributes);
+extern HQL_API IHqlExpression *createExternalReference(IIdAtom * name, ITypeInfo *_type, IHqlExpression *props);
+extern HQL_API IHqlExpression *createExternalReference(IIdAtom * name, ITypeInfo *_type, HqlExprArray & attributes);
 HQL_API IHqlExpression * createExternalFuncdefFromInternal(IHqlExpression * funcdef);
 extern HQL_API IHqlExpression *createBoundFunction(IErrorReceiver * errors, IHqlExpression *func, HqlExprArray & ownedActuals, HqlExprArray * functionCache, bool forceExpansion);
 extern HQL_API IHqlExpression *createReboundFunction(IHqlExpression *func, HqlExprArray & ownedActuals);
 extern HQL_API IHqlExpression *createTranslatedExternalCall(IErrorReceiver * errors, IHqlExpression *func, HqlExprArray &actuals);
-extern HQL_API IHqlExpression *createParameter(_ATOM name, unsigned idx, ITypeInfo *type, HqlExprArray & args);
+extern HQL_API IHqlExpression *createParameter(IIdAtom * name, unsigned idx, ITypeInfo *type, HqlExprArray & args);
 extern HQL_API IHqlExpression *createDatasetFromRow(IHqlExpression * ownedRow);
 extern HQL_API IHqlExpression * createTypedValue(node_operator op, ITypeInfo * type, HqlExprArray & args);
 extern HQL_API IHqlExpression * createTypeTransfer(IHqlExpression * expr, ITypeInfo * newType);     //arguments must be linked
@@ -1281,19 +1284,19 @@ extern HQL_API void expandDelayedFunctionCalls(IErrorReceiver * errors, HqlExprA
 
 extern HQL_API IHqlExpression *createQuoted(const char * name, ITypeInfo *type);
 extern HQL_API IHqlExpression *createVariable(const char * name, ITypeInfo *type);
-extern HQL_API IHqlExpression * createSymbol(_ATOM name, IHqlExpression *expr, unsigned exportFlags);
-extern HQL_API IHqlExpression * createSymbol(_ATOM _name, _ATOM _module, IHqlExpression *_expr, bool _exported, bool _shared, unsigned _flags);
-extern HQL_API IHqlExpression * createSymbol(_ATOM _name, _ATOM moduleName, IHqlExpression *expr, IHqlExpression * funcdef,
+extern HQL_API IHqlExpression * createSymbol(IIdAtom * name, IHqlExpression *expr, unsigned exportFlags);
+extern HQL_API IHqlExpression * createSymbol(IIdAtom * _name, IIdAtom * _module, IHqlExpression *_expr, bool _exported, bool _shared, unsigned _flags);
+extern HQL_API IHqlExpression * createSymbol(IIdAtom * _name, IIdAtom * moduleName, IHqlExpression *expr, IHqlExpression * funcdef,
                                              bool exported, bool shared, unsigned symbolFlags,
                                              IFileContents *fc, int lineno, int column, int _startpos, int _bodypos, int _endpos);
-extern HQL_API IHqlExpression *createAttribute(_ATOM name, IHqlExpression * value = NULL, IHqlExpression * value2 = NULL, IHqlExpression * value3 = NULL);
-extern HQL_API IHqlExpression *createAttribute(_ATOM name, HqlExprArray & args);
-extern HQL_API IHqlExpression *createExprAttribute(_ATOM name, IHqlExpression * value = NULL, IHqlExpression * value2 = NULL, IHqlExpression * value3 = NULL);
-extern HQL_API IHqlExpression *createExprAttribute(_ATOM name, HqlExprArray & args);
-extern HQL_API IHqlExpression *createLinkAttribute(_ATOM name, IHqlExpression * value = NULL, IHqlExpression * value2 = NULL, IHqlExpression * value3 = NULL);
-extern HQL_API IHqlExpression *createLinkAttribute(_ATOM name, HqlExprArray & args);
-extern HQL_API IHqlExpression *createUnknown(node_operator op, ITypeInfo * type, _ATOM name, IInterface * value);
-extern HQL_API IHqlExpression *createSequence(node_operator op, ITypeInfo * type, _ATOM name, unsigned __int64 value);
+extern HQL_API IHqlExpression *createAttribute(IAtom * name, IHqlExpression * value = NULL, IHqlExpression * value2 = NULL, IHqlExpression * value3 = NULL);
+extern HQL_API IHqlExpression *createAttribute(IAtom * name, HqlExprArray & args);
+extern HQL_API IHqlExpression *createExprAttribute(IAtom * name, IHqlExpression * value = NULL, IHqlExpression * value2 = NULL, IHqlExpression * value3 = NULL);
+extern HQL_API IHqlExpression *createExprAttribute(IAtom * name, HqlExprArray & args);
+extern HQL_API IHqlExpression *createLinkAttribute(IAtom * name, IHqlExpression * value = NULL, IHqlExpression * value2 = NULL, IHqlExpression * value3 = NULL);
+extern HQL_API IHqlExpression *createLinkAttribute(IAtom * name, HqlExprArray & args);
+extern HQL_API IHqlExpression *createUnknown(node_operator op, ITypeInfo * type, IAtom * name, IInterface * value);
+extern HQL_API IHqlExpression *createSequence(node_operator op, ITypeInfo * type, IAtom * name, unsigned __int64 value);
 extern HQL_API IHqlExpression *createCompareExpr(node_operator op, IHqlExpression * l, IHqlExpression * r);
 extern HQL_API IHqlExpression * createAliasOwn(IHqlExpression * expr, IHqlExpression * attr);
 inline IHqlExpression * createAlias(IHqlExpression * expr, IHqlExpression * attr) { return createAliasOwn(LINK(expr), LINK(attr)); }
@@ -1397,14 +1400,14 @@ extern HQL_API IHqlScope *createConcreteScope();
 extern HQL_API IHqlScope *createForwardScope(IHqlScope * parentScope, HqlGramCtx * parentCtx, HqlParseContext & parseCtx);
 extern HQL_API IHqlScope *createLibraryScope();
 extern HQL_API IHqlScope *createVirtualScope();
-extern HQL_API IHqlScope* createVirtualScope(_ATOM name, const char * fullName);
+extern HQL_API IHqlScope* createVirtualScope(IIdAtom * name, const char * fullName);
 extern HQL_API IHqlScope *createScope(node_operator op);
 extern HQL_API IHqlScope *createScope(IHqlScope * scope);
 extern HQL_API IHqlScope *createPrivateScope();
 extern HQL_API IHqlScope *createPrivateScope(IHqlScope * scope);
 extern HQL_API IHqlExpression * createDelayedScope(IHqlExpression * expr);
 extern HQL_API IHqlExpression * createDelayedScope(HqlExprArray &newkids);
-extern HQL_API IHqlRemoteScope *createRemoteScope(_ATOM name, const char * fullName, IEclRepositoryCallback *ds, IProperties* props, IFileContents * _text, bool lazy, IEclSource * eclSource);
+extern HQL_API IHqlRemoteScope *createRemoteScope(IIdAtom * name, const char * fullName, IEclRepositoryCallback *ds, IProperties* props, IFileContents * _text, bool lazy, IEclSource * eclSource);
 extern HQL_API IHqlExpression * populateScopeAndClose(IHqlScope * scope, const HqlExprArray & children, const HqlExprArray & symbols);
 
 extern HQL_API IHqlExpression* createTemplateFunctionContext(IHqlExpression* body, IHqlScope* helperScope);
@@ -1421,8 +1424,8 @@ extern HQL_API bool isFullJoin(IHqlExpression * expr);
 extern HQL_API bool isLeftJoin(IHqlExpression * expr);
 extern HQL_API bool isRightJoin(IHqlExpression * expr);
 extern HQL_API bool isSimpleInnerJoin(IHqlExpression * expr);
-extern HQL_API _ATOM queryJoinKind(IHqlExpression * expr);
-inline bool isSpecificJoin(IHqlExpression * expr, _ATOM leftRightKind) { return queryJoinKind(expr) == leftRightKind; }
+extern HQL_API IAtom * queryJoinKind(IHqlExpression * expr);
+inline bool isSpecificJoin(IHqlExpression * expr, IAtom * leftRightKind) { return queryJoinKind(expr) == leftRightKind; }
 
 extern HQL_API bool isLimitedJoin(IHqlExpression * expr);
 extern HQL_API bool isGroupedActivity(IHqlExpression * expr);
@@ -1439,23 +1442,23 @@ extern HQL_API void unlockTransformMutex();
 extern HQL_API void PrintLogExprTree(IHqlExpression *expr, const char *caption = NULL, bool full = false);
 
 extern HQL_API IHqlExpression *doInstantEclTransformations(IHqlExpression *qquery, unsigned limit);
-//extern HQL_API void loadImplicitScopes(IEclRepository &dataServer, HqlScopeArray &defualtScopes, int suppress, _ATOM suppressName);
+//extern HQL_API void loadImplicitScopes(IEclRepository &dataServer, HqlScopeArray &defualtScopes, int suppress, IIdAtom * suppressName);
 
 extern HQL_API unsigned getExpressionCRC(IHqlExpression * expr);
-extern HQL_API IHqlExpression * queryPropertyInList(_ATOM search, IHqlExpression * cur);
-extern HQL_API IHqlExpression * queryProperty(_ATOM search, const HqlExprArray & exprs);
+extern HQL_API IHqlExpression * queryPropertyInList(IAtom * search, IHqlExpression * cur);
+extern HQL_API IHqlExpression * queryProperty(IAtom * search, const HqlExprArray & exprs);
 extern HQL_API IHqlExpression * queryAnnotation(IHqlExpression * expr, annotate_kind search);       // return first match
 extern HQL_API IHqlNamedAnnotation * queryNameAnnotation(IHqlExpression * expr);
 
 inline bool hasAnnotation(IHqlExpression * expr, annotate_kind search){ return queryAnnotation(expr, search) != NULL; }
 inline IHqlExpression * queryNamedSymbol(IHqlExpression * expr) { return queryAnnotation(expr, annotate_symbol); }
 inline bool hasNamedSymbol(IHqlExpression * expr) { return hasAnnotation(expr, annotate_symbol); }
-inline bool hasProperty(_ATOM search, HqlExprArray & exprs) { return queryProperty(search, exprs) != NULL; }
+inline bool hasProperty(IAtom * search, HqlExprArray & exprs) { return queryProperty(search, exprs) != NULL; }
 
-extern HQL_API IHqlExpression * queryAnnotationProperty(_ATOM search, IHqlExpression * annotation);
-extern HQL_API IHqlExpression * queryMetaProperty(_ATOM search, IHqlExpression * expr);
-extern HQL_API void gatherMetaProperties(HqlExprArray & matches, _ATOM search, IHqlExpression * expr);
-extern HQL_API void gatherMetaProperties(HqlExprCopyArray & matches, _ATOM search, IHqlExpression * expr);
+extern HQL_API IHqlExpression * queryAnnotationProperty(IAtom * search, IHqlExpression * annotation);
+extern HQL_API IHqlExpression * queryMetaProperty(IAtom * search, IHqlExpression * expr);
+extern HQL_API void gatherMetaProperties(HqlExprArray & matches, IAtom * search, IHqlExpression * expr);
+extern HQL_API void gatherMetaProperties(HqlExprCopyArray & matches, IAtom * search, IHqlExpression * expr);
 
 extern HQL_API IHqlExpression * queryLocation(IHqlExpression * expr);
 extern HQL_API void gatherLocations(HqlExprCopyArray & matches, IHqlExpression * expr);
@@ -1468,7 +1471,7 @@ extern HQL_API IHqlExpression * cloneMissingAnnotations(IHqlExpression * donor,
 extern HQL_API IHqlExpression * forceCloneSymbol(IHqlExpression * donor, IHqlExpression * expr);
 
 // donor must be a symbol.  Any of the other arguments can be null to inherit the existing values
-extern HQL_API IHqlExpression * cloneSymbol(IHqlExpression * donor, _ATOM optnewname, IHqlExpression * optnewbody, IHqlExpression * optnewfuncdef, HqlExprArray * optoperands);
+extern HQL_API IHqlExpression * cloneSymbol(IHqlExpression * donor, IIdAtom * optnewname, IHqlExpression * optnewbody, IHqlExpression * optnewfuncdef, HqlExprArray * optoperands);
 
 extern HQL_API IHqlExpression * queryOperatorInList(node_operator search, IHqlExpression * cur);
 extern HQL_API IHqlExpression * queryOperator(node_operator search, const HqlExprArray & args);
@@ -1477,7 +1480,7 @@ extern HQL_API IHqlExpression * queryTable(IHqlExpression * dataset);
 extern HQL_API node_operator queryTableMode(IHqlExpression * expr);
 
 // Code for producing simplified records that the file viewer can cope with
-extern HQL_API ITypeInfo * getSimplifiedType(ITypeInfo * type, bool isConditional, bool isSerialized, _ATOM serialForm);
+extern HQL_API ITypeInfo * getSimplifiedType(ITypeInfo * type, bool isConditional, bool isSerialized, IAtom * serialForm);
 extern HQL_API IHqlExpression * getFileViewerRecord(IHqlExpression * record, bool isKey);
 extern HQL_API IHqlExpression * getRecordMappingTransform(node_operator op, IHqlExpression * tgt, IHqlExpression * src, IHqlExpression * sourceSelector);
 extern HQL_API IHqlExpression * getSimplifiedTransform(IHqlExpression * tgt, IHqlExpression * src, IHqlExpression * sourceSelector);
@@ -1494,7 +1497,7 @@ extern HQL_API void unwindCopyList(HqlExprCopyArray &dst, IHqlExpression * expr,
 extern HQL_API void unwindCommaCompound(HqlExprArray & target, IHqlExpression * expr);
 extern HQL_API void unwindRecordAsSelects(HqlExprArray & children, IHqlExpression * record, IHqlExpression * ds, unsigned max = (unsigned)-1);
 extern HQL_API unsigned unwoundCount(IHqlExpression * expr, node_operator op);
-extern HQL_API void unwindProperty(HqlExprArray & args, IHqlExpression * expr, _ATOM name);
+extern HQL_API void unwindProperty(HqlExprArray & args, IHqlExpression * expr, IAtom * name);
 extern HQL_API IHqlExpression * queryChildOperator(node_operator op, IHqlExpression * expr);
 extern HQL_API IHqlExpression * createSelector(node_operator op, IHqlExpression * ds, IHqlExpression * seq);
 extern HQL_API IHqlExpression * createUniqueId();
@@ -1514,8 +1517,8 @@ extern HQL_API bool isActivityIndependentOfScope(IHqlExpression * expr);
 extern HQL_API bool exprReferencesDataset(IHqlExpression * expr, IHqlExpression * dataset);
 extern HQL_API bool canEvaluateInScope(const HqlExprCopyArray & activeScopes, IHqlExpression * expr);
 extern HQL_API bool canEvaluateInScope(const HqlExprCopyArray & activeScopes, const HqlExprCopyArray & required);
-extern HQL_API IHqlExpression * ensureDeserialized(IHqlExpression * expr, ITypeInfo * type, _ATOM serialForm);
-extern HQL_API IHqlExpression * ensureSerialized(IHqlExpression * expr, _ATOM serialForm);
+extern HQL_API IHqlExpression * ensureDeserialized(IHqlExpression * expr, ITypeInfo * type, IAtom * serialForm);
+extern HQL_API IHqlExpression * ensureSerialized(IHqlExpression * expr, IAtom * serialForm);
 extern HQL_API bool isDummySerializeDeserialize(IHqlExpression * expr);
 
 extern HQL_API unsigned getRepeatMax(IHqlExpression * expr);
@@ -1527,7 +1530,7 @@ extern HQL_API IHqlExpression * getActiveTableSelector();
 extern HQL_API IHqlExpression * queryActiveTableSelector();
 extern HQL_API IHqlExpression * getSelf(IHqlExpression * ds);
 extern HQL_API IHqlExpression * querySelfReference();
-extern HQL_API bool removeProperty(HqlExprArray & args, _ATOM name);
+extern HQL_API bool removeProperty(HqlExprArray & args, IAtom * name);
 extern HQL_API void removeProperties(HqlExprArray & args);
 
 extern HQL_API bool isChildRelationOf(IHqlExpression * child, IHqlExpression * other);
@@ -1582,7 +1585,7 @@ extern HQL_API IHqlExpression * querySelectorDataset(IHqlExpression * select, bo
 extern HQL_API IHqlExpression * replaceSelectorDataset(IHqlExpression * expr, IHqlExpression * newDataset);
 extern HQL_API IHqlExpression * querySkipDatasetMeta(IHqlExpression * dataset);
 extern HQL_API bool isNewSelector(IHqlExpression * expr);
-extern HQL_API IHqlExpression * queryRecordProperty(IHqlExpression * record, _ATOM name);
+extern HQL_API IHqlExpression * queryRecordProperty(IHqlExpression * record, IAtom * name);
 extern HQL_API bool isExported(IHqlExpression * expr);
 extern HQL_API bool isShared(IHqlExpression * expr);
 extern HQL_API bool isImport(IHqlExpression * expr);
@@ -1594,7 +1597,7 @@ extern HQL_API bool isPublicSymbol(IHqlExpression * expr);
 extern HQL_API ITypeInfo * getSumAggType(IHqlExpression * arg);
 extern HQL_API ITypeInfo * getSumAggType(ITypeInfo * argType);
 
-extern HQL_API bool getProperty(IHqlExpression * expr, _ATOM propName, StringBuffer & ret);
+extern HQL_API bool getProperty(IHqlExpression * expr, IAtom * propName, StringBuffer & ret);
 
 extern HQL_API bool filterIsKeyed(IHqlExpression * expr);
 extern HQL_API bool filterIsUnkeyed(IHqlExpression * expr);
@@ -1603,7 +1606,7 @@ extern HQL_API bool isTrivialDataset(IHqlExpression * expr);
 extern HQL_API bool isInlineTrivialDataset(IHqlExpression * expr);
 extern HQL_API void gatherChildTablesUsed(HqlExprCopyArray * newScope, HqlExprCopyArray * inScope, IHqlExpression * expr, unsigned firstChild);
 extern HQL_API IHqlScope * closeScope(IHqlScope * scope);
-extern HQL_API _ATOM queryPatternName(IHqlExpression * expr);
+extern HQL_API IIdAtom * queryPatternName(IHqlExpression * expr);
 extern HQL_API IHqlExpression * closeAndLink(IHqlExpression * expr);
 extern HQL_API IHqlExpression * createAbstractRecord(IHqlExpression * record);
 extern HQL_API IHqlExpression * createSortList(HqlExprArray & elements);
@@ -1787,8 +1790,8 @@ extern HQL_API void displayHqlCacheStats();
 inline bool isInScope(IHqlExpression * e)       { return e == e->queryNormalizedSelector(); }
 inline int boolToInt(bool x)                    { return x ? 1 : 0; }
 
-extern HQL_API IHqlExpression * createFunctionDefinition(_ATOM name, IHqlExpression * value, IHqlExpression * parms, IHqlExpression * defaults, IHqlExpression * attrs);
-extern HQL_API IHqlExpression * createFunctionDefinition(_ATOM name, HqlExprArray & args);
+extern HQL_API IHqlExpression * createFunctionDefinition(IIdAtom * name, IHqlExpression * value, IHqlExpression * parms, IHqlExpression * defaults, IHqlExpression * attrs);
+extern HQL_API IHqlExpression * createFunctionDefinition(IIdAtom * name, HqlExprArray & args);
 extern HQL_API IHqlExpression * queryNonDelayedBaseAttribute(IHqlExpression * expr);
 extern HQL_API void gatherWarnings(IErrorReceiver * errs, IHqlExpression * expr);
 
@@ -1827,13 +1830,13 @@ extern HQL_API IFileContents * createFileContentsFromFile(const char * filename,
 extern HQL_API IFileContents * createFileContentsSubset(IFileContents * contents, size32_t offset, size32_t len);
 extern HQL_API IFileContents * createFileContents(IFile * file, ISourcePath * sourcePath);
 
-void addForwardDefinition(IHqlScope * scope, _ATOM symbolName, _ATOM moduleName, IFileContents * contents,
+void addForwardDefinition(IHqlScope * scope, IIdAtom * symbolName, IIdAtom * moduleName, IFileContents * contents,
                           unsigned symbolFlags, bool isExported, unsigned startLine, unsigned startColumn);
 
 extern HQL_API IPropertyTree * createAttributeArchive();
 extern HQL_API void ensureSymbolsDefined(IHqlExpression * scope, HqlLookupContext & ctx);
 extern HQL_API void ensureSymbolsDefined(IHqlScope * scope, HqlLookupContext & ctx);
-extern HQL_API bool getBoolProperty(IHqlExpression * expr, _ATOM name, bool dft=false);
+extern HQL_API bool getBoolProperty(IHqlExpression * expr, IAtom * name, bool dft=false);
 
 extern HQL_API void setLegacyEclSemantics(bool _value);
 extern HQL_API bool queryLegacyEclSemantics();

+ 154 - 143
ecl/hql/hqlexpr.ipp

@@ -48,7 +48,7 @@ class HQL_API CHqlDynamicAttribute
 {
     friend class CHqlExpression;
 public:
-    inline CHqlDynamicAttribute(_ATOM _name, IHqlExpression *_value)
+    inline CHqlDynamicAttribute(IAtom * _name, IHqlExpression *_value)
         : name(_name), value(_value)
     {
         next = NULL;
@@ -56,7 +56,7 @@ public:
     ~CHqlDynamicAttribute() { delete next; }
 
 protected:
-    _ATOM name;
+    IAtom * name;
     CHqlDynamicAttribute * next;
     LinkedHqlExpr value;
 };
@@ -167,7 +167,7 @@ protected:
         operands.append(child);
         onAppendOperand(child, which);
     }
-    IHqlExpression * queryExistingAttribute(_ATOM propName) const;
+    IHqlExpression * queryExistingAttribute(IAtom * propName) const;
 
     void initFlagsBeforeOperands();
     void updateFlagsAfterOperands();
@@ -177,7 +177,7 @@ protected:
     virtual unsigned getCachedEclCRC();
     void setInitialHash(unsigned typeHash);
 
-    void addAttribute(_ATOM name, IHqlExpression * value);
+    void addAttribute(IAtom * name, IHqlExpression * value);
 
 public:
     virtual void Link(void) const;
@@ -187,13 +187,14 @@ public:
 
     virtual bool isExprClosed() const { return hashcode!=0; }
     virtual bool isFullyBound() const { return fullyBound(); };
-    virtual _ATOM queryName() const { return NULL; }
+    virtual IAtom * queryName() const { return NULL; }
+    virtual IIdAtom * queryId() const;
     virtual node_operator getOperator() const { return op; }
     virtual IHqlDataset *queryDataset() { return NULL; };
     virtual IHqlScope *queryScope();
     virtual IHqlSimpleScope *querySimpleScope();
-    virtual IHqlExpression *queryProperty(_ATOM propName) const;
-    virtual IHqlExpression *queryAttribute(_ATOM propName);
+    virtual IHqlExpression *queryProperty(IAtom * propName) const;
+    virtual IHqlExpression *queryAttribute(IAtom * propName);
     virtual IHqlExpression *queryFunctionDefinition() const { return NULL; };
     virtual IHqlExpression *queryExternalDefinition() const { return NULL; };
     virtual unsigned getInfoFlags() const { return infoFlags; }
@@ -239,7 +240,7 @@ public:
     virtual IHqlExpression * cloneAllAnnotations(IHqlExpression * body) { return LINK(body); }
     virtual void unwindList(HqlExprArray &dst, node_operator);
 
-    virtual _ATOM           queryFullModuleName() const { return NULL; }
+    virtual IIdAtom *           queryFullModuleId() const { return NULL; }
     virtual ISourcePath *   querySourcePath() const { return NULL; }
 
     virtual IInterface *    queryTransformExtra();
@@ -324,23 +325,23 @@ protected:
 
 class CHqlNamedExpression : public CHqlExpressionWithType
 {
-    friend HQL_API IHqlExpression *createOpenNamedValue(node_operator op, ITypeInfo *type, _ATOM name);
-    friend HQL_API IHqlExpression *createNamedValue(node_operator op, ITypeInfo *type, _ATOM name, HqlExprArray & args);
+    friend HQL_API IHqlExpression *createOpenNamedValue(node_operator op, ITypeInfo *type, IIdAtom * id);
+    friend HQL_API IHqlExpression *createNamedValue(node_operator op, ITypeInfo *type, IIdAtom * id, HqlExprArray & args);
 
 protected:
-    _ATOM name;
+    IIdAtom * id;
 
 protected:
-    CHqlNamedExpression(node_operator _op, ITypeInfo *_type, _ATOM _name, ...);
-    CHqlNamedExpression(node_operator _op, ITypeInfo *_type, _ATOM _name, HqlExprArray & _ownedOperands);
+    CHqlNamedExpression(node_operator _op, ITypeInfo *_type, IIdAtom * _id, ...);
+    CHqlNamedExpression(node_operator _op, ITypeInfo *_type, IIdAtom * _id, HqlExprArray & _ownedOperands);
 
     virtual void sethash();
     virtual bool                equals(const IHqlExpression & other) const;
 
 public:
     virtual IHqlExpression *clone(HqlExprArray &newkids);
-    virtual _ATOM queryName() const { return name; }
-
+    virtual IAtom * queryName() const { return id->lower(); }
+    virtual IIdAtom * queryId() const { return id; }
 };
 
 
@@ -471,7 +472,8 @@ public:
 //Following are redirected to body
     virtual ITypeInfo *queryType() const;
     virtual ITypeInfo *getType();
-    virtual _ATOM queryName() const;
+    virtual IAtom * queryName() const;
+    virtual IIdAtom * queryId() const;
     virtual bool isScope();
     virtual bool isType();
     virtual bool isConstant();
@@ -501,12 +503,12 @@ public:
     virtual IHqlExpression *queryFunctionDefinition() const;
     virtual IHqlExpression *queryExternalDefinition() const;
     virtual IHqlExpression *queryNormalizedSelector(bool skipIndex=false);
-    virtual IHqlExpression *queryProperty(_ATOM propName) const;
-    virtual IHqlExpression *queryAttribute(_ATOM propName);
+    virtual IHqlExpression *queryProperty(IAtom * propName) const;
+    virtual IHqlExpression *queryAttribute(IAtom * propName);
     virtual IHqlExpression * clone(HqlExprArray &);
     virtual IHqlExpression * cloneAnnotation(IHqlExpression * body) = 0;
     virtual IHqlExpression * cloneAllAnnotations(IHqlExpression * body);
-    virtual _ATOM               queryFullModuleName() const;
+    virtual IIdAtom * queryFullModuleId() const;
     virtual bool isFullyBound() const;
     virtual IHqlExpression *addOperand(IHqlExpression *);
     virtual StringBuffer& getTextBuf(StringBuffer& buf);
@@ -527,8 +529,9 @@ class HQL_API CHqlSymbolAnnotation : public CHqlAnnotation, public IHqlNamedAnno
 public:
     IMPLEMENT_IINTERFACE_USING(CHqlAnnotation)
 
-    virtual _ATOM queryName() const { return name; }
-    virtual _ATOM queryFullModuleName() const { return module; }
+    virtual IAtom * queryName() const { return id->lower(); }
+    virtual IIdAtom * queryId() const { return id; }
+    virtual IIdAtom * queryFullModuleId() const { return moduleId; }
     virtual IHqlExpression *queryFunctionDefinition() const;
     virtual unsigned getSymbolFlags() const;
 
@@ -547,14 +550,14 @@ public:
     virtual void setRepositoryFlags(unsigned _flags) { symbolFlags |= (_flags & ob_registryflags); }
 
 protected:
-    CHqlSymbolAnnotation(_ATOM _name, _ATOM _module, IHqlExpression *_expr, IHqlExpression *_funcdef, unsigned _obFlags);
+    CHqlSymbolAnnotation(IIdAtom * _id, IIdAtom * _moduleId, IHqlExpression *_expr, IHqlExpression *_funcdef, unsigned _obFlags);
     ~CHqlSymbolAnnotation();
 
     virtual void sethash();
 
 protected:
-    _ATOM name;
-    _ATOM module;
+    IIdAtom * id;
+    IIdAtom * moduleId;
     IHqlExpression *funcdef;
     unsigned symbolFlags;
 };
@@ -562,11 +565,11 @@ protected:
 class HQL_API CHqlSimpleSymbol : public CHqlSymbolAnnotation
 {
 public:
-    static IHqlExpression * makeSymbol(_ATOM _name, _ATOM _module, IHqlExpression *_expr, IHqlExpression *_funcdef, unsigned _obFlags);
+    static IHqlExpression * makeSymbol(IIdAtom * _id, IIdAtom * _moduleId, IHqlExpression *_expr, IHqlExpression *_funcdef, unsigned _obFlags);
 
 //interface IHqlNamedAnnotation
     virtual IFileContents * getBodyContents() { return NULL; }
-    virtual IHqlExpression * cloneSymbol(_ATOM optname, IHqlExpression * optnewbody, IHqlExpression * optnewfuncdef, HqlExprArray * optargs);
+    virtual IHqlExpression * cloneSymbol(IIdAtom * optname, IHqlExpression * optnewbody, IHqlExpression * optnewfuncdef, HqlExprArray * optargs);
     virtual int getStartLine() const { return 0; }
     virtual int getStartColumn() const { return 0; }
     virtual int getStartPos() const { return 0; }
@@ -574,14 +577,14 @@ public:
     virtual int getEndPos() const { return 0; }
 
 protected:
-    CHqlSimpleSymbol(_ATOM _name, _ATOM _module, IHqlExpression *_expr, IHqlExpression *_funcdef, unsigned _obFlags);
+    CHqlSimpleSymbol(IIdAtom * _id, IIdAtom * _module, IHqlExpression *_expr, IHqlExpression *_funcdef, unsigned _obFlags);
 };
 
 class HQL_API CHqlNamedSymbol: public CHqlSymbolAnnotation
 {
 public:
-    static CHqlNamedSymbol *makeSymbol(_ATOM _name, _ATOM _module, IHqlExpression *_expr, bool _exported, bool _shared, unsigned _flags);
-    static CHqlNamedSymbol *makeSymbol(_ATOM _name, _ATOM _module, IHqlExpression *_expr, IHqlExpression *_funcdef, bool _exported, bool _shared, unsigned _flags, IFileContents *_text, int lineno, int column, int _startpos, int _bodypos, int _endpos);
+    static CHqlNamedSymbol *makeSymbol(IIdAtom * _id, IIdAtom * _module, IHqlExpression *_expr, bool _exported, bool _shared, unsigned _flags);
+    static CHqlNamedSymbol *makeSymbol(IIdAtom * _id, IIdAtom * _module, IHqlExpression *_expr, IHqlExpression *_funcdef, bool _exported, bool _shared, unsigned _flags, IFileContents *_text, int lineno, int column, int _startpos, int _bodypos, int _endpos);
 
     virtual ISourcePath * querySourcePath() const;
     
@@ -600,11 +603,11 @@ public:
 
 //interface IHqlNamedAnnotation
     virtual IFileContents * getBodyContents();
-    virtual IHqlExpression * cloneSymbol(_ATOM optname, IHqlExpression * optnewbody, IHqlExpression * optnewfuncdef, HqlExprArray * optargs);
+    virtual IHqlExpression * cloneSymbol(IIdAtom * optname, IHqlExpression * optnewbody, IHqlExpression * optnewfuncdef, HqlExprArray * optargs);
 
 protected:
-    CHqlNamedSymbol(_ATOM _name, _ATOM _module, IHqlExpression *_expr, bool _exported, bool _shared, unsigned _obFlags);
-    CHqlNamedSymbol(_ATOM _name, _ATOM _module, IHqlExpression *_expr, IHqlExpression *_funcdef, bool _exported, bool _shared, unsigned _flags, IFileContents *_text, int _startLine, int _startColumn, int _startpos, int _bodypos, int _endpos);
+    CHqlNamedSymbol(IIdAtom * _id, IIdAtom * _module, IHqlExpression *_expr, bool _exported, bool _shared, unsigned _obFlags);
+    CHqlNamedSymbol(IIdAtom * _id, IIdAtom * _module, IHqlExpression *_expr, IHqlExpression *_funcdef, bool _exported, bool _shared, unsigned _flags, IFileContents *_text, int _startLine, int _startColumn, int _startpos, int _bodypos, int _endpos);
 
 protected:
     Linked<IFileContents> text;
@@ -718,21 +721,22 @@ protected:
 class CHqlField: public CHqlExpressionWithType
 {
 private:
-    _ATOM               name;
+    IIdAtom * id;
 
     virtual void sethash();
     virtual bool equals(const IHqlExpression & other) const;
     void onCreateField();
 public:
-    CHqlField(_ATOM, ITypeInfo *type, IHqlExpression *defaultValue);
-    CHqlField(_ATOM _name, ITypeInfo *_type, HqlExprArray &_ownedOperands);
-//  CHqlField(_ATOM _name, ITypeInfo *_type, IHqlExpression *_defValue, IHqlExpression *_attrs);
+    CHqlField(IIdAtom *, ITypeInfo *type, IHqlExpression *defaultValue);
+    CHqlField(IIdAtom * _id, ITypeInfo *_type, HqlExprArray &_ownedOperands);
+//  CHqlField(IIdAtom * _id, ITypeInfo *_type, IHqlExpression *_defValue, IHqlExpression *_attrs);
 
     virtual StringBuffer &toString(StringBuffer &ret);
 //  virtual StringBuffer &toSQL(StringBuffer &, bool paren, IHqlDataset *scope, bool useAliases, node_operator op = no_none);
     virtual IHqlExpression *clone(HqlExprArray &newkids);
     virtual StringBuffer &printAliases(StringBuffer &s, unsigned, bool &) { return s; }
-    virtual _ATOM queryName() const { return name; }
+    virtual IAtom * queryName() const { return id->lower(); }
+    virtual IIdAtom * queryId() const { return id; }
 };
 
 class CHqlRow: public CHqlExpressionWithType
@@ -745,20 +749,21 @@ public:
     virtual IHqlExpression *clone(HqlExprArray &newkids);
     virtual IHqlSimpleScope *querySimpleScope();
     virtual IHqlDataset *queryDataset();
-    virtual _ATOM queryName() const;
+    virtual IAtom * queryName() const;
     virtual IHqlExpression *queryNormalizedSelector(bool skipIndex);
 };
 
 
 class CHqlExternal: public CHqlExpressionWithType
 {
-    _ATOM name;
+    IIdAtom * id;
 
-    CHqlExternal(_ATOM name, ITypeInfo *, HqlExprArray &_ownedOperands);
+    CHqlExternal(IIdAtom * id, ITypeInfo *, HqlExprArray &_ownedOperands);
     virtual bool equals(const IHqlExpression & other) const;
 public:
-    static CHqlExternal *makeExternalReference(_ATOM name, ITypeInfo *, HqlExprArray &_ownedOperands);
-    virtual _ATOM queryName() const { return name; }
+    static CHqlExternal *makeExternalReference(IIdAtom * id, ITypeInfo *, HqlExprArray &_ownedOperands);
+    virtual IAtom * queryName() const { return id->lower(); }
+    virtual IIdAtom * queryId() const { return id; }
 };
 
 class CHqlExternalCall: public CHqlExpressionWithType
@@ -767,7 +772,8 @@ protected:
     OwnedHqlExpr funcdef;
 
     CHqlExternalCall(IHqlExpression * _funcdef, ITypeInfo * type, HqlExprArray &parms);
-    virtual _ATOM queryName() const { return funcdef->queryName(); }
+    virtual IAtom * queryName() const { return funcdef->queryName(); }
+    virtual IIdAtom * queryId() const { return funcdef->queryId(); }
     virtual void sethash();
     virtual bool equals(const IHqlExpression & other) const;
     virtual IHqlExpression *clone(HqlExprArray &newkids);
@@ -800,18 +806,18 @@ class CHqlExternalDatasetCall: public CHqlExternalCall, implements IHqlDataset
 class SymbolTable
 {
 public:
-    inline void setValue(_ATOM name, IHqlExpression * value)
+    inline void setValue(IAtom * name, IHqlExpression * value)
     {
         CriticalBlock block(cs);
         map.setValue(name, value);
     }
-    inline bool contain(_ATOM name) const
+    inline bool contain(IAtom * name) const
     {
         CriticalBlock block(cs);
         IHqlExpression * ret = map.getValue(name);
         return (ret != NULL);
     }
-    inline IHqlExpression * getLinkedValue(_ATOM name) const
+    inline IHqlExpression * getLinkedValue(IAtom * name) const
     {
         CriticalBlock block(cs);
         IHqlExpression * ret = map.getValue(name);
@@ -827,7 +833,7 @@ public:
         CriticalBlock block(cs);
         map.kill();
     }
-    inline void remove(_ATOM name)
+    inline void remove(IAtom * name)
     {
         CriticalBlock block(cs);
         map.remove(name);
@@ -848,7 +854,7 @@ public:
     }
 
 protected:
-    MapXToMyClass<_ATOM, _ATOM, IHqlExpression> map;
+    MapXToMyClass<IAtom *, IAtom *, IHqlExpression> map;
     mutable CriticalSection cs;
 };
 
@@ -866,10 +872,10 @@ protected:
     SymbolTable & table;
 };
 #else
-class SymbolTable : public MapXToMyClass<_ATOM, _ATOM, IHqlExpression>
+class SymbolTable : public MapXToMyClass<IAtom *, IAtom *, IHqlExpression>
 {
 public:
-    inline IHqlExpression * getLinkedValue(_ATOM name) const
+    inline IHqlExpression * getLinkedValue(IAtom * name) const
     {
         IHqlExpression * ret = getValue(name);
         if (ret)
@@ -880,9 +886,9 @@ public:
 typedef HashIterator SymbolTableIterator;
 #endif
 
-inline IHqlExpression * lookupSymbol(SymbolTable & symbols, _ATOM searchName, bool sharedOK)
+inline IHqlExpression * lookupSymbol(SymbolTable & symbols, IIdAtom * searchName, bool sharedOK)
 {
-    OwnedHqlExpr ret = symbols.getLinkedValue(searchName);
+    OwnedHqlExpr ret = symbols.getLinkedValue(searchName->lower());
 
     if (!ret)
         return NULL; 
@@ -893,16 +899,17 @@ inline IHqlExpression * lookupSymbol(SymbolTable & symbols, _ATOM searchName, bo
     return ret.getClear();
 }
 
-typedef class MapXToMyClassViaBase<_ATOM, _ATOM, CHqlField, IHqlExpression> FieldTable;
+typedef class MapXToMyClassViaBase<IAtom *, IAtom *, CHqlField, IHqlExpression> FieldTable;
 
-typedef class MapXToMyClassViaBase<_ATOM, _ATOM, IFileContents, IFileContents> FileContentsTable;
+typedef class MapXToMyClassViaBase<IAtom *, IAtom *, IFileContents, IFileContents> FileContentsTable;
 
 class CHqlDelayedCall: public CHqlExpressionWithType
 {
     OwnedHqlExpr param;
 protected:
     CHqlDelayedCall(IHqlExpression * _param, ITypeInfo * type, HqlExprArray &parms);
-    virtual _ATOM queryName() const { return param->queryName(); }
+    virtual IAtom * queryName() const { return param->queryName(); }
+    virtual IIdAtom * queryId() const { return param->queryId(); }
     virtual void sethash();
     virtual bool equals(const IHqlExpression & other) const;
     virtual IHqlExpression *clone(HqlExprArray &newkids);
@@ -939,14 +946,15 @@ public:
     CHqlDelayedScopeCall(IHqlExpression * _param, ITypeInfo * type, HqlExprArray &parms);
     IMPLEMENT_IINTERFACE_USING(CHqlDelayedCall)
 
-    virtual void defineSymbol(_ATOM name, _ATOM moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags, IFileContents *fc, int lineno, int column, int _startpos, int _bodypos, int _endpos) { throwUnexpected(); }
-    virtual void defineSymbol(_ATOM name, _ATOM moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags) { throwUnexpected(); }
+    virtual void defineSymbol(IIdAtom * id, IIdAtom * moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags, IFileContents *fc, int lineno, int column, int _startpos, int _bodypos, int _endpos) { throwUnexpected(); }
+    virtual void defineSymbol(IIdAtom * id, IIdAtom * moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags) { throwUnexpected(); }
     virtual void defineSymbol(IHqlExpression * expr) { throwUnexpected(); }
-    virtual void removeSymbol(_ATOM name) { throwUnexpected(); }
+    virtual void removeSymbol(IIdAtom * id) { throwUnexpected(); }
 
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
     virtual void    getSymbols(HqlExprArray& exprs) const;
-    virtual _ATOM   queryName() const;
+    virtual IAtom *   queryName() const;
+    virtual IIdAtom * queryId() const;
     virtual const char * queryFullName() const  { throwUnexpected(); }
     virtual ISourcePath * querySourcePath() const   { throwUnexpected(); }
     virtual bool hasBaseClass(IHqlExpression * searchBase);
@@ -956,8 +964,8 @@ public:
 
     virtual bool isImplicit() const { return false; }
     virtual bool isPlugin() const { return false; }
-    virtual int getPropInt(_ATOM a, int def) const { return def; }
-    virtual bool getProp(_ATOM a, StringBuffer &ret) const { return false; }
+    virtual int getPropInt(IAtom * a, int def) const { return def; }
+    virtual bool getProp(IAtom * a, StringBuffer &ret) const { return false; }
 
     virtual IHqlScope * clone(HqlExprArray & children, HqlExprArray & symbols) { throwUnexpected(); }
 
@@ -976,14 +984,14 @@ class HQL_API CHqlScope : public CHqlExpressionWithType, implements IHqlScope, i
 {
 protected:
     Owned<IFileContents> text;
-    _ATOM name;
+    IIdAtom * id;
     StringAttr fullName;                //Fully qualified name of this nested module   E.g.: PARENT.CHILD.GRANDCHILD
     SymbolTable symbols;
 
     virtual bool equals(const IHqlExpression & other) const;
 
 public:
-    CHqlScope(node_operator _op, _ATOM _name, const char * _fullName);
+    CHqlScope(node_operator _op, IIdAtom * _id, const char * _fullName);
     CHqlScope(node_operator _op);
     CHqlScope(IHqlScope* scope);
     ~CHqlScope();
@@ -998,22 +1006,23 @@ public:
 
 //interface IHqlScope
     virtual IHqlExpression * queryExpression() { return this; }
-    virtual void defineSymbol(_ATOM name, _ATOM moduleName, IHqlExpression *value, bool isPublic, bool isShared, unsigned symbolFlags, IFileContents *, int lineno, int column, int _startpos, int _bodypos, int _endpos);
-    virtual void defineSymbol(_ATOM name, _ATOM moduleName, IHqlExpression *value, bool exported, bool shared, unsigned symbolFlags);
+    virtual void defineSymbol(IIdAtom * id, IIdAtom * moduleName, IHqlExpression *value, bool isPublic, bool isShared, unsigned symbolFlags, IFileContents *, int lineno, int column, int _startpos, int _bodypos, int _endpos);
+    virtual void defineSymbol(IIdAtom * id, IIdAtom * moduleName, IHqlExpression *value, bool exported, bool shared, unsigned symbolFlags);
     virtual void defineSymbol(IHqlExpression * expr);
-    virtual void removeSymbol(_ATOM name);
+    virtual void removeSymbol(IIdAtom * id);
 
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
 
-    virtual _ATOM   queryName() const {return name;}
+    virtual IAtom * queryName() const {return id->lower();}
+    virtual IIdAtom * queryId() const { return id; }
     virtual const char * queryFullName() const  { return fullName; }
     virtual ISourcePath * querySourcePath() const { return text ? text->querySourcePath() : NULL; }
 
     virtual void ensureSymbolsDefined(HqlLookupContext & ctx) { }
     virtual bool isImplicit() const { return false; }
     virtual bool isPlugin() const { return false; }
-    virtual int getPropInt(_ATOM, int) const;
-    virtual bool getProp(_ATOM, StringBuffer &) const;
+    virtual int getPropInt(IAtom *, int) const;
+    virtual bool getProp(IAtom *, StringBuffer &) const;
 
     virtual void    getSymbols(HqlExprArray& exprs) const;
     virtual IHqlScope * clone(HqlExprArray & children, HqlExprArray & symbols) { throwUnexpected(); }
@@ -1035,7 +1044,7 @@ public:
     virtual IValue * castFrom(size32_t len, const UChar * text)  { return NULL; }
     virtual StringBuffer &getECLType(StringBuffer & out)  { return out.append("MODULE"); }
     virtual StringBuffer &getDescriptiveType(StringBuffer & out)  { return out.append("MODULE"); }
-    virtual const char *queryTypeName()         { return name->str(); }
+    virtual const char *queryTypeName()         { return id->str(); }
     virtual unsigned getCardinality()           { return 0; }
     virtual bool isInteger()                    { return false; }
     virtual bool isReference()                  { return false; }
@@ -1044,8 +1053,8 @@ public:
     virtual bool isSwappedEndian()              { return false; }
     virtual ICharsetInfo * queryCharset()       { return NULL; }
     virtual ICollationInfo * queryCollation()   { return NULL; }
-    virtual _ATOM queryLocale()                 { return NULL; }
-//  virtual _ATOM queryName() const             { return name; }
+    virtual IAtom * queryLocale()                 { return NULL; }
+//  virtual IAtom * queryName() const             { return id; }
     virtual ITypeInfo * queryChildType()        { return NULL; }
     virtual IInterface * queryDistributeInfo()  { return NULL; }
     virtual IInterface * queryGroupInfo()       { return NULL; }
@@ -1064,7 +1073,7 @@ public:
     virtual void deserialize(MemoryBuffer &) { UNIMPLEMENTED; }
 
 protected:
-    void throwRecursiveError(_ATOM name);
+    void throwRecursiveError(IIdAtom * id);
 };
 
 class HQL_API CHqlRemoteScope : public CHqlScope, implements IHqlRemoteScope
@@ -1083,10 +1092,10 @@ protected:
     virtual bool equals(const IHqlExpression & other) const;
 
     virtual void repositoryLoadModule(HqlLookupContext & ctx, bool forceAll);
-    virtual IHqlExpression * repositoryLoadSymbol(_ATOM attrName);
+    virtual IHqlExpression * repositoryLoadSymbol(IIdAtom * attrName);
 
 public:
-    CHqlRemoteScope(_ATOM _name, const char * _fullName, IEclRepositoryCallback *_repository, IProperties* _props, IFileContents * _text, bool _lazy, IEclSource * _eclSource);
+    CHqlRemoteScope(IIdAtom * _id, const char * _fullName, IEclRepositoryCallback *_repository, IProperties* _props, IFileContents * _text, bool _lazy, IEclSource * _eclSource);
     ~CHqlRemoteScope();
     IMPLEMENT_IINTERFACE_USING(CHqlScope)
 
@@ -1097,7 +1106,7 @@ public:
     virtual void sethash();
 
 //interface IHqlScope
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
     virtual void ensureSymbolsDefined(HqlLookupContext & ctx);
     virtual void defineSymbol(IHqlExpression * expr);
     using CHqlScope::defineSymbol;
@@ -1110,10 +1119,10 @@ public:
 
     virtual bool isImplicit() const;
     virtual bool isPlugin() const;
-    virtual int getPropInt(_ATOM, int) const;
-    virtual bool getProp(_ATOM, StringBuffer &) const;
-    virtual void setProp(_ATOM, const char *);
-    virtual void setProp(_ATOM, int);
+    virtual int getPropInt(IAtom *, int) const;
+    virtual bool getProp(IAtom *, StringBuffer &) const;
+    virtual void setProp(IAtom *, const char *);
+    virtual void setProp(IAtom *, int);
     virtual IEclSource * queryEclSource() const { return eclSource; }
 };
 
@@ -1123,7 +1132,7 @@ protected:
     virtual bool equals(const IHqlExpression & other) const;
 
 public:
-    CHqlLocalScope(node_operator _op, _ATOM _name, const char * _fullName);
+    CHqlLocalScope(node_operator _op, IIdAtom * _id, const char * _fullName);
     CHqlLocalScope(IHqlScope* scope);
 
 //interface IHqlExpression
@@ -1149,12 +1158,12 @@ protected:
 protected:
     virtual bool equals(const IHqlExpression & other) const;
     IHqlScope * deriveConcreteScope();
-    IHqlExpression * lookupBaseSymbol(IHqlExpression * & definitionModule, _ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    IHqlExpression * lookupBaseSymbol(IHqlExpression * & definitionModule, IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
     void resolveUnboundSymbols();
     void ensureVirtualSeq();
 
 public:
-    CHqlVirtualScope(_ATOM _name, const char * _fullName);
+    CHqlVirtualScope(IIdAtom * _id, const char * _fullName);
 
 //interface IHqlExpression
     virtual IHqlExpression *addOperand(IHqlExpression * arg);
@@ -1162,13 +1171,12 @@ public:
     virtual IHqlExpression *clone(HqlExprArray &newkids);
     virtual IHqlExpression *closeExpr();
     virtual void defineSymbol(IHqlExpression * expr);
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
-    virtual bool queryForceSymbolVirtual(_ATOM searchName, HqlLookupContext & ctx);
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    virtual bool queryForceSymbolVirtual(IIdAtom * searchName, HqlLookupContext & ctx);
     virtual void sethash();
 
 //interface IHqlScope
     virtual bool allBasesFullyBound() const { return fullyBoundBase; }
-    virtual _ATOM   queryName() const {return name;}
     virtual IHqlScope * queryConcreteScope() { return containsVirtual ? concrete.get() : this; }
 };
 
@@ -1176,11 +1184,11 @@ public:
 class HQL_API CHqlMergedScope : public CHqlScope
 {
 public:
-    CHqlMergedScope(_ATOM _name, const char * _fullName) : CHqlScope(no_mergedscope, _name, _fullName) { mergedAll = false; }
+    CHqlMergedScope(IIdAtom * _id, const char * _fullName) : CHqlScope(no_mergedscope, _id, _fullName) { mergedAll = false; }
 
     void addScope(IHqlScope * scope);
 
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
     virtual void ensureSymbolsDefined(HqlLookupContext & ctx);
     virtual bool allBasesFullyBound() const;
     virtual bool isImplicit() const;
@@ -1200,9 +1208,9 @@ protected:
     CopyArray parents;
 
 public:
-    CHqlMultiParentScope(_ATOM, ...);
+    CHqlMultiParentScope(IIdAtom *, ...);
 
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
     virtual IHqlScope * queryConcreteScope() { return this; }
     virtual bool allBasesFullyBound() const { return true; }
 };
@@ -1218,11 +1226,11 @@ public:
     // copy constructor
     CHqlContextScope(IHqlScope* scope);
 
-    virtual void defineSymbol(_ATOM name, _ATOM moduleName, IHqlExpression *value,bool exported, bool shared, unsigned symbolFlags)
-    {  defined.setValue(name,value);  }
+    virtual void defineSymbol(IIdAtom * id, IIdAtom * moduleName, IHqlExpression *value,bool exported, bool shared, unsigned symbolFlags)
+    {  defined.setValue(id->lower(),value);  }
 
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx)
-    {  return defined.getLinkedValue(searchName); }
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx)
+    {  return defined.getLinkedValue(searchName->lower()); }
 
     virtual IHqlScope * queryConcreteScope()    { return this; }
     virtual bool allBasesFullyBound() const { return false; }
@@ -1277,23 +1285,24 @@ class CHqlParameter : public CHqlExpressionWithType
 {
 protected:
     unique_id_t uid;
-    _ATOM name;
+    IIdAtom * id;
     unsigned idx;
 
     virtual void sethash();
-    CHqlParameter(_ATOM name, unsigned idx, ITypeInfo *type);
+    CHqlParameter(IIdAtom * id, unsigned idx, ITypeInfo *type);
     ~CHqlParameter();
 
     virtual bool equals(const IHqlExpression & other) const;
 public:
-    static IHqlExpression *makeParameter(_ATOM name, unsigned idx, ITypeInfo *type, HqlExprArray & attrs);
+    static IHqlExpression *makeParameter(IIdAtom * id, unsigned idx, ITypeInfo *type, HqlExprArray & attrs);
 
 //interface IHqlExpression
 
     StringBuffer &toString(StringBuffer &ret);
     virtual IHqlExpression *clone(HqlExprArray &newkids);
     virtual IHqlSimpleScope *querySimpleScope();
-    virtual _ATOM queryName() const { return name; }
+    virtual IAtom * queryName() const { return id->lower(); }
+    virtual IIdAtom * queryId() const { return id; }
     virtual unsigned __int64 querySequenceExtra() { return idx; }
 };
 
@@ -1302,8 +1311,8 @@ class CHqlDatasetParameter : public CHqlParameter, implements IHqlDataset
 public:
     IMPLEMENT_IINTERFACE_USING(CHqlParameter)
 
-    CHqlDatasetParameter(_ATOM name, unsigned idx, ITypeInfo *type)
-     : CHqlParameter(name, idx, type) { }
+    CHqlDatasetParameter(IIdAtom * id, unsigned idx, ITypeInfo *type)
+     : CHqlParameter(id, idx, type) { }
 
 //IHqlExpression
     virtual bool assignableFrom(ITypeInfo * source) { type_t tc = source->getTypeCode(); return tc==type_table; }
@@ -1330,8 +1339,8 @@ class CHqlDictionaryParameter : public CHqlParameter, implements IHqlDataset
 public:
     IMPLEMENT_IINTERFACE_USING(CHqlParameter)
 
-    CHqlDictionaryParameter(_ATOM name, unsigned idx, ITypeInfo *type)
-     : CHqlParameter(name, idx, type) { }
+    CHqlDictionaryParameter(IIdAtom * id, unsigned idx, ITypeInfo *type)
+     : CHqlParameter(id, idx, type) { }
 
 //IHqlExpression
     virtual bool assignableFrom(ITypeInfo * source) { type_t tc = source->getTypeCode(); return tc==type_dictionary; }
@@ -1362,7 +1371,7 @@ protected:
 
     virtual void sethash();
 public:
-    CHqlScopeParameter(_ATOM name, unsigned idx, ITypeInfo *type);
+    CHqlScopeParameter(IIdAtom * id, unsigned idx, ITypeInfo *type);
 
 //IHqlExpression
     virtual bool assignableFrom(ITypeInfo * source);
@@ -1371,7 +1380,7 @@ public:
 
 //IHqlScope
     virtual void defineSymbol(IHqlExpression * expr)            { throwUnexpected(); }
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
 
     virtual void getSymbols(HqlExprArray& exprs) const          { typeScope->getSymbols(exprs); }
     virtual IHqlScope * queryConcreteScope() { return NULL; }
@@ -1400,7 +1409,7 @@ public:
 
 //IHqlScope
     virtual void defineSymbol(IHqlExpression * expr)            { throwUnexpected(); }
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
     virtual bool hasBaseClass(IHqlExpression * searchBase)      { return libraryScope->hasBaseClass(searchBase); }
     virtual bool allBasesFullyBound() const { return false; }
     virtual IHqlScope * queryConcreteScope()    { return this; }
@@ -1426,10 +1435,11 @@ public:
 
 //IHqlScope
     virtual IHqlExpression * queryExpression() { return this; }
-    virtual IHqlExpression *lookupSymbol(_ATOM searchName, unsigned lookupFlags, HqlLookupContext & ctx);
+    virtual IHqlExpression *lookupSymbol(IIdAtom * searchName, unsigned lookupFlags, HqlLookupContext & ctx);
 
     virtual void    getSymbols(HqlExprArray& exprs) const;
-    virtual _ATOM   queryName() const { return NULL; }
+    virtual IAtom *   queryName() const { return NULL; }
+    virtual IIdAtom * queryId() const { return NULL; }
     virtual const char * queryFullName() const { return NULL; }
     virtual ISourcePath * querySourcePath() const { return NULL; }
     virtual bool hasBaseClass(IHqlExpression * searchBase);
@@ -1442,14 +1452,14 @@ public:
 
     virtual bool isImplicit() const { return false; }
     virtual bool isPlugin() const { return false; }
-    virtual int getPropInt(_ATOM, int dft) const { return dft; }
-    virtual bool getProp(_ATOM, StringBuffer &) const { return false; }
+    virtual int getPropInt(IAtom *, int dft) const { return dft; }
+    virtual bool getProp(IAtom *, StringBuffer &) const { return false; }
 
 //IHqlCreateScope
-    virtual void defineSymbol(_ATOM name, _ATOM moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags, IFileContents *fc, int lineno, int column, int _startpos, int _bodypos, int _endpos) { throwUnexpected(); }
-    virtual void defineSymbol(_ATOM name, _ATOM moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags) { throwUnexpected(); }
+    virtual void defineSymbol(IIdAtom * id, IIdAtom * moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags, IFileContents *fc, int lineno, int column, int _startpos, int _bodypos, int _endpos) { throwUnexpected(); }
+    virtual void defineSymbol(IIdAtom * id, IIdAtom * moduleName, IHqlExpression *value, bool isExported, bool isShared, unsigned flags) { throwUnexpected(); }
     virtual void defineSymbol(IHqlExpression * expr) { throwUnexpected(); }
-    virtual void removeSymbol(_ATOM name) { throwUnexpected(); }
+    virtual void removeSymbol(IIdAtom * id) { throwUnexpected(); }
 
 protected:
     ITypeInfo * type;
@@ -1473,14 +1483,14 @@ public:
 class CHqlAttribute : public CHqlExpressionWithTables
 {
 protected:
-    _ATOM name;
-    CHqlAttribute(node_operator _op, _ATOM _name);
+    IAtom * name;
+    CHqlAttribute(node_operator _op, IAtom * _name);
     virtual bool equals(const IHqlExpression & other) const;
     virtual void sethash();
     virtual bool isAttribute() const { return true; }
 public:
-    static CHqlAttribute *makeAttribute(node_operator op, _ATOM name);
-    virtual _ATOM queryName() const { return name; }
+    static CHqlAttribute *makeAttribute(node_operator op, IAtom * name);
+    virtual IAtom * queryName() const { return name; }
     virtual StringBuffer &toString(StringBuffer &ret);
     virtual IHqlExpression *clone(HqlExprArray &newkids);
     virtual StringBuffer &printAliases(StringBuffer &s, unsigned, bool &) { return s; }
@@ -1491,14 +1501,14 @@ public:
 class CHqlUnknown : public CHqlExpressionWithType
 {
 protected:
-    _ATOM name;
+    IAtom * name;
     LinkedIInterface extra;
-    CHqlUnknown(node_operator _op, ITypeInfo * _type, _ATOM _name, IInterface * _extra);
+    CHqlUnknown(node_operator _op, ITypeInfo * _type, IAtom * _name, IInterface * _extra);
     virtual bool equals(const IHqlExpression & other) const;
     virtual void sethash();
 public:
-    static CHqlUnknown *makeUnknown(node_operator _op, ITypeInfo * _type, _ATOM _name, IInterface * _extra);
-    virtual _ATOM queryName() const { return name; }
+    static CHqlUnknown *makeUnknown(node_operator _op, ITypeInfo * _type, IAtom * _name, IInterface * _extra);
+    virtual IAtom * queryName() const { return name; }
     virtual IInterface *queryUnknownExtra();
     virtual StringBuffer &toString(StringBuffer &ret);
     virtual IHqlExpression *clone(HqlExprArray &newkids);
@@ -1509,15 +1519,15 @@ class CHqlSequence : public CHqlExpressionWithType
 {
 protected:
     unsigned __int64 seq;
-    _ATOM name;
+    IAtom * name;
 
-    CHqlSequence(node_operator _op, ITypeInfo * _type, _ATOM _name, unsigned __int64 _seq);
+    CHqlSequence(node_operator _op, ITypeInfo * _type, IAtom * _name, unsigned __int64 _seq);
     virtual bool equals(const IHqlExpression & other) const;
     virtual bool isAttribute() const { return op==no_attr; }
     virtual void sethash();
 public:
-    static CHqlSequence *makeSequence(node_operator _op, ITypeInfo * _type, _ATOM _name, unsigned __int64 _seq);
-    virtual _ATOM queryName() const { return name; }
+    static CHqlSequence *makeSequence(node_operator _op, ITypeInfo * _type, IAtom * _name, unsigned __int64 _seq);
+    virtual IAtom * queryName() const { return name; }
     virtual unsigned __int64 querySequenceExtra() { return seq; }
     virtual StringBuffer &toString(StringBuffer &ret);
     virtual IHqlExpression *clone(HqlExprArray &newkids);
@@ -1555,7 +1565,7 @@ public:
     virtual IHqlExpression *addOperand(IHqlExpression *field);
     virtual IHqlExpression *clone(HqlExprArray &newkids);
     virtual bool equals(const IHqlExpression & other) const;
-    virtual _ATOM queryName() const { return unnamedAtom; }
+    virtual IAtom * queryName() const { return unnamedId->lower(); }
     virtual void sethash();
     virtual ITypeInfo *queryType() const;
     virtual ITypeInfo *getType();
@@ -1587,7 +1597,7 @@ public:
     virtual bool isSwappedEndian()              { return false; }
     virtual ICharsetInfo * queryCharset()       { return NULL; }
     virtual ICollationInfo * queryCollation()   { return NULL; }
-    virtual _ATOM queryLocale()                 { return NULL; }
+    virtual IAtom * queryLocale()                 { return NULL; }
     virtual ITypeInfo * queryChildType()        { return NULL; }
     virtual IInterface * queryDistributeInfo()  { return NULL; }
     virtual IInterface * queryGroupInfo()       { return NULL; }
@@ -1604,7 +1614,7 @@ public:
     virtual void deserialize(MemoryBuffer &) { UNIMPLEMENTED; }
 
 // IHqlSimpleScope
-    IHqlExpression *lookupSymbol(_ATOM fieldName);
+    IHqlExpression *lookupSymbol(IIdAtom * fieldName);
     void insertSymbols(IHqlExpression * expr);
 };
 
@@ -1669,10 +1679,10 @@ private:
     ITypeInfo *logical;
     ITypeInfo *physical;
     IHqlExpression *funcdef;
-    _ATOM name;
+    IIdAtom * id;
 
 public:
-    CHqlAlienType(_ATOM, IHqlScope *, IHqlExpression * _funcdef);
+    CHqlAlienType(IIdAtom *, IHqlScope *, IHqlExpression * _funcdef);
     ~CHqlAlienType();
 
     IMPLEMENT_IINTERFACE_USING(CHqlExpression)
@@ -1700,9 +1710,9 @@ public:
     virtual IValue * castFrom(double value)  { return NULL; }
     virtual IValue * castFrom(size32_t len, const char * text)  { return NULL; }
     virtual IValue * castFrom(size32_t len, const UChar * text)  { return NULL; }
-    virtual StringBuffer &getECLType(StringBuffer & out)  { return out.append(name); }
+    virtual StringBuffer &getECLType(StringBuffer & out)  { return out.append(id->lower()); }
     virtual StringBuffer &getDescriptiveType(StringBuffer & out)  { return getECLType(out); }
-    virtual const char *queryTypeName()         { return name->str(); }
+    virtual const char *queryTypeName()         { return id->lower()->str(); }
     virtual unsigned getCardinality();
     virtual bool isInteger()                    { return logical->isInteger(); }
     virtual bool isReference()                  { return false; }
@@ -1711,8 +1721,9 @@ public:
     virtual bool isSwappedEndian()              { return logical->isSwappedEndian(); }
     virtual ICharsetInfo * queryCharset()       { return logical->queryCharset(); }
     virtual ICollationInfo * queryCollation()   { return logical->queryCollation(); }
-    virtual _ATOM queryLocale()                 { return logical->queryLocale(); }
-    virtual _ATOM queryName() const             { return name; }
+    virtual IAtom * queryLocale()                 { return logical->queryLocale(); }
+    virtual IAtom * queryName() const { return id->lower(); }
+    virtual IIdAtom * queryId() const { return id; }
     virtual ITypeInfo * queryChildType() { return logical; }
     virtual IInterface * queryDistributeInfo()  { return NULL; }
     virtual IInterface * queryGroupInfo()       { return NULL; }
@@ -1730,7 +1741,7 @@ public:
     virtual void deserialize(MemoryBuffer &) { UNIMPLEMENTED; }
 
 // IHqlSimpleScope
-    IHqlExpression *lookupSymbol(_ATOM fieldName);
+    IHqlExpression *lookupSymbol(IIdAtom * fieldName);
 
 // interface IHqlAlienTypeInfo
     virtual ITypeInfo *getLogicalType() { return LINK(logical); }
@@ -1743,10 +1754,10 @@ public:
     virtual IHqlExpression * queryLoadFunction();
     virtual IHqlExpression * queryLengthFunction();
     virtual IHqlExpression * queryStoreFunction();
-    virtual IHqlExpression * queryFunction(_ATOM name);
+    virtual IHqlExpression * queryFunction(IIdAtom * id);
 
 private:
-    IHqlExpression * queryMemberFunc(_ATOM name);
+    IHqlExpression * queryMemberFunc(IIdAtom * id);
 };
 
 class CHqlEnumType : public CHqlExpressionWithType
@@ -1772,18 +1783,18 @@ private:
     unsigned errcount;
 public:
     SilentErrorReceiver() { errcount = 0; }
-    virtual void reportError(int errNo, const char *msg, _ATOM filename, int _lineno, int _column, int _pos);
+    virtual void reportError(int errNo, const char *msg, IIdAtom * filename, int _lineno, int _column, int _pos);
     unsigned getErrCount() { return errcount; }
 };
 
 */
 
 class HqlGramCtx;
-extern void defineSymbol(_ATOM name, IHqlExpression *value);
-extern void parseAttribute(IHqlScope *scope, IFileContents * contents, HqlLookupContext & ctx, _ATOM name);
+extern void defineSymbol(IIdAtom * id, IHqlExpression *value);
+extern void parseAttribute(IHqlScope *scope, IFileContents * contents, HqlLookupContext & ctx, IIdAtom * id);
 extern bool parseForwardModuleMember(HqlGramCtx & _parent, IHqlScope *scope, IHqlExpression * forwardSymbol, HqlLookupContext & ctx);
 
-IHqlExpression *createAttribute(node_operator op, _ATOM name, IHqlExpression * value, IHqlExpression *value2, IHqlExpression * value3);
-IHqlExpression *createAttribute(node_operator op, _ATOM name, HqlExprArray & args);
+IHqlExpression *createAttribute(node_operator op, IAtom * name, IHqlExpression * value, IHqlExpression *value2, IHqlExpression * value3);
+IHqlExpression *createAttribute(node_operator op, IAtom * name, HqlExprArray & args);
 
 #endif

+ 4 - 4
ecl/hql/hqlfold.cpp

@@ -3968,7 +3968,7 @@ public:
         case no_attr_link:
         case no_attr_expr:
             {
-                _ATOM name = expr->queryName();
+                IAtom * name = expr->queryName();
                 if (name == atmostAtom)
                     return LINK(expr);
                 else if (name == _selectors_Atom)
@@ -4439,8 +4439,8 @@ IHqlExpression * CExprFolderTransformer::doFoldTransformed(IHqlExpression * unfo
                             if (expandedFilter->isConstant())
                             {
                                 //Following would be sensible, but can't call transform at this point, so replace arg, and wait for it to re-iterate
-                                _ATOM nameF = expr->queryName();
-                                _ATOM nameP = child->queryName();
+                                IIdAtom * nameF = expr->queryId();
+                                IIdAtom * nameP = child->queryId();
                                 DBGLOG("Folder: Combining FILTER %s with %s %s produces constant filter", nameF ? nameF->str() : "", getOpString(child->getOperator()), nameP ? nameP->str() : "");
                                 expandedFilter.setown(transformExpanded(expandedFilter));
                                 IValue * value = expandedFilter->queryValue();
@@ -5010,7 +5010,7 @@ IHqlExpression * CExprFolderTransformer::percolateConstants(IHqlExpression * exp
         {
             //The constants can only be percolated into the transform if certain conditions are met,
             //However they can always be percolated into the join condition... (test separately)
-            _ATOM joinKind = queryJoinKind(expr);
+            IAtom * joinKind = queryJoinKind(expr);
             IHqlExpression * rhs = expr->queryChild(1);
             IHqlExpression * oldCond = updated->queryChild(2);
             IHqlExpression * atmost = updated->queryProperty(atmostAtom);

+ 55 - 53
ecl/hql/hqlgram.hpp

@@ -45,7 +45,7 @@ private:
     ITypeInfo* type;
     IPropertyTree * doc;
 public:
-    _ATOM      id;
+    IIdAtom *      id;
     int        scope;
     DefineIdSt() { type = NULL; id = NULL; scope = 0; doc = NULL; }
     ~DefineIdSt() { ::Release(type); ::Release(doc); }  
@@ -63,13 +63,14 @@ private:
     {
         IHqlExpression *expr;
         ITypeInfo      *type;
-        _ATOM           name;
+        IIdAtom *           name;
+        IIdAtom *     cname;
         char           *str_val;
         __int64         int_val;
         DefineIdSt     *defineid;
         IFileContents  *contents;
     };
-    enum { t_none,t_expr,t_scope,t_atom,t_string,t_int,t_type,t_defineid,t_contents } atr_type;
+    enum { t_none,t_expr,t_scope,t_atom,t_catom,t_string,t_int,t_type,t_defineid,t_contents } atr_type;
 public:
     ECLlocation pos;
 
@@ -117,17 +118,17 @@ public:
     }
     
     /* getters */
-    inline IFileContents * getContents() 
+    inline IFileContents * getContents()
     {
         assertex(atr_type==t_contents);         
         atr_type = t_none;
         return contents; 
     }
-    inline _ATOM getName() 
+    inline IIdAtom * getId()
     {
-        assertex(atr_type==t_atom);         
+        assertex(atr_type==t_catom);
         atr_type = t_none;
-        return name; 
+        return cname;
     }
     inline char *getString()
     {
@@ -202,10 +203,10 @@ public:
         atr_type = t_contents;
         contents = _contents; 
     }
-    inline void setName(_ATOM v) 
-    { 
-        atr_type=t_atom; 
-        name = v; 
+    inline void setId(IIdAtom * v)
+    {
+        atr_type=t_catom;
+        cname = v;
     }
     inline void setString(char *v) 
     { 
@@ -260,6 +261,7 @@ public:
         case t_int:
             break;
         case t_atom:
+        case t_catom:
             break;
         case t_contents:
             ::Release(contents);
@@ -302,7 +304,7 @@ public:
     void resetParameters()  { isParametered = false; activeParameters.kill(); activeDefaults.kill(); }
     IHqlExpression * createDefaults();
     IHqlExpression * createFormals(bool oldSetFormat);
-    IHqlExpression * queryParameter(_ATOM name);
+    IHqlExpression * queryParameter(IIdAtom * name);
 
 public:
     Owned<IHqlScope> localScope;
@@ -403,14 +405,14 @@ public:
     bool canFollowCurrentState(int tok, const short * yyps);
     void syntaxError(const char *s, int token, int *expected);
     int mapToken(int lexToken) const;
-    IHqlExpression *lookupSymbol(_ATOM name, const attribute& errpos);
-    IHqlExpression *lookupSymbol(IHqlScope * scope, _ATOM name);
+    IHqlExpression *lookupSymbol(IIdAtom * name, const attribute& errpos);
+    IHqlExpression *lookupSymbol(IHqlScope * scope, IIdAtom * name);
     void enableAttributes(int activityToken);
 
-    IHqlExpression * recordLookupInTemplateContext(_ATOM name, IHqlExpression * expr, IHqlScope * templateScope);
+    IHqlExpression * recordLookupInTemplateContext(IIdAtom * name, IHqlExpression * expr, IHqlScope * templateScope);
     void processImportAll(attribute & modulesAttr);
-    void processImport(attribute & modulesAttr, _ATOM as);
-    void processImport(attribute & membersAttr, attribute & modulesAttr, _ATOM as);
+    void processImport(attribute & modulesAttr, IIdAtom * as);
+    void processImport(attribute & membersAttr, attribute & modulesAttr, IIdAtom * as);
     void applyDefaultPromotions(attribute &a1, bool extendPrecision);
     unsigned checkCompatible(ITypeInfo * a1, ITypeInfo * t2, const attribute &ea, bool complain=true);
     void checkMaxCompatible(IHqlExpression * sortOrder, IHqlExpression * values, attribute & errpos);
@@ -420,7 +422,7 @@ public:
     void checkDatarow(attribute &atr);
     void checkDataset(attribute &atr);
     void checkDictionary(attribute &atr);
-    void checkFieldnameValid(const attribute &errpos, _ATOM name);
+    void checkFieldnameValid(const attribute &errpos, IIdAtom * name);
     void checkList(attribute &atr);
     void checkScalar(attribute &atr);
     void checkUseLocation(const attribute & errpos);
@@ -432,7 +434,7 @@ public:
     void checkType(attribute &a1, ITypeInfo *t2);
     ITypeInfo *checkType(attribute &e1, attribute &e2);
     bool checkAlienTypeDef(IHqlScope* scope, const attribute& errpos);
-    IHqlExpression* checkServiceDef(IHqlScope* serviceScope,_ATOM name, IHqlExpression* attrs, const attribute& errpos);
+    IHqlExpression* checkServiceDef(IHqlScope* serviceScope,IIdAtom * name, IHqlExpression* attrs, const attribute& errpos);
     void checkConstant(attribute & attr);
     IHqlExpression * checkConstant(const attribute & errpos, IHqlExpression * expr);
     void checkConstantEvent(attribute & attr);
@@ -486,7 +488,7 @@ public:
     void ensureTransformTypeMatch(attribute & tattr, IHqlExpression * ds);
     bool checkTransformTypeMatch(const attribute & errpos, IHqlExpression * ds, IHqlExpression * transform);
     void ensureDatasetTypeMatch(attribute & tattr, IHqlExpression * ds);
-    _ATOM ensureCommonLocale(attribute &a, attribute &b);
+    IAtom * ensureCommonLocale(attribute &a, attribute &b);
     void ensureUnicodeLocale(attribute & a, char const * locale);
     void ensureType(attribute &atr, ITypeInfo * type);
     void inheritRecordMaxLength(IHqlExpression * dataset, SharedHqlExpr & record);
@@ -525,8 +527,8 @@ public:
     void beginFunctionCall(attribute & function);
     IHqlExpression * endFunctionCall();
     void addActual(const attribute & errpos, IHqlExpression * ownedExpr);
-    void addNamedActual(const attribute & errpos, _ATOM name, IHqlExpression * ownedExpr);
-    bool processParameter(FunctionCallInfo & call, _ATOM name, IHqlExpression * actualValue, const attribute& errpos);
+    void addNamedActual(const attribute & errpos, IIdAtom * name, IHqlExpression * ownedExpr);
+    bool processParameter(FunctionCallInfo & call, IIdAtom * name, IHqlExpression * actualValue, const attribute& errpos);
     void checkActualTopScope(FunctionCallInfo & call, IHqlExpression * formal, IHqlExpression * actual);
     void leaveActualTopScope(FunctionCallInfo & call);
 
@@ -538,7 +540,7 @@ public:
 
     //Various grammar rule productions.
     void beginAlienType(const attribute & errpos);
-    void beginDefineId(_ATOM name, ITypeInfo * type);
+    void beginDefineId(IIdAtom * name, ITypeInfo * type);
 
     IHqlExpression * processAlienType(const attribute & errpos);
     IHqlExpression * processIndexBuild(attribute & indexAttr, attribute * recordAttr, attribute * payloadAttr, attribute & filenameAttr, attribute & flagsAttr);
@@ -549,7 +551,7 @@ public:
     void processLoadXML(attribute & a1, attribute * a2);
     IHqlExpression * processModuleDefinition(const attribute & errpos);
     IHqlExpression * processRowset(attribute & selectorAttr);
-    void processServiceFunction(const attribute & errpos, _ATOM name, IHqlExpression * thisAttrs, ITypeInfo * type);
+    void processServiceFunction(const attribute & errpos, IIdAtom * name, IHqlExpression * thisAttrs, ITypeInfo * type);
     void processStartTransform(const attribute & errpos);
     IHqlExpression * processUserAggregate(const attribute & mainPos, attribute & dsAttr, attribute & recordAttr, attribute & transformAttr, attribute * mergeAttr,
                                       attribute *itemsAttr, attribute &rowsAttr, attribute &seqAttr);
@@ -566,7 +568,7 @@ public:
     void reportError(int errNo, const attribute& a, const char* format, ...) __attribute__((format(printf, 4, 5)));
     void reportError(int errNo, const ECLlocation & pos, const char* format, ...) __attribute__((format(printf, 4, 5)));
     void reportMacroExpansionPosition(int errNo, HqlLex * lexer, bool isError);
-    void reportErrorUnexpectedX(const attribute & errpos, _ATOM unexpected);
+    void reportErrorUnexpectedX(const attribute & errpos, IAtom * unexpected);
 
     // Don't use overloading: va_list is the same as char*!!
     void reportErrorVa(int errNo, const ECLlocation & a, const char* format, va_list args);
@@ -632,9 +634,9 @@ public:
     IHqlExpression * attachPendingWarnings(IHqlExpression * ownedExpr);
     IHqlExpression * attachMetaAttributes(IHqlExpression * ownedExpr, HqlExprArray & meta);
 
-    void addDatasetField(const attribute &errpos, _ATOM name, ITypeInfo * type, IHqlExpression *value, IHqlExpression * attrs);
-    void addDictionaryField(const attribute &errpos, _ATOM name, ITypeInfo * type, IHqlExpression *value, IHqlExpression * attrs);
-    void addField(const attribute &errpos, _ATOM name, ITypeInfo *type, IHqlExpression *value, IHqlExpression *attrs);
+    void addDatasetField(const attribute &errpos, IIdAtom * name, ITypeInfo * type, IHqlExpression *value, IHqlExpression * attrs);
+    void addDictionaryField(const attribute &errpos, IIdAtom * name, ITypeInfo * type, IHqlExpression *value, IHqlExpression * attrs);
+    void addField(const attribute &errpos, IIdAtom * name, ITypeInfo *type, IHqlExpression *value, IHqlExpression *attrs);
     void addFields(const attribute &errpos, IHqlExpression *record, IHqlExpression * dataset, bool clone);
     void addIfBlockToActive(const attribute &errpos, IHqlExpression * ifblock);
     void addToActiveRecord(IHqlExpression * newField);
@@ -665,8 +667,8 @@ public:
     void checkValidCsvRecord(const attribute & errpos, IHqlExpression * record);
     void checkValidPipeRecord(const attribute & errpos, IHqlExpression * record, IHqlExpression * attrs, IHqlExpression * expr);
 
-    void createAppendDictionaries(attribute & targetAttr, attribute & leftAttr, attribute & rightAttr, _ATOM kind);
-    void createAppendFiles(attribute & targetAttr, attribute & leftAttr, attribute & rightAttr, _ATOM kind);
+    void createAppendDictionaries(attribute & targetAttr, attribute & leftAttr, attribute & rightAttr, IAtom * kind);
+    void createAppendFiles(attribute & targetAttr, attribute & leftAttr, attribute & rightAttr, IAtom * kind);
     IHqlExpression * processIfProduction(attribute & condAttr, attribute & trueAttr, attribute * falseAttr);
 
     IHqlExpression * createSymbolFromValue(IHqlExpression * primaryExpr, IHqlExpression * value);
@@ -674,7 +676,7 @@ public:
     void setMaxErrorsAllowed(unsigned n) { m_maxErrorsAllowed = n; } 
     void setAssociateWarnings(bool value) { associateWarnings = value; }
     IHqlExpression* clearFieldMap(IHqlExpression* expr);
-    void setExpectedAttribute(_ATOM _expectedAttribute)             { expectedAttribute = _expectedAttribute; current_id = _expectedAttribute; }
+    void setExpectedAttribute(IIdAtom * _expectedAttribute)             { expectedAttribute = _expectedAttribute; current_id = _expectedAttribute; }
     void setCurrentToExpected()             { current_id = expectedAttribute; }
     IHqlScope * queryPrimaryScope(bool isPrivate);
     unsigned nextParameterIndex()               { return 0; } // not commoned up at moment{ return activeParameters.length()+savedParameters.length(); }
@@ -690,21 +692,21 @@ public:
     int yyLex(attribute * yylval, const short * activeState);
 
 protected:
-    _ATOM createUnnamedFieldName();
-    _ATOM createUnnamedFieldName(const char * prefix);
-    _ATOM getNameFromExpr(attribute& attr);
-    _ATOM createFieldNameFromExpr(IHqlExpression * expr);
+    IIdAtom * createUnnamedFieldId();
+    IIdAtom * createUnnamedFieldId(const char * prefix);
+    IIdAtom * getNameFromExpr(attribute& attr);
+    IIdAtom * createFieldNameFromExpr(IHqlExpression * expr);
     IHqlExpression * createAssert(attribute & cond, attribute * msg, attribute & flags);
 
-    void defineImport(const attribute & errpos, IHqlExpression * imported, _ATOM newName);
+    void defineImport(const attribute & errpos, IHqlExpression * imported, IIdAtom * newName);
     IHqlExpression * resolveImportModule(const attribute & errpos, IHqlExpression * expr);
 
     void setActiveAttrs(int activityToken, const TokenMap * attrs);
 
     IHqlExpression *doParse();
     IHqlExpression * checkBuildIndexRecord(IHqlExpression *record, attribute & errpos);
-    void checkNotAlreadyDefined(_ATOM name, IHqlScope * scope, const attribute & idattr);
-    void checkNotAlreadyDefined(_ATOM name, const attribute & idattr);
+    void checkNotAlreadyDefined(IIdAtom * name, IHqlScope * scope, const attribute & idattr);
+    void checkNotAlreadyDefined(IIdAtom * name, const attribute & idattr);
     void checkBuildIndexFilenameFlags(IHqlExpression * dataset, attribute & flags);
     IHqlExpression * createBuildFileFromTable(IHqlExpression * table, attribute & flagsAttr, IHqlExpression * filename, attribute & errpos);
     IHqlExpression * createBuildIndexFromIndex(attribute & indexAttr, attribute & flagsAttr, IHqlExpression * filename, attribute & errpos);
@@ -735,12 +737,12 @@ protected:
     void abortParsing();
     bool isExceptionalCase(attribute& defineid, attribute& object, attribute& failure);
     void checkSvcAttrNoValue(IHqlExpression* attr, const attribute& errpos);
-    void checkFormals(_ATOM name, HqlExprArray & parms, HqlExprArray & defaults, attribute& object);
+    void checkFormals(IIdAtom * name, HqlExprArray & parms, HqlExprArray & defaults, attribute& object);
     IHqlExpression * checkParameter(const attribute * errpos, IHqlExpression * actual, IHqlExpression * formal, bool isDefault, IHqlExpression * funcdef);
     void checkDedup(IHqlExpression *ds, IHqlExpression *flags, attribute &errpos);
-    void addParameter(const attribute & errpos, _ATOM name, ITypeInfo* type, IHqlExpression* defValue);
-    void addFunctionParameter(const attribute & errpos, _ATOM name, ITypeInfo* type, IHqlExpression* defValue);
-    void addFunctionProtoParameter(const attribute & errpos, _ATOM name, IHqlExpression * like, IHqlExpression* defValue);
+    void addParameter(const attribute & errpos, IIdAtom * name, ITypeInfo* type, IHqlExpression* defValue);
+    void addFunctionParameter(const attribute & errpos, IIdAtom * name, ITypeInfo* type, IHqlExpression* defValue);
+    void addFunctionProtoParameter(const attribute & errpos, IIdAtom * name, IHqlExpression * like, IHqlExpression* defValue);
     bool checkParameters(IHqlExpression* func, HqlExprArray& actuals, const attribute& errpos);
     bool checkTemplateFunctionParameters(IHqlExpression* func, HqlExprArray& actuals, const attribute& errpos);
     void checkSizeof(IHqlExpression* expr, attribute& errpos);
@@ -756,8 +758,8 @@ protected:
     void disableError() { errorDisabled = true; }
     void enableError() { errorDisabled = false; }
     bool isAborting() { return errorDisabled; }
-    _ATOM fieldMapTo(IHqlExpression* expr, _ATOM name);
-    _ATOM fieldMapFrom(IHqlExpression* expr, _ATOM name);
+    IIdAtom * fieldMapTo(IHqlExpression* expr, IIdAtom * name);
+    IIdAtom * fieldMapFrom(IHqlExpression* expr, IIdAtom * name);
     bool requireLateBind(IHqlExpression* funcdef, Array& actuals);
     IHqlExpression* createDefJoinTransform(IHqlExpression* left,IHqlExpression* right,attribute& errpos, IHqlExpression * seq, IHqlExpression * flags);
     IHqlExpression * createRowAssignTransform(const attribute & srcAttr, const attribute & tgtAttr, const attribute & seqAttr);
@@ -766,7 +768,7 @@ protected:
     IHqlExpression * createDefaultProjectDataset(IHqlExpression * record, IHqlExpression * src, const attribute & errpos);
     IHqlExpression * createDatasetFromList(attribute & listAttr, attribute & recordAttr);
 
-    void checkConditionalAggregates(_ATOM name, IHqlExpression * value, const attribute & errpos);
+    void checkConditionalAggregates(IIdAtom * name, IHqlExpression * value, const attribute & errpos);
     void checkProjectedFields(IHqlExpression * e, attribute & errpos);
     IHqlExpression * createRecordFromDataset(IHqlExpression * ds);
     IHqlExpression * cleanIndexRecord(IHqlExpression * record);
@@ -778,7 +780,7 @@ protected:
     IHqlExpression * createProjectRow(attribute & rowAttr, attribute & transformAttr, attribute & seqAttr);
     void doDefineSymbol(DefineIdSt * defineid, IHqlExpression * expr, IHqlExpression * failure, const attribute & idattr, int assignPos, int semiColonPos, bool isParametered);
     void defineSymbolInScope(IHqlScope * scope, DefineIdSt * defineid, IHqlExpression * expr, IHqlExpression * failure, const attribute & idattr, int assignPos, int semiColonPos, bool isParametered, HqlExprArray & parameters, IHqlExpression * defaults);
-    void checkDerivedCompatible(_ATOM name, IHqlExpression * scope, IHqlExpression * expr, bool isParametered, HqlExprArray & parameters, attribute const & errpos);
+    void checkDerivedCompatible(IIdAtom * name, IHqlExpression * scope, IHqlExpression * expr, bool isParametered, HqlExprArray & parameters, attribute const & errpos);
     void defineSymbolProduction(attribute & nameattr, attribute & paramattr, attribute & assignattr, attribute * valueattr, attribute * failattr, attribute & semiattr);
     void definePatternSymbolProduction(attribute & nameattr, const attribute & assignAttr, attribute & valueAttr, attribute & workflowAttr, const attribute & semiattr);
     void cloneInheritedAttributes(IHqlScope * scope, const attribute & errpos);
@@ -835,9 +837,9 @@ protected:
 
     IECLErrorArray pendingWarnings;
     Linked<ISourcePath> sourcePath;
-    _ATOM moduleName;
-    _ATOM current_id;
-    _ATOM expectedAttribute;
+    IIdAtom * moduleName;
+    IIdAtom * current_id;
+    IIdAtom * expectedAttribute;
     int current_flags;
     IHqlScope *transformScope;
     PointerArray savedIds;
@@ -954,8 +956,8 @@ protected:
     void checkRegrouping(attribute & atr, HqlExprArray & args);
     void checkRecordsMatch(attribute & atr, HqlExprArray & args);
 
-    IHqlExpression * transformRecord(IHqlExpression *dataset, _ATOM targetCharset, const attribute & errpos);
-    IHqlExpression * transformRecord(IHqlExpression *record, _ATOM targetCharset, IHqlExpression * scope, bool & changed, const attribute & errpos);
+    IHqlExpression * transformRecord(IHqlExpression *dataset, IAtom * targetCharset, const attribute & errpos);
+    IHqlExpression * transformRecord(IHqlExpression *record, IAtom * targetCharset, IHqlExpression * scope, bool & changed, const attribute & errpos);
     IHqlExpression * translateFieldsToNewScope(IHqlExpression * expr, IHqlSimpleScope * record, const attribute & err);
 
     ITypeInfo *queryCurrentRecordType();
@@ -1090,7 +1092,7 @@ class HqlLex
         IXmlScope *queryTopXmlScope();
         IXmlScope *ensureTopXmlScope(const YYSTYPE & errpos);
 
-        IHqlExpression *lookupSymbol(_ATOM name, const attribute& errpos);
+        IHqlExpression *lookupSymbol(IIdAtom * name, const attribute& errpos);
         void reportError(const YYSTYPE & returnToken, int errNo, const char *format, ...) __attribute__((format(printf, 4, 5)));
         void reportWarning(const YYSTYPE & returnToken, int warnNo, const char *format, ...) __attribute__((format(printf, 4, 5)));
 
@@ -1117,7 +1119,7 @@ class HqlLex
         bool getParameter(StringBuffer &curParam, const char* for_what, int* startLine=NULL, int* startCol=NULL);
         IValue *parseConstExpression(const YYSTYPE & errpos, StringBuffer &curParam, IXmlScope *xmlScope, int line, int col);
         IHqlExpression * parseECL(const char * curParam, IXmlScope *xmlScope, int startLine, int startCol);
-        void setMacroParam(const YYSTYPE & errpos, IHqlExpression* funcdef, StringBuffer& curParam, _ATOM argumentName, unsigned& parmno,IProperties *macroParms);
+        void setMacroParam(const YYSTYPE & errpos, IHqlExpression* funcdef, StringBuffer& curParam, IIdAtom * argumentName, unsigned& parmno,IProperties *macroParms);
         unsigned getTypeSize(unsigned lengthTypeName);
         static IHqlExpression * createIntegerConstant(__int64 value, bool isSigned);
 

+ 87 - 87
ecl/hql/hqlgram.y

@@ -645,12 +645,12 @@ importItem
                         }
     | importSelectorList AS UNKNOWN_ID
                         {
-                            parser->processImport($1, $3.getName());
+                            parser->processImport($1, $3.getId());
                             $$.clear();
                         }
     | importSelectorList FROM importSelector AS UNKNOWN_ID
                         {
-                            parser->processImport($1, $3, $5.getName());
+                            parser->processImport($1, $3, $5.getId());
                             $$.clear();
                         }
     | '*' FROM importSelector
@@ -697,14 +697,14 @@ importSelector
 
 importId
     : UNKNOWN_ID        {
-                            $$.setExpr(createAttribute($1.getName()), $1);
+                            $$.setExpr(createId($1.getId()), $1);
                         }
     | '$'               {
                             $$.setExpr(createAttribute(selfAtom), $1);
                         }
     | importId '.' UNKNOWN_ID
                         {
-                            $$.setExpr(createAttribute(_dot_Atom, $1.getExpr(), createAttribute($3.getName())), $1);
+                            $$.setExpr(createAttribute(_dot_Atom, $1.getExpr(), createId($3.getId())), $1);
                         }
     ;
 
@@ -989,7 +989,7 @@ macro
 #endif
 
                             //Use a named symbol to associate a line number/column
-                            expr = createSymbol(macroAtom, NULL, expr, NULL,
+                            expr = createSymbol(macroId, NULL, expr, NULL,
                                                 false, false, (object_type)0,
                                                 NULL,
                                                 yylval.pos.lineno, yylval.pos.column, 0, 0, 0);
@@ -1005,7 +1005,7 @@ macro
 #endif
 
                             //Use a named symbol to associate a line number/column
-                            expr = createSymbol(macroAtom, NULL, expr, NULL,
+                            expr = createSymbol(macroId, NULL, expr, NULL,
                                                 false, false, (object_type)0,
                                                 NULL,
                                                 yylval.pos.lineno, yylval.pos.column, 0, 0, 0);
@@ -1190,7 +1190,7 @@ startTYPE
 
 defineid
     : UNKNOWN_ID        {
-                            parser->beginDefineId($1.getName(), NULL);
+                            parser->beginDefineId($1.getId(), NULL);
                             $$.setType(NULL);
                             $$.setPosition($1);
                         }
@@ -1219,21 +1219,21 @@ defineid
                             Owned<ITypeInfo> type = $1.getType();
                             if (type->getTypeCode() == type_alien)
                                 type.set(type->queryPromotedType());
-                            parser->beginDefineId($2.getName(), type);
+                            parser->beginDefineId($2.getId(), type);
                             $$.setType(type.getClear());
                             $$.setPosition($1);
                         }
     | globalScopedDatasetId knownOrUnknownId
                         {
                             OwnedHqlExpr ds = $1.getExpr();
-                            parser->beginDefineId($2.getName(), ds->queryType());
+                            parser->beginDefineId($2.getId(), ds->queryType());
                             $$.setType(ds->getType());
                             $$.setPosition($1);
                         }
     | UNKNOWN_ID UNKNOWN_ID
                         {
-                            parser->reportError(ERR_UNKNOWN_TYPE, $1, "Unknown type '%s'", $1.getName()->str());
-                            parser->beginDefineId($2.getName(), NULL);
+                            parser->reportError(ERR_UNKNOWN_TYPE, $1, "Unknown type '%s'", $1.getId()->str());
+                            parser->beginDefineId($2.getId(), NULL);
                             $$.setType(NULL);
                             $$.setPosition($1);
                         }
@@ -1242,8 +1242,8 @@ defineid
 
 knownOrUnknownId
     : UNKNOWN_ID
-    | knownId           { $$.setName(parser->getNameFromExpr($1)); $$.setPosition($1); }
-    | knownFunction1    { $$.setName(parser->getNameFromExpr($1)); $$.setPosition($1); }
+    | knownId           { $$.setId(parser->getNameFromExpr($1)); $$.setPosition($1); }
+    | knownFunction1    { $$.setId(parser->getNameFromExpr($1)); $$.setPosition($1); }
     ;
 
 knownId
@@ -1317,14 +1317,14 @@ definePatternId
     : TOK_PATTERN knownOrUnknownId  
                         {
                             ITypeInfo *type = makePatternType();
-                            parser->beginDefineId($2.getName(), type);
+                            parser->beginDefineId($2.getId(), type);
                             $$.setType(type);
                             $$.setPosition($1);
                         }
     | RULE knownOrUnknownId 
                         {
                             ITypeInfo *type = makeRuleType(NULL);
-                            parser->beginDefineId($2.getName(), type);
+                            parser->beginDefineId($2.getId(), type);
                             $$.setType(type);
                             $$.setPosition($1);
                         }
@@ -1332,21 +1332,21 @@ definePatternId
                         {
                             OwnedHqlExpr record = $3.getExpr();
                             ITypeInfo *type = makeRuleType(record->getType());
-                            parser->beginDefineId($5.getName(), type);
+                            parser->beginDefineId($5.getId(), type);
                             $$.setType(type);
                             $$.setPosition($1);
                         }
     | TOKEN knownOrUnknownId    
                         {
                             ITypeInfo *type = makeTokenType();
-                            parser->beginDefineId($2.getName(), type);
+                            parser->beginDefineId($2.getId(), type);
                             $$.setType(type);
                             $$.setPosition($1);
                         }
     | userTypedefPattern knownOrUnknownId
                         {
                             ITypeInfo *type = $1.getType();
-                            parser->beginDefineId($2.getName(), type);
+                            parser->beginDefineId($2.getId(), type);
                             $$.setType(type);
                             $$.setPosition($1);
                         }
@@ -2893,21 +2893,21 @@ hintList
 hintItem
     : hintName
                         {
-                            $$.setExpr(createExprAttribute($1.getName()));
+                            $$.setExpr(createExprAttribute($1.getId()->lower()));
                             $$.setPosition($1);
                         }
     | hintName '(' beginList hintExprList ')'
                         {
                             HqlExprArray args;
                             parser->endList(args);
-                            $$.setExpr(createExprAttribute($1.getName(), args));
+                            $$.setExpr(createExprAttribute($1.getId()->lower(), args));
                             $$.setPosition($1);
                         }
     ;
 
 hintName
     : UNKNOWN_ID
-    | OUTPUT            {   $$.setName(outputAtom); }
+    | OUTPUT            {   $$.setId(outputId); }
     ;
 
 hintExprList
@@ -2946,7 +2946,7 @@ hintExpr
                         }
     | UNKNOWN_ID
                         {
-                            $$.setExpr(createAttribute($1.getName()), $1);
+                            $$.setExpr(createAttribute($1.getId()->lower()), $1);
                         }
     ;
 
@@ -3639,18 +3639,18 @@ paramDefinition
     : setType knownOrUnknownId defvalue 
                         {   
                             $$.clear(); 
-                            parser->addParameter($1, $2.getName(), $1.getType(), $3.getExpr());
+                            parser->addParameter($1, $2.getId(), $1.getType(), $3.getExpr());
                         }
     | paramType knownOrUnknownId defvalue   
                         {   
                             $$.clear();
-                            parser->addParameter($1, $2.getName(), $1.getType(), $3.getExpr());
+                            parser->addParameter($1, $2.getId(), $1.getType(), $3.getExpr());
                         }
     | UNKNOWN_ID defvalue
                         {
                            $$.clear();
                            parser->addListElement(createAttribute(noTypeAtom));
-                           parser->addParameter($1, $1.getName(), LINK(parser->defaultIntegralType), $2.getExpr());
+                           parser->addParameter($1, $1.getId(), LINK(parser->defaultIntegralType), $2.getExpr());
                         }
     | anyFunction defvalue
                         {
@@ -3658,34 +3658,34 @@ paramDefinition
                            $$.clear();
                            parser->addListElement(createAttribute(noTypeAtom));
                            OwnedHqlExpr func = $1.getExpr();
-                           parser->addParameter($1, func->queryName(), LINK(parser->defaultIntegralType), $2.getExpr());
+                           parser->addParameter($1, func->queryId(), LINK(parser->defaultIntegralType), $2.getExpr());
                         }
     | ANY DATASET knownOrUnknownId
                         {
                             $$.clear();
-                            parser->addParameter($1, $3.getName(), makeTableType(makeRowType(queryNullRecord()->getType()), NULL, NULL, NULL), NULL);
+                            parser->addParameter($1, $3.getId(), makeTableType(makeRowType(queryNullRecord()->getType()), NULL, NULL, NULL), NULL);
                         }
     | ANY knownOrUnknownId defvalue
                         {
                             $$.clear();
                             parser->setTemplateAttribute();
-                            parser->addParameter($1, $2.getName(), makeAnyType(), $3.getExpr());
+                            parser->addParameter($1, $2.getId(), makeAnyType(), $3.getExpr());
                         }
     | paramType knownOrUnknownId nestedParmdef defFuncValue
                         {
                             $$.clear();
-                            parser->addFunctionParameter($1, $2.getName(), $1.getType(), $4.getExpr());
+                            parser->addFunctionParameter($1, $2.getId(), $1.getType(), $4.getExpr());
                         }
     | setType knownOrUnknownId nestedParmdef defFuncValue
                         {
                             $$.clear();
-                            parser->addFunctionParameter($1, $2.getName(), $1.getType(), $4.getExpr());
+                            parser->addFunctionParameter($1, $2.getId(), $1.getType(), $4.getExpr());
                         }
  // Use a function as a prototype for the argument type - kind of a substitute for a typedef
     | anyFunction UNKNOWN_ID defFuncValue
                         {
                             $$.clear();
-                            parser->addFunctionProtoParameter($1, $2.getName(), $1.getExpr(), $3.getExpr());
+                            parser->addFunctionProtoParameter($1, $2.getId(), $1.getExpr(), $3.getExpr());
                         }
     ;
 
@@ -3750,7 +3750,7 @@ funcDef
     : funcRetType knownOrUnknownId realparmdef attribs ';'
                         {
                             $$.clear($1);
-                            _ATOM name = $2.getName();
+                            IIdAtom * name = $2.getId();
                             OwnedITypeInfo type = $1.getType();
                             OwnedHqlExpr attrs = $4.getExpr();
                             parser->processServiceFunction($2, name, attrs, type);
@@ -3758,7 +3758,7 @@ funcDef
     | knownOrUnknownId realparmdef attribs ';'
                         {
                             $$.clear($1);
-                            _ATOM name = $1.getName();
+                            IIdAtom * name = $1.getId();
                             OwnedITypeInfo type = makeVoidType();
                             OwnedHqlExpr attrs = $3.getExpr();
                             parser->processServiceFunction($1, name, attrs, type);
@@ -3780,21 +3780,21 @@ attrib
     : knownOrUnknownId EQ UNKNOWN_ID        
                         {
                             parser->reportWarning(WRN_OBSOLETED_SYNTAX,$1.pos,"Syntax obsoleted; use alternative: id = '<string constant>'");
-                            $$.setExpr(createAttribute($1.getName(), createConstant(*$3.getName())));
+                            $$.setExpr(createAttribute($1.getId()->lower(), createConstant(*$3.getId())));
                         }
     | knownOrUnknownId EQ const
                         {
-                            $$.setExpr(createAttribute($1.getName(), $3.getExpr()), $1);
+                            $$.setExpr(createAttribute($1.getId()->lower(), $3.getExpr()), $1);
                         }
     | knownOrUnknownId                  
-                        {   $$.setExpr(createAttribute($1.getName()));  }
+                        {   $$.setExpr(createAttribute($1.getId()->lower()));  }
     | knownOrUnknownId '(' const ')'
                         {
-                            $$.setExpr(createAttribute($1.getName(), $3.getExpr()), $1);
+                            $$.setExpr(createAttribute($1.getId()->lower(), $3.getExpr()), $1);
                         }
     | knownOrUnknownId '(' const ',' const ')'
                         {
-                            $$.setExpr(createAttribute($1.getName(), $3.getExpr(), $5.getExpr()), $1);
+                            $$.setExpr(createAttribute($1.getId()->lower(), $3.getExpr(), $5.getExpr()), $1);
                         }
     ;
 
@@ -3928,7 +3928,7 @@ recordDef
     | recordDef '-' UNKNOWN_ID
                         {
                             OwnedHqlExpr left = $1.getExpr();
-                            OwnedHqlExpr right = createAttribute($3.getName());
+                            OwnedHqlExpr right = createId($3.getId());
                             $$.setExpr(parser->createRecordExcept(left, right, $1));
                             $$.setPosition($1);
                             parser->checkRecordIsValid($1, $$.queryExpr());
@@ -3952,7 +3952,7 @@ recordDef
     | recordDef AND NOT UNKNOWN_ID
                         {
                             OwnedHqlExpr left = $1.getExpr();
-                            OwnedHqlExpr right = createAttribute($4.getName());
+                            OwnedHqlExpr right = createId($4.getId());
                             $$.setExpr(parser->createRecordExcept(left, right, $1));
                             $$.setPosition($1);
                             parser->checkRecordIsValid($1, $$.queryExpr());
@@ -4018,12 +4018,12 @@ dsEnd
 
 UnknownIdList
     : UNKNOWN_ID        {
-                            $$.setExpr(createAttribute($1.getName()));
+                            $$.setExpr(createId($1.getId()));
                             $$.setPosition($1);
                         }
     | UnknownIdList ',' UNKNOWN_ID
                         {
-                            $$.setExpr(createComma($1.getExpr(), createAttribute($3.getName())));
+                            $$.setExpr(createComma($1.getExpr(), createId($3.getId())));
                             $$.setPosition($1);
                         }
     ;
@@ -4142,7 +4142,7 @@ fieldDef
                             parser->normalizeExpression($1);
                             IHqlExpression *value = $1.getExpr();
 
-                            _ATOM name = parser->createFieldNameFromExpr(value);
+                            IIdAtom * name = parser->createFieldNameFromExpr(value);
 
                             IHqlExpression * attrs = extractAttrsFromExpr(value);
 
@@ -4157,12 +4157,12 @@ fieldDef
                             {
                                 //The following adds the field instead of creating a new field based on the old one.
                                 //More efficient, but changes a few CRCs, so disabled for moment.
-                                parser->checkFieldnameValid($1, field->queryName());
+                                parser->checkFieldnameValid($1, field->queryId());
                                 parser->addToActiveRecord(LINK(field));
                             }
                             else
                             {
-                                _ATOM name = parser->createFieldNameFromExpr(value);
+                                IIdAtom * name = parser->createFieldNameFromExpr(value);
                                 IHqlExpression * attrs = extractAttrsFromExpr(value);
 
                                 parser->addField($1, name, value->getType(), NULL, attrs);
@@ -4177,12 +4177,12 @@ fieldDef
                                 //The following adds the field instead of creating a new field based on the old one.
                                 //More efficient, but changes a few CRCs, so disabled for moment.
                                 IHqlExpression * field = queryFieldFromSelect(value);
-                                parser->checkFieldnameValid($1, field->queryName());
+                                parser->checkFieldnameValid($1, field->queryId());
                                 parser->addToActiveRecord(LINK(field));
                             }
                             else
                             {
-                                _ATOM name = parser->createFieldNameFromExpr(value);
+                                IIdAtom * name = parser->createFieldNameFromExpr(value);
                                 IHqlExpression * attrs = extractAttrsFromExpr(value);
 
                                 parser->addField($1, name, value->getType(), NULL, attrs);
@@ -4199,7 +4199,7 @@ fieldDef
                             IHqlExpression *attrs = $2.getExpr();
                             if (!attrs)
                                 attrs = extractAttrsFromExpr(value);
-                            parser->addField($1, $1.getName(), value->getType(), value, attrs);
+                            parser->addField($1, $1.getId(), value->getType(), value, attrs);
                             $$.clear();
                         }
     | UNKNOWN_ID optFieldAttrs ASSIGN dataRow
@@ -4208,7 +4208,7 @@ fieldDef
                             IHqlExpression *attrs = $2.getExpr();
                             if (!attrs)
                                 attrs = extractAttrsFromExpr(value);
-                            parser->addField($1, $1.getName(), makeRowType(LINK(value->queryRecordType())), value, attrs);
+                            parser->addField($1, $1.getId(), makeRowType(LINK(value->queryRecordType())), value, attrs);
                             $$.clear();
                         }
     | typeDef knownOrUnknownId optFieldAttrs defaultValue
@@ -4220,7 +4220,7 @@ fieldDef
                             OwnedITypeInfo type = $1.getType();
                             if (type->getTypeCode() == type_record)
                                 type.setown(makeRowType(type.getClear()));
-                            parser->addField($2, $2.getName(), type.getClear(), value, $3.getExpr());
+                            parser->addField($2, $2.getId(), type.getClear(), value, $3.getExpr());
                         }
     | ANY knownOrUnknownId optFieldAttrs defaultValue
                         {
@@ -4229,7 +4229,7 @@ fieldDef
 
                             //Syntactic oddity.  A record means a row of that record type.
                             OwnedITypeInfo type = makeAnyType();
-                            parser->addField($2, $2.getName(), type.getClear(), value, $3.getExpr());
+                            parser->addField($2, $2.getId(), type.getClear(), value, $3.getExpr());
                         }
     | typeDef knownOrUnknownId '[' expression ']' optFieldAttrs defaultValue
                         {
@@ -4249,7 +4249,7 @@ fieldDef
 
                             IHqlExpression *value = $7.getExpr();
                             Owned<ITypeInfo> datasetType = makeTableType(makeRowType(createRecordType(record)), NULL, NULL, NULL);
-                            parser->addDatasetField($2, $2.getName(), datasetType, value, attrs.getClear());
+                            parser->addDatasetField($2, $2.getId(), datasetType, value, attrs.getClear());
                         }
     | setType knownOrUnknownId optFieldAttrs defaultValue
                         {
@@ -4257,36 +4257,36 @@ fieldDef
                             IHqlExpression *value = $4.getExpr();
 
                             ITypeInfo *type = $1.getType();
-                            parser->addField($2, $2.getName(), type, value, $3.getExpr());
+                            parser->addField($2, $2.getId(), type, value, $3.getExpr());
                         }
     | explicitDatasetType knownOrUnknownId optFieldAttrs defaultValue
                         {
                             $$.clear($1);
                             Owned<ITypeInfo> type = $1.getType();
-                            parser->addDatasetField($2, $2.getName(), type, $4.getExpr(), $3.getExpr());
+                            parser->addDatasetField($2, $2.getId(), type, $4.getExpr(), $3.getExpr());
                         }
     | UNKNOWN_ID optFieldAttrs ASSIGN dataSet
                         {
                             IHqlExpression * value = $4.getExpr();
-                            parser->addDatasetField($1, $1.getName(), NULL, value, $2.getExpr());
+                            parser->addDatasetField($1, $1.getId(), NULL, value, $2.getExpr());
                             $$.clear();
                         }
     | explicitDictionaryType knownOrUnknownId optFieldAttrs defaultValue
                         {
                             $$.clear($1);
                             Owned<ITypeInfo> type = $1.getType();
-                            parser->addDictionaryField($2, $2.getName(), type, $4.getExpr(), $3.getExpr());
+                            parser->addDictionaryField($2, $2.getId(), type, $4.getExpr(), $3.getExpr());
                         }
     | UNKNOWN_ID optFieldAttrs ASSIGN dictionary
                         {
                             IHqlExpression * value = $4.getExpr();
-                            parser->addDictionaryField($1, $1.getName(), value->queryType(), value, $2.getExpr());
+                            parser->addDictionaryField($1, $1.getId(), value->queryType(), value, $2.getExpr());
                             $$.clear();
                         }
     | alienTypeInstance knownOrUnknownId optFieldAttrs defaultValue
                         {
                             $$.clear($1);
-                            parser->addField($2, $2.getName(), $1.getType(), $4.getExpr(), $3.getExpr());
+                            parser->addField($2, $2.getId(), $1.getType(), $4.getExpr(), $3.getExpr());
                         }
     | recordDef         {
                             //This distinguish between an inline record definition, and an out-of-line definition
@@ -4299,7 +4299,7 @@ fieldDef
                             parser->normalizeExpression($1);
                             IHqlExpression *value = $1.getExpr();
 
-                            _ATOM name = parser->createFieldNameFromExpr(value);
+                            IIdAtom * name = parser->createFieldNameFromExpr(value);
 
                             IHqlExpression * attrs = extractAttrsFromExpr(value);
 
@@ -4315,7 +4315,7 @@ fieldDef
     | dataRow               {
                             IHqlExpression *e = $1.getExpr();
                             IHqlExpression * attrs = extractAttrsFromExpr(e);
-                            _ATOM name = parser->createFieldNameFromExpr(e);
+                            IIdAtom * name = parser->createFieldNameFromExpr(e);
                             parser->addField($1, name, makeRowType(LINK(e->queryRecordType())), e, attrs);
                             //e->Release();
                             $$.clear();
@@ -4334,7 +4334,7 @@ fieldDef
                                 ForEachItemIn(i, items)
                                 {
                                     IHqlExpression * value = &items.item(i);
-                                    _ATOM name = parser->createFieldNameFromExpr(value);
+                                    IIdAtom * name = parser->createFieldNameFromExpr(value);
                                     IHqlExpression * attrs = extractAttrsFromExpr(value);
                                     parser->addField($1, name, value->getType(), LINK(value), attrs);
                                 }
@@ -4435,7 +4435,7 @@ fieldAttr
                             OwnedHqlExpr expr = $1.getExpr();
                             StringBuffer text;
                             getStringValue(text, expr);
-                            $$.setExpr(createAttribute(createIdentifierAtom(text.str())), $1);
+                            $$.setExpr(createAttribute(createAtom(text.str())), $1);
                         }
     | STRING_CONST '(' expression ')'
                         {
@@ -4443,7 +4443,7 @@ fieldAttr
                             OwnedHqlExpr expr = $1.getExpr();
                             StringBuffer text;
                             getStringValue(text, expr);
-                            $$.setExpr(createAttribute(createIdentifierAtom(text), $3.getExpr()), $1);
+                            $$.setExpr(createAttribute(createAtom(text), $3.getExpr()), $1);
                         }
     | LINKCOUNTED     
                         {
@@ -5206,7 +5206,7 @@ expr
                             {
                                 parser->normalizeExpression($1, type_unicode, false);
                                 parser->normalizeExpression($3, type_unicode, false);
-                                _ATOM locale = parser->ensureCommonLocale($1, $3);
+                                IAtom * locale = parser->ensureCommonLocale($1, $3);
                                 // cannot be certain of length of concatenated unicode string due to normalization
                                 ITypeInfo * type;
                                 if(($1.queryExprType()->getTypeCode() == type_utf8) && ($3.queryExprType()->getTypeCode() == type_utf8))
@@ -6379,7 +6379,7 @@ primexpr1
                             parser->normalizeExpression($3, type_unicode, false);
                             parser->normalizeExpression($5, type_unicode, false);
                             ::Release(parser->checkPromoteType($3, $5));
-                            _ATOM locale = parser->ensureCommonLocale($3, $5);
+                            IAtom * locale = parser->ensureCommonLocale($3, $5);
                             $$.setExpr(createValue(no_unicodeorder, makeIntType(4, true), $3.getExpr(), $5.getExpr(), createConstant(locale->str()), createConstant(3)));
                         }
     | UNICODEORDER '(' expression ',' expression ',' expression ')'
@@ -6398,7 +6398,7 @@ primexpr1
                         {
                             parser->normalizeExpression($3, type_unicode, false);
                             parser->normalizeExpression($5, type_unicode, false);
-                            _ATOM locale = parser->ensureCommonLocale($3, $5);
+                            IAtom * locale = parser->ensureCommonLocale($3, $5);
                             parser->normalizeExpression($8, type_int, false);
                             ::Release(parser->checkPromoteType($3, $5));
                             $$.setExpr(createValue(no_unicodeorder, makeIntType(4, true), $3.getExpr(), $5.getExpr(), createConstant(locale->str()), $8.getExpr()));
@@ -6764,7 +6764,7 @@ libraryName
                             //want to create a name based on the name of the scope reference, but one that will be commmoned up between all
                             //internal instances of the same library.
                             OwnedHqlExpr internal = $3.getExpr();
-                            _ATOM name = internal->queryName();
+                            IAtom * name = internal->queryName();
                             StringBuffer nameText;
                             nameText.append("lib").append(name).append("_").append(getExpressionCRC(internal));
                             OwnedHqlExpr nameExpr = createExprAttribute(nameAtom, createConstant(nameText.str()));
@@ -6794,7 +6794,7 @@ scopeProjectOpt
     : OPT               {   $$.setExpr(createAttribute(optAtom)); $$.setPosition($1); }
     | UNKNOWN_ID            // Will include known ids as well since they won't be returned as known ids.
                         {
-                            $$.setExpr(createAttribute($1.getName()));
+                            $$.setExpr(createId($1.getId()));
                             $$.setPosition($1);
                         }
     ;
@@ -6837,7 +6837,7 @@ globalValueAttribute
                             }
                             else
                             {
-                                _ATOM name = parser->createFieldNameFromExpr(rhs);
+                                IIdAtom * name = parser->createFieldNameFromExpr(rhs);
                                 const char * text = name ? name->str() : "?";
                                 parser->reportError(ERR_OBJ_NOACTIVEDATASET, $1, "No active dataset to resolve field '%s'", text);
                                 $$.setExpr(createNullExpr(rhs));
@@ -8460,7 +8460,7 @@ simpleDataSet
                             OwnedHqlExpr quoted = createExprAttribute(quoteAtom, LINK(empty));
                             OwnedHqlExpr separator = createExprAttribute(separatorAtom, LINK(empty));
                             OwnedHqlExpr mode = createValue(no_csv, makeNullType(), quoted.getClear(), separator.getClear(), option.getClear());
-                            OwnedHqlExpr field = createField(lineIdAtom, LINK(type), NULL);
+                            OwnedHqlExpr field = createField(lineId, LINK(type), NULL);
                             OwnedHqlExpr record = createRecord(field);
 
                             //LOCAL(expression) is now an overloaded the syntax, so disambiguate here...
@@ -10694,23 +10694,23 @@ optActualValue
 namedActual
     : UNKNOWN_ID ASSIGN actualValue
                         {
-                            parser->addNamedActual($1, $1.getName(), $3.getExpr());
+                            parser->addNamedActual($1, $1.getId(), $3.getExpr());
                             $$.clear();
                             $$.setPosition($1);
                         }
     | NAMED UNKNOWN_ID ASSIGN actualValue
                         {
-                            parser->addNamedActual($1, $2.getName(), $4.getExpr());
+                            parser->addNamedActual($1, $2.getId(), $4.getExpr());
                             $$.clear();
                             $$.setPosition($1);
                         }
     | goodObject ASSIGN actualValue
                         {
                             OwnedHqlExpr nameExpr = $1.getExpr();
-                            _ATOM name = nameExpr->queryName();
+                            IIdAtom * name = nameExpr->queryId();
                             if (!name)
                             {
-                                name = unknownAtom;
+                                name = unknownId;
                                 parser->reportError(ERR_EXPECTED_ID, $1, "Expected a parameter name");
                             }
                             parser->addNamedActual($1, name, $3.getExpr());
@@ -10965,8 +10965,8 @@ fieldMaps1
 fieldMap
     :  UNKNOWN_ID ASSIGN UNKNOWN_ID
                         {
-                            IHqlExpression* attr1 = createAttribute($1.getName());
-                            IHqlExpression* attr2 = createAttribute($3.getName());
+                            IHqlExpression* attr1 = createId($1.getId());
+                            IHqlExpression* attr2 = createId($3.getId());
                             parser->addListElement(createComma(attr1, attr2));
                             $$.clear();
                         }
@@ -11778,16 +11778,16 @@ pattern0
     | USE '(' UNKNOWN_ID ')'
                         {
                             parser->checkUseLocation($1);
-                            _ATOM moduleName = parser->globalScope->queryName();
+                            IAtom * moduleName = parser->globalScope->queryName();
                             IHqlExpression * module = moduleName ? createAttribute(moduleAtom, createAttribute(moduleName)) : NULL;
-                            IHqlExpression * id = createAttribute(nameAtom, createAttribute($3.getName()));
+                            IHqlExpression * id = createAttribute(nameAtom, createId($3.getId()));
                             $$.setExpr(createValue(no_pat_use, makeRuleType(NULL), id, module));
                         }
     | USE '(' UNKNOWN_ID '.' UNKNOWN_ID ')'
                         {
                             parser->checkUseLocation($1);
-                            IHqlExpression * module = createAttribute(moduleAtom, createAttribute($3.getName()));
-                            IHqlExpression * id = createAttribute(nameAtom, createAttribute($5.getName()));
+                            IHqlExpression * module = createAttribute(moduleAtom, createId($3.getId()));
+                            IHqlExpression * id = createAttribute(nameAtom, createId($5.getId()));
                             $$.setExpr(createValue(no_pat_use, makeRuleType(NULL), module, id));
                         }
     | USE '(' recordDef ',' stringConstExpr ')'
@@ -11799,17 +11799,17 @@ pattern0
     | USE '(' recordDef ',' UNKNOWN_ID ')'
                         {
                             parser->checkUseLocation($1);
-                            _ATOM moduleName = parser->globalScope->queryName();
+                            IAtom * moduleName = parser->globalScope->queryName();
                             IHqlExpression * module = moduleName ? createAttribute(moduleAtom, createAttribute(moduleName)) : NULL;
-                            IHqlExpression * id = createAttribute(nameAtom, createAttribute($5.getName()));
+                            IHqlExpression * id = createAttribute(nameAtom, createId($5.getId()));
                             OwnedHqlExpr record = $3.getExpr();
                             $$.setExpr(createValue(no_pat_use, makeRuleType(record->getType()), id, module));
                         }
     | USE '(' recordDef ',' UNKNOWN_ID '.' UNKNOWN_ID ')'
                         {
                             parser->checkUseLocation($1);
-                            IHqlExpression * module = createAttribute(moduleAtom, createAttribute($5.getName()));
-                            IHqlExpression * id = createAttribute(nameAtom, createAttribute($7.getName()));
+                            IHqlExpression * module = createAttribute(moduleAtom, createId($5.getId()));
+                            IHqlExpression * id = createAttribute(nameAtom, createId($7.getId()));
                             OwnedHqlExpr record = $3.getExpr();
                             $$.setExpr(createValue(no_pat_use, makeRuleType(record->getType()), module, id));
                         }
@@ -11911,12 +11911,12 @@ optPatternActualValue
 namedPatternActual
     : UNKNOWN_ID ASSIGN patternParamval
                         {
-                            parser->addNamedActual($1, $1.getName(), $3.getExpr());
+                            parser->addNamedActual($1, $1.getId(), $3.getExpr());
                             $$.clear($1);
                         }
     | NAMED UNKNOWN_ID ASSIGN patternParamval
                         {
-                            parser->addNamedActual($1, $2.getName(), $4.getExpr());
+                            parser->addNamedActual($1, $2.getId(), $4.getExpr());
                             $$.clear($1);
                         }
     ;
@@ -12020,7 +12020,7 @@ defineFeatureId
     : FEATURE knownOrUnknownId  
                         {
                             ITypeInfo *type = makeFeatureType();
-                            parser->beginDefineId($2.getName(), type);
+                            parser->beginDefineId($2.getId(), type);
                             $$.setType(type);
                             $$.setPosition($1);
                         }

文件差異過大導致無法顯示
+ 221 - 207
ecl/hql/hqlgram2.cpp


+ 38 - 14
ecl/hql/hqlir.cpp

@@ -272,7 +272,7 @@ const char * getOperatorIRText(node_operator op)
     EXPAND_CASE(no,delayedscope);
     EXPAND_CASE(no,assertconcrete);
     EXPAND_CASE(no,unboundselect);
-    EXPAND_CASE(no,unused23);
+    EXPAND_CASE(no,id);
     EXPAND_CASE(no,unused24);
     EXPAND_CASE(no,dataset_from_transform);
     EXPAND_CASE(no,childquery);
@@ -815,13 +815,14 @@ public:
 class ExprBuilderInfo
 {
 public:
-    ExprBuilderInfo() : type(0), name(NULL), sequence(0) {}
+    ExprBuilderInfo() : type(0), name(NULL), id(NULL), sequence(0) {}
 
     inline void addOperand(exprid_t id) { args.append((unsigned)id); }
 
 public:
     typeid_t type;
-    _ATOM name;
+    IAtom * name;
+    IIdAtom * id;
     unsigned __int64 sequence;
     IdArray args;
     IdArray special;
@@ -831,7 +832,7 @@ public:
 class ExprAnnotationBuilderInfo
 {
 public:
-    ExprAnnotationBuilderInfo() : expr(0), name(NULL), value(0), col(0), warning(NULL), tree(NULL) {}
+    ExprAnnotationBuilderInfo() : expr(0), name(NULL), value(0), line(0), col(0), warning(NULL), tree(NULL) {}
 
 public:
     exprid_t expr;
@@ -839,6 +840,7 @@ public:
     IECLError * warning;
     IPropertyTree * tree;
     unsigned value;
+    unsigned line;
     unsigned col;
     IdArray args;
 };
@@ -953,7 +955,8 @@ protected:
     inline void read(X & x) const { in->read(sizeof(x), &x); }
     template <class X>
     void readPacked(X & value) const { read(value); }
-    _ATOM readName();
+    IIdAtom * readSymId();
+    IAtom * readName();
 
     exprid_t readId() const;
 
@@ -1073,6 +1076,7 @@ exprid_t BinaryIRPlayer::readExpr()
 
     ExprBuilderInfo info;
     info.type = readId();
+    info.id = readSymId();
     info.name = readName();
     loop
     {
@@ -1090,7 +1094,12 @@ void BinaryIRPlayer::processReturn()
     target->addReturn(id);
 }
 
-_ATOM BinaryIRPlayer::readName()
+IIdAtom * BinaryIRPlayer::readSymId()
+{
+    return NULL;
+}
+
+IAtom * BinaryIRPlayer::readName()
 {
     return NULL;
 }
@@ -1283,13 +1292,15 @@ public:
                 line.append(" shared");
             if (info.value & ob_virtual)
                 line.append(" virtual");
+            if (info.line)
+                line.append("@").append(info.line);
             break;
         case annotate_location:
             line.append("location '").append(info.name);
             line.append("'");
-            if (info.value)
+            if (info.line)
             {
-                line.append(",").append(info.value);
+                line.append(",").append(info.line);
                 if (info.col)
                     line.append(",").append(info.col);
             }
@@ -1427,8 +1438,10 @@ protected:
     void appendExprText(node_operator op, const ExprBuilderInfo & info)
     {
         line.append(getOperatorIRText(op));
-        if (info.name)
-            line.append("#").append(info.name);
+        if (info.id)
+            line.append("#").append(info.id->str());
+        else if (info.name)
+            line.append("#").append(info.name->str());
         if (info.sequence)
             line.append("[seq(").append(info.sequence).append(")]");
 
@@ -1851,7 +1864,7 @@ id_t ExpressionIRPlayer::doProcessType(ITypeInfo * type)
         case type_data:
         case type_qstring:
             info.length = type->getStringLen();
-            return target->addUnknownType(tc);
+            break;
         case type_set:
         case type_row:
         case type_pattern:
@@ -1861,12 +1874,12 @@ id_t ExpressionIRPlayer::doProcessType(ITypeInfo * type)
         case type_table:    // more??
         case type_groupedtable:
         case type_dictionary:
+        case type_function:
             {
                 CompoundTypeBuilderInfo info;
                 info.baseType = processType(type->queryChildType());
                 return target->addCompoundType(tc, info);
             }
-        case type_function:
         case type_feature:
             return target->addUnknownType(tc);
         case type_none:
@@ -1985,6 +1998,15 @@ id_t ExpressionIRPlayer::doProcessExpr(IHqlExpression * expr)
                 info.special.append(processExpr(&scopeSymbols.item(i)));
             break;
         }
+    case no_type:
+        {
+            IHqlAlienTypeInfo * alienType = queryAlienType(expr->queryType());
+            //MORE: Need to output information about members of the scope, but no functions are avaiable to generate it...
+            info.special.append(processExpr(alienType->queryLoadFunction()));
+            info.special.append(processExpr(alienType->queryLengthFunction()));
+            info.special.append(processExpr(alienType->queryStoreFunction()));
+            break;
+        }
     }
 
     if (getRequiredTypeCode(op) == type_none)
@@ -2044,15 +2066,17 @@ id_t ExpressionIRPlayer::doProcessAnnotation(IHqlExpression * expr)
     case annotate_symbol:
         {
             IHqlNamedAnnotation * annotation = static_cast<IHqlNamedAnnotation *>(expr->queryAnnotation());
-            info.name = expr->queryName()->str();
+            info.name = expr->queryId()->str();
             info.value = annotation->isExported() ? ob_exported : annotation->isShared() ? ob_shared : 0;
             if (annotation->isVirtual())
                 info.value |= ob_virtual;
+            info.line = expr->getStartLine();
+            info.col = expr->getStartColumn();
             break;
         }
     case annotate_location:
         info.name = expr->querySourcePath()->str();
-        info.value = expr->getStartLine();
+        info.line = expr->getStartLine();
         info.col = expr->getStartColumn();
         break;
     case annotate_meta:

+ 5 - 4
ecl/hql/hqllex.l

@@ -72,7 +72,8 @@ int HqlLex::lookupIdentifierToken(YYSTYPE & returnToken, HqlLex * lexer, bool lo
         return '$';
         
     /* check $ */
-    _ATOM name = createIdentifierAtom(tokenText);
+    IIdAtom * cname = createIdAtom(tokenText);
+    IAtom * name = cname->queryLower();
     if (lexer->macroParms)
     {
         StringBuffer macroval;
@@ -86,10 +87,10 @@ int HqlLex::lookupIdentifierToken(YYSTYPE & returnToken, HqlLex * lexer, bool lo
     IHqlExpression *expr; 
     //fprintf(stderr, "\nLookupSymbol %s\n",name->str());
     //Lookup expr last otherwise it leaks.
-    if ( !lookup  || lexer->macroGathering || lexer->skipping|| !(expr=lexer->lookupSymbol(name,returnToken)))
+    if ( !lookup  || lexer->macroGathering || lexer->skipping|| !(expr=lexer->lookupSymbol(cname,returnToken)))
     {
         TraceReturnToken(UNKNOWN_ID);
-        returnToken.setName(name);
+        returnToken.setId(cname);
         return UNKNOWN_ID;
     }
 
@@ -225,7 +226,7 @@ int HqlLex::lookupIdentifierToken(YYSTYPE & returnToken, HqlLex * lexer, bool lo
     if (!lexer->parserExpecting(token, activeState) && lexer->parserExpecting(UNKNOWN_ID, activeState))
     {
         returnToken.release();
-        returnToken.setName(name);
+        returnToken.setId(cname);
         token = UNKNOWN_ID;
     }
 

+ 3 - 3
ecl/hql/hqlmeta.cpp

@@ -51,8 +51,8 @@ static IHqlExpression * cacheAnyOrderSortlist;
 
 MODULE_INIT(INIT_PRIORITY_STANDARD)
 {
-    _ATOM groupedOrderAtom = createAtom("{group-order}");
-    _ATOM anyOrderAtom = createAtom("{any}");
+    IAtom * groupedOrderAtom = createAtom("{group-order}");
+    IAtom * anyOrderAtom = createAtom("{any}");
     cacheGroupedElement = createAttribute(groupedOrderAtom);
     cacheUnknownAttribute = createAttribute(unknownAtom);
     cacheIndeterminateAttribute = createAttribute(indeterminateAtom);
@@ -1544,7 +1544,7 @@ IHqlExpression * createMatchingDistribution(IHqlExpression * expr, const HqlExpr
     case no_attr:
     case no_attr_expr:
         {
-            _ATOM name = expr->queryName();
+            IAtom * name = expr->queryName();
             if (name == internalAtom)
             {
                 //HASH,internal - only valid if the types of the old and new sorts match exactly

+ 26 - 25
ecl/hql/hqlparse.cpp

@@ -141,7 +141,7 @@ protected:
 public:
     CHqlParserPseduoScope(HqlGram * _parser) : CHqlScope(no_privatescope) { parser = _parser; }
 
-    virtual IHqlExpression *lookupSymbol(_ATOM name, unsigned lookupFlags, HqlLookupContext & ctx)
+    virtual IHqlExpression *lookupSymbol(IIdAtom * name, unsigned lookupFlags, HqlLookupContext & ctx)
     {
         attribute errpos;
         errpos.clearPosition();
@@ -262,7 +262,7 @@ StringBuffer &HqlLex::getTokenText(StringBuffer &ret)
     return ret.append(yyPosition - yyStartPos, yyBuffer+yyStartPos);
 }
 
-IHqlExpression *HqlLex::lookupSymbol(_ATOM name, const attribute& errpos) 
+IHqlExpression *HqlLex::lookupSymbol(IIdAtom * name, const attribute& errpos)
 {
     return yyParser->lookupSymbol(name, errpos);
 }
@@ -329,14 +329,15 @@ void HqlLex::pushText(const char *s)
 #endif
 }
 
-void HqlLex::setMacroParam(const YYSTYPE & errpos, IHqlExpression* funcdef, StringBuffer& curParam, _ATOM argumentName, unsigned& parmno,IProperties *macroParms)
+void HqlLex::setMacroParam(const YYSTYPE & errpos, IHqlExpression* funcdef, StringBuffer& curParam, IIdAtom * argumentId, unsigned& parmno,IProperties *macroParms)
 {
     IHqlExpression * formals = queryFunctionParameters(funcdef);
     IHqlExpression * defaults = queryFunctionDefaults(funcdef);
     unsigned numFormals = formals->numChildren();
     unsigned thisParam = (unsigned)-1;
-    if (argumentName)
+    if (argumentId)
     {
+        IAtom * argumentName = argumentId->lower();
         unsigned argNum = 0;
         for (unsigned i=0; i < numFormals; i++)
         {
@@ -348,7 +349,7 @@ void HqlLex::setMacroParam(const YYSTYPE & errpos, IHqlExpression* funcdef, Stri
         }
 
         if (argNum == 0)
-            reportError(errpos, ERR_NAMED_PARAM_NOT_FOUND, "Named parameter '%s' not found in macro", argumentName->str());
+            reportError(errpos, ERR_NAMED_PARAM_NOT_FOUND, "Named parameter '%s' not found in macro", argumentId->str());
         else
             thisParam = argNum;
     }
@@ -413,8 +414,8 @@ void HqlLex::pushMacro(IHqlExpression *expr)
     IHqlExpression * defaults = expr->queryChild(2);
     unsigned formalParmCt = formals->numChildren();
     unsigned parmno = 0;
-    _ATOM possibleName = NULL;
-    _ATOM argumentName = NULL;
+    IIdAtom * possibleName = NULL;
+    IIdAtom * argumentName = NULL;
     while (parenDepth)
     {
         tok = yyLex(nextToken, false, 0);
@@ -473,7 +474,7 @@ void HqlLex::pushMacro(IHqlExpression *expr)
             // no attempt to recover at the end of the file, but cleanup is needed.
             return;
         case UNKNOWN_ID:
-            possibleName = nextToken.getName();
+            possibleName = nextToken.getId();
             //fall through
         default:
             curParam.append(' ');
@@ -746,7 +747,7 @@ void HqlLex::doDeclare(YYSTYPE & returnToken)
     StringBuffer forwhat;
     forwhat.appendf("#DECLARE(%d,%d)",returnToken.pos.lineno,returnToken.pos.column);
 
-    _ATOM name = NULL;
+    IIdAtom * name = NULL;
     if (yyLex(returnToken, false,0) != '(')
     {
         reportError(returnToken, ERR_EXPECTED_LEFTCURLY, "( expected"); 
@@ -773,7 +774,7 @@ void HqlLex::doDeclare(YYSTYPE & returnToken)
             continue;
         }
     
-        name = returnToken.getName();
+        name = returnToken.getId();
         declareXmlSymbol(returnToken, name->getAtomNamePtr());
         
         tok = yyLex(returnToken, false,0);
@@ -833,7 +834,7 @@ void HqlLex::doSet(YYSTYPE & returnToken, bool append)
     StringBuffer forwhat;
     forwhat.appendf("%s(%d,%d)",append?"#APPEND":"#SET",returnToken.pos.lineno,returnToken.pos.column);
 
-    _ATOM name = NULL;
+    IIdAtom * name = NULL;
     if (yyLex(returnToken, false,0) != '(')
     {
         reportError(returnToken, ERR_EXPECTED_LEFTCURLY, "( expected"); 
@@ -846,7 +847,7 @@ void HqlLex::doSet(YYSTYPE & returnToken, bool append)
         returnToken.release();
         return;
     }
-    name = returnToken.getName();
+    name = returnToken.getId();
     if (yyLex(returnToken, false,0) != ',')
     {
         reportError(returnToken, ERR_EXPECTED_COMMA, ", expected"); 
@@ -879,7 +880,7 @@ void HqlLex::doLine(YYSTYPE & returnToken)
     int line = returnToken.pos.lineno, col = returnToken.pos.column;
     forwhat.appendf("LINE(%d,%d)",returnToken.pos.lineno,returnToken.pos.column);
 
-    _ATOM name = NULL;
+    IIdAtom * name = NULL;
     if (yyLex(returnToken, false,0) != '(')
     {
         reportError(returnToken, ERR_EXPECTED_LEFTCURLY, "( expected"); 
@@ -928,7 +929,7 @@ void HqlLex::doError(YYSTYPE & returnToken, bool isError)
     StringBuffer forwhat;
     forwhat.appendf("%s(%d,%d)",isError?"#ERROR":"#WARNING",returnToken.pos.lineno,returnToken.pos.column);
 
-    _ATOM name = NULL;
+    IIdAtom * name = NULL;
     if (yyLex(returnToken, false,0) != '(')
     {
         reportError(returnToken, ERR_EXPECTED_LEFTCURLY, "( expected"); 
@@ -964,7 +965,7 @@ void HqlLex::doExport(YYSTYPE & returnToken, bool toXml)
     StringBuffer forwhat;
     forwhat.appendf("#EXPORT(%d,%d)",returnToken.pos.lineno,returnToken.pos.column);
 
-    _ATOM exportname = NULL;
+    IIdAtom * exportname = NULL;
     if (yyLex(returnToken, false,0) != '(')
     {
         reportError(returnToken, ERR_EXPECTED_LEFTCURLY, "( expected"); 
@@ -977,7 +978,7 @@ void HqlLex::doExport(YYSTYPE & returnToken, bool toXml)
         returnToken.release();
         return;
     }
-    exportname = returnToken.getName();
+    exportname = returnToken.getId();
     if (yyLex(returnToken, false,0) != ',')
     {
         reportError(returnToken, ERR_EXPECTED_COMMA, ", expected"); 
@@ -1034,7 +1035,7 @@ void HqlLex::doTrace(YYSTYPE & returnToken)
     StringBuffer forwhat;
     forwhat.appendf("#TRACE(%d,%d)",returnToken.pos.lineno,returnToken.pos.column);
 
-    _ATOM name = NULL;
+    IIdAtom * name = NULL;
     if (yyLex(returnToken, false,0) != '(')
     {
         reportError(returnToken, ERR_EXPECTED_LEFTCURLY, "( expected"); 
@@ -1074,7 +1075,7 @@ void HqlLex::doFor(YYSTYPE & returnToken, bool doAll)
     StringBuffer forwhat;
     forwhat.appendf("#FOR(%d,%d)",returnToken.pos.lineno,returnToken.pos.column);
 
-    _ATOM name = NULL;
+    IIdAtom * name = NULL;
     if (yyLex(returnToken, false,0) != '(')
     {
         reportError(returnToken, ERR_EXPECTED_LEFTCURLY, "( expected"); 
@@ -1087,7 +1088,7 @@ void HqlLex::doFor(YYSTYPE & returnToken, bool doAll)
         returnToken.release();
         return;
     }
-    name = returnToken.getName();
+    name = returnToken.getId();
     forFilter.clear();
     // Note - we gather the for filter and body in skip mode (deferring evaluation of #if etc) since the context will be different each time...
     skipping = 1;
@@ -1303,11 +1304,11 @@ static bool isInModule(HqlLookupContext & ctx, const char* moduleName, const cha
         const char* pAttr = attrName;
         while(*pAttr==' ') pAttr++;
 
-        OwnedHqlExpr match = ctx.queryRepository()->queryRootScope()->lookupSymbol(createIdentifierAtom(pModule), LSFpublic, ctx);
+        OwnedHqlExpr match = ctx.queryRepository()->queryRootScope()->lookupSymbol(createIdAtom(pModule), LSFpublic, ctx);
         IHqlScope * scope = match ? match->queryScope() : NULL;
         if (scope)
         {
-            OwnedHqlExpr expr = scope->lookupSymbol(createIdentifierAtom(pAttr), LSFpublic, ctx); 
+            OwnedHqlExpr expr = scope->lookupSymbol(createIdAtom(pAttr), LSFpublic, ctx); 
             if (expr)
                 return true;
         }
@@ -1335,7 +1336,7 @@ void HqlLex::doUniqueName(YYSTYPE & returnToken)
     } 
     else 
     {
-        _ATOM name = returnToken.getName();
+        IIdAtom * name = returnToken.getId();
         StringAttr pattern("__#__$__");
 
         tok = yyLex(returnToken, false,0);
@@ -1588,7 +1589,7 @@ bool HqlLex::getDefinedParameter(StringBuffer &curParam, YYSTYPE & returnToken,
                 {
                 case StateStart:
                     {
-                        expr.setown(lookupSymbol(returnToken.getName(), returnToken));
+                        expr.setown(lookupSymbol(returnToken.getId(), returnToken));
                         state = expr ? StateDot : StateFailed;
                         break;
                     }
@@ -1605,7 +1606,7 @@ bool HqlLex::getDefinedParameter(StringBuffer &curParam, YYSTYPE & returnToken,
                         IHqlScope * scope = expr->queryScope();
                         if (scope)
                         {
-                            expr.setown(yyParser->lookupSymbol(scope, returnToken.getName()));
+                            expr.setown(yyParser->lookupSymbol(scope, returnToken.getId()));
                             if (expr)
                                 state = StateDot;
                         }
@@ -1679,7 +1680,7 @@ IHqlExpression *HqlLex::parseECL(const char * text, IXmlScope *xmlScope, int sta
     MTIME_SECTION(timer, "HqlLex::parseConstExpression");
 #endif
     //  Use an ECL reserved word as the scope name to avoid name conflicts with these defined localscope.
-    Owned<IHqlScope> scope = new CHqlMultiParentScope(sharedAtom,yyParser->queryPrimaryScope(false),yyParser->queryPrimaryScope(true),yyParser->parseScope.get(),NULL); 
+    Owned<IHqlScope> scope = new CHqlMultiParentScope(sharedId,yyParser->queryPrimaryScope(false),yyParser->queryPrimaryScope(true),yyParser->parseScope.get(),NULL);
 
     HqlGramCtx parentContext(yyParser->lookupCtx);
     yyParser->saveContext(parentContext, false);

+ 2 - 2
ecl/hql/hqlpmap.cpp

@@ -1208,7 +1208,7 @@ void RecordTransformCreator::createAssignments(HqlExprArray & assigns, IHqlExpre
         {
             OwnedHqlExpr target = createSelectExpr(LINK(targetSelector), LINK(expr));
             OwnedHqlExpr source;
-            OwnedHqlExpr sourceField = sourceSelector->queryRecord()->querySimpleScope()->lookupSymbol(expr->queryName());
+            OwnedHqlExpr sourceField = sourceSelector->queryRecord()->querySimpleScope()->lookupSymbol(expr->queryId());
             if (sourceField)
                 source.setown(createSelectExpr(LINK(sourceSelector), LINK(sourceField)));
             else
@@ -1279,7 +1279,7 @@ IHqlExpression * createRecordMappingTransform(node_operator op, IHqlExpression *
 }
 
 
-IHqlExpression * replaceMemorySelectorWithSerializedSelector(IHqlExpression * expr, IHqlExpression * memoryRecord, node_operator side, IHqlExpression * selSeq, _ATOM serializeVariety)
+IHqlExpression * replaceMemorySelectorWithSerializedSelector(IHqlExpression * expr, IHqlExpression * memoryRecord, node_operator side, IHqlExpression * selSeq, IAtom * serializeVariety)
 {
     if (!expr) 
         return NULL;

+ 1 - 1
ecl/hql/hqlpmap.hpp

@@ -160,7 +160,7 @@ protected:
 
 
 extern HQL_API IHqlExpression * createRecordMappingTransform(node_operator op, IHqlExpression * targetRecord, IHqlExpression * sourceSelector);
-extern HQL_API IHqlExpression * replaceMemorySelectorWithSerializedSelector(IHqlExpression * expr, IHqlExpression * memoryRecord, node_operator side, IHqlExpression * selSeq, _ATOM serializeVariety);
+extern HQL_API IHqlExpression * replaceMemorySelectorWithSerializedSelector(IHqlExpression * expr, IHqlExpression * memoryRecord, node_operator side, IHqlExpression * selSeq, IAtom * serializeVariety);
 
 extern HQL_API TableProjectMapper * createProjectMapper(IHqlExpression * expr);
 extern HQL_API TableProjectMapper * createProjectMapper(IHqlExpression * mapping, IHqlExpression * parent);

+ 20 - 20
ecl/hql/hqlrepository.cpp

@@ -76,7 +76,7 @@ extern HQL_API void importRootModulesToScope(IHqlScope * scope, HqlLookupContext
     ForEachItemIn(i, rootScopes)
     {
         IHqlScope & cur = rootScopes.item(i);
-        _ATOM curName = cur.queryName();
+        IIdAtom * curName = cur.queryId();
         OwnedHqlExpr resolved = eclRepository->queryRootScope()->lookupSymbol(curName, LSFpublic, ctx);
         if (resolved)
             scope->defineSymbol(curName, NULL, resolved.getClear(), false, true, ob_import);
@@ -91,7 +91,7 @@ void lookupAllRootDefinitions(IHqlScope * scope, HqlLookupContext & ctx)
     scope->getSymbols(rootSymbols);
     ForEachItemIn(i, rootSymbols)
     {
-        ::Release(scope->lookupSymbol(rootSymbols.item(i).queryName(), LSFsharedOK, ctx));
+        ::Release(scope->lookupSymbol(rootSymbols.item(i).queryId(), LSFsharedOK, ctx));
     }
 }
 
@@ -113,15 +113,15 @@ IHqlExpression * getResolveAttributeFullPath(const char * attrname, unsigned loo
     do
     {
         dot = strchr(item, '.');
-        _ATOM moduleName;
+        IIdAtom * moduleName;
         if (dot)
         {
-            moduleName = createIdentifierAtom(item, dot-item);
+            moduleName = createIdAtom(item, dot-item);
             item = dot + 1;
         }
         else
         {
-            moduleName = createIdentifierAtom(item);
+            moduleName = createIdAtom(item);
         }
 
         OwnedHqlExpr resolved;
@@ -215,7 +215,7 @@ extern HQL_API IEclRepository * createCompoundRepository(EclRepositoryArray & re
 class HQL_API NestedEclRepository : public CInterface, implements IEclRepository
 {
 public:
-    NestedEclRepository(_ATOM name, IEclRepository * _repository) : repository(_repository)
+    NestedEclRepository(IIdAtom * name, IEclRepository * _repository) : repository(_repository)
     {
         rootScope.setown(createScope());
         IHqlExpression * scope = repository->queryRootScope()->queryExpression();
@@ -234,7 +234,7 @@ protected:
 
 //-------------------------------------------------------------------------------------------------------------------
 
-extern HQL_API IEclRepository * createNestedRepository(_ATOM name, IEclRepository * repository)
+extern HQL_API IEclRepository * createNestedRepository(IIdAtom * name, IEclRepository * repository)
 {
     if (!repository)
         return NULL;
@@ -243,14 +243,14 @@ extern HQL_API IEclRepository * createNestedRepository(_ATOM name, IEclRepositor
 
 //-------------------------------------------------------------------------------------------------------------------
 
-static _ATOM queryModuleFromFullName(const char * name)
+static IIdAtom * queryModuleIdFromFullName(const char * name)
 {
     if (!name)
         return NULL;
     const char * dot = strrchr(name, '.');
     if (dot)
-        return createAtom(dot+1);
-    return createAtom(name);
+        return createIdAtom(dot+1);
+    return createIdAtom(name);
 }
 
 class HQL_API CNewEclRepository : public CInterface, implements IEclRepositoryCallback
@@ -258,13 +258,13 @@ class HQL_API CNewEclRepository : public CInterface, implements IEclRepositoryCa
 public:
     CNewEclRepository(IEclSourceCollection * _collection, const char * rootScopeFullName) : collection(_collection)
     {
-        rootScope.setown(createRemoteScope(queryModuleFromFullName(rootScopeFullName), rootScopeFullName, this, NULL, NULL, true, NULL));
+        rootScope.setown(createRemoteScope(queryModuleIdFromFullName(rootScopeFullName), rootScopeFullName, this, NULL, NULL, true, NULL));
     }
     IMPLEMENT_IINTERFACE
 
     virtual IHqlScope * queryRootScope() { return rootScope->queryScope(); }
     virtual bool loadModule(IHqlRemoteScope *scope, IErrorReceiver *errs, bool forceAll);
-    virtual IHqlExpression * loadSymbol(IHqlRemoteScope *scope, IAtom * searchName);
+    virtual IHqlExpression * loadSymbol(IHqlRemoteScope *scope, IIdAtom * searchName);
 
 protected:
     IHqlExpression * createSymbol(IHqlRemoteScope * rScope, IEclSource * source);
@@ -294,7 +294,7 @@ bool CNewEclRepository::loadModule(IHqlRemoteScope * rScope, IErrorReceiver *err
     return true;
 }
 
-IHqlExpression * CNewEclRepository::loadSymbol(IHqlRemoteScope * rScope, IAtom * searchName)
+IHqlExpression * CNewEclRepository::loadSymbol(IHqlRemoteScope * rScope, IIdAtom * searchName)
 {
     IEclSource * parent = rScope->queryEclSource();
     Owned<IEclSource> source = collection->getSource(parent, searchName);
@@ -302,21 +302,21 @@ IHqlExpression * CNewEclRepository::loadSymbol(IHqlRemoteScope * rScope, IAtom *
 }
 
 
-static void getFullName(StringBuffer & fullName, IHqlScope * scope, _ATOM attrName)
+static void getFullName(StringBuffer & fullName, IHqlScope * scope, IIdAtom * attrName)
 {
     fullName.append(scope->queryFullName());
     if (fullName.length())
         fullName.append(".");
-    fullName.append(attrName);
+    fullName.append(attrName->str());
 }
 
 
 IHqlExpression * CNewEclRepository::createSymbol(IHqlRemoteScope * rScope, IEclSource * source)
 {
-    _ATOM eclName = source->queryEclName();
+    IIdAtom * eclId = source->queryEclId();
     IHqlScope * scope = rScope->queryScope();
     StringBuffer fullName;
-    getFullName(fullName, scope, eclName);
+    getFullName(fullName, scope, eclId);
 
     EclSourceType sourceType = source->queryType();
     IFileContents * contents = source->queryFileContents();
@@ -348,21 +348,21 @@ IHqlExpression * CNewEclRepository::createSymbol(IHqlRemoteScope * rScope, IEclS
             //Slightly ugly create a "delayed" nested scope instead.  But with a NULL owner - so will never be called back
             //Probably should be a difference class instance
             Owned<IProperties> props = source->getProperties();
-            Owned<IHqlRemoteScope> childScope = createRemoteScope(eclName, fullName.str(), NULL, props, contents, true, source);
+            Owned<IHqlRemoteScope> childScope = createRemoteScope(eclId, fullName.str(), NULL, props, contents, true, source);
             body.set(queryExpression(childScope->queryScope()));
             break;
         }
     case ESTcontainer:
         {
             Owned<IProperties> props = source->getProperties();
-            Owned<IHqlRemoteScope> childScope = createRemoteScope(eclName, fullName.str(), this, props, NULL, true, source);
+            Owned<IHqlRemoteScope> childScope = createRemoteScope(eclId, fullName.str(), this, props, NULL, true, source);
             body.set(queryExpression(childScope->queryScope()));
             break;
         }
     default:
         throwUnexpected();
     }
-    return ::createSymbol(eclName, scope->queryName(), body.getClear(), NULL, true, true, symbolFlags, contents, 0, 0, 0, 0, 0);
+    return ::createSymbol(eclId, scope->queryId(), body.getClear(), NULL, true, true, symbolFlags, contents, 0, 0, 0, 0, 0);
 }
 
 

+ 1 - 1
ecl/hql/hqlrepository.hpp

@@ -30,7 +30,7 @@ extern HQL_API IEclRepository * createCompoundRepositoryF(IEclRepository * repos
 extern HQL_API IEclRepository * createCompoundRepository(EclRepositoryArray & repositories);
 extern HQL_API IEclRepository * createRepository(IEclSourceCollection * source, const char * rootScopeFullName = NULL);
 extern HQL_API IEclRepository * createRepository(EclSourceCollectionArray & sources);
-extern HQL_API IEclRepository * createNestedRepository(_ATOM name, IEclRepository * root);
+extern HQL_API IEclRepository * createNestedRepository(IIdAtom * name, IEclRepository * root);
 
 extern HQL_API void getRootScopes(HqlScopeArray & rootScopes, IHqlScope * scope, HqlLookupContext & ctx);
 extern HQL_API void getRootScopes(HqlScopeArray & rootScopes, IEclRepository * repository, HqlLookupContext & ctx);

+ 30 - 32
ecl/hql/hqlthql.cpp

@@ -54,7 +54,7 @@ inline bool isInternalAttribute(IHqlExpression * e)
 {
     if (e->isAttribute())
     {
-        _ATOM name= e->queryName();
+        IAtom * name= e->queryName();
         if ((name == sequenceAtom) || isInternalAttributeName(name))
             return true;
         if ((name == updateAtom) && e->hasProperty(alwaysAtom))
@@ -131,7 +131,7 @@ private:
     IHqlExpression * queryMapped(IHqlExpression * expr);
     IHqlExpression * queryChild(IHqlExpression * e, unsigned i);
 
-    StringBuffer & appendAtom(StringBuffer & s, _ATOM name);
+    StringBuffer & appendId(StringBuffer & s, IIdAtom * name);
     StringBuffer & queryNewline(StringBuffer &s);
     
     bool          m_recurse;
@@ -187,30 +187,25 @@ HqltHql::~HqltHql()
     unlockTransformMutex();
 }
 
-StringBuffer & HqltHql::appendAtom(StringBuffer & s, _ATOM name)
+StringBuffer & HqltHql::appendId(StringBuffer & s, IIdAtom * id)
 {
-    if (lowerCaseIds)
-    {
-        StringBuffer lower;
-        lower.append(name).toLowerCase();
-        return s.append(lower);
-    }
-    return s.append(name);
+    //MORE: We may want to lose the case conversion and use return s.append(id->str());
+    return s.append(id->lower()->str());
 }
 
 
 StringBuffer &HqltHql::makeUniqueName(IHqlExpression * expr, StringBuffer &s)
 {
-    _ATOM moduleName = expr->queryFullModuleName();
+    IIdAtom * moduleName = expr->queryFullModuleId();
     if (moduleName && !ignoreModuleNames)
     {
         if (isPublicSymbol(expr))
         {
             if (xgmmlGraphText)
-                appendAtom(s, moduleName).append(".");
+                appendId(s, moduleName).append(".");
             else
             {
-                const char * moduleNameText = moduleName->str();
+                const char * moduleNameText = moduleName->lower()->str();
                 loop
                 {
                     const char * dot = strchr(moduleNameText, '.');
@@ -227,7 +222,7 @@ StringBuffer &HqltHql::makeUniqueName(IHqlExpression * expr, StringBuffer &s)
         }
     }
 
-    appendAtom(s, expr->queryName());
+    appendId(s, expr->queryId());
 #ifdef SHOWADDRSYM
     if (expandProcessed)
         s.appendf("[%p:%p]",expr, expr->queryBody());
@@ -267,6 +262,8 @@ IHqlExpression * HqltHql::queryMapped(IHqlExpression * expr)
         IHqlExpression * extra = (IHqlExpression *)expr->queryTransformExtra();
         if (!extra || extra->isAttribute() || extra == expr)
             return expr;
+        if (expr->queryName() == unnamedId->lower())
+            return expr;
         expr = extra;
     }
 }
@@ -369,7 +366,7 @@ StringBuffer &HqltHql::lookupSymbolName(IHqlExpression * expr, StringBuffer &s)
         if ((extra != expr) && !extra->isAttribute())
             return lookupSymbolName(extra, s);
 
-        return appendAtom(s, extra->queryName());
+        return appendId(s, extra->queryId());
     }
 
     makeUniqueName(expr, s);
@@ -856,9 +853,9 @@ void HqltHql::toECL(IHqlExpression *expr, StringBuffer &s, bool paren, bool inTy
             callEclFunction(s, expr, inType);
         }
     }
-    else if (!expandNamed && !expr->isAttribute() && expr->queryName() && expr->queryName() != unnamedAtom )
+    else if (!expandNamed && !expr->isAttribute() && expr->queryId() && expr->queryId()->lower() != unnamedId->lower() )
     {
-        appendAtom(s, expr->queryName());
+        appendId(s, expr->queryId());
     }
     else
     {
@@ -1441,7 +1438,7 @@ void HqltHql::toECL(IHqlExpression *expr, StringBuffer &s, bool paren, bool inTy
             {
                 if (isInternalAttribute(expr) && !expandProcessed)
                     break;
-                _ATOM name = expr->queryName();
+                IAtom * name = expr->queryName();
                 s.append(expr->queryName());
                 if (name == _workflowPersist_Atom || name == _original_Atom)
                 {
@@ -1662,7 +1659,7 @@ void HqltHql::toECL(IHqlExpression *expr, StringBuffer &s, bool paren, bool inTy
                             IHqlExpression *attr = expr->queryChild(kids);
                             if (attr->isAttribute())
                             {
-                                _ATOM name = attr->queryName();
+                                IAtom * name = attr->queryName();
                                 if (name != countAtom && name != sizeofAtom && 
                                     !(isInternalAttribute(attr) && !expandProcessed))
                                 {
@@ -2306,7 +2303,7 @@ void HqltHql::toECL(IHqlExpression *expr, StringBuffer &s, bool paren, bool inTy
             }
         case no_setmeta:
             {
-                _ATOM kind = expr->queryChild(0)->queryName();
+                IAtom * kind = expr->queryChild(0)->queryName();
                 if (kind == debugAtom)
                     s.append("#OPTION");
                 else if (kind == constAtom)
@@ -2694,7 +2691,7 @@ StringBuffer &HqltHql::getFieldTypeString(IHqlExpression * e, StringBuffer &s)
                 IHqlExpression * cur = e->queryChild(i);
                 if (cur->isAttribute())
                 {
-                    _ATOM name = cur->queryName();
+                    IAtom * name = cur->queryName();
                     if (name == countAtom || name == sizeofAtom)
                     {
                         toECL(cur, s.append(", "), false, false);
@@ -2736,7 +2733,7 @@ StringBuffer &HqltHql::getTypeString(ITypeInfo * i, StringBuffer &s)
         }
 
         StringBuffer tmp;
-        if(expr->queryName()==unnamedAtom)
+        if(expr->queryName()==unnamedId->lower())
         {
             HqlExprArray * visited = findVisitedArray();
             for (unsigned idx = 0; idx < visited->ordinality(); idx++)
@@ -2747,7 +2744,7 @@ StringBuffer &HqltHql::getTypeString(ITypeInfo * i, StringBuffer &s)
                 {
                     if(expr->queryType() == e->queryChild(1)->queryType())
                     {
-                        appendAtom(tmp, e->queryName());    
+                        appendId(tmp, e->queryId());
                         break;
                     }
                 }
@@ -2769,7 +2766,7 @@ StringBuffer &HqltHql::getTypeString(ITypeInfo * i, StringBuffer &s)
                 clashCounter++;
                 name.append("___").append(clashCounter);
             }
-            OwnedHqlExpr extra = createAttribute(createIdentifierAtom(name.str()));
+            OwnedHqlExpr extra = createId(createIdAtom(name.str()));
             expr->setTransformExtra(extra); // LINKs !
             addVisited(expr);
 
@@ -2782,8 +2779,9 @@ StringBuffer &HqltHql::getTypeString(ITypeInfo * i, StringBuffer &s)
         }
         else
         {
-            _ATOM nameAtom = ((IHqlExpression *)expr->queryTransformExtra())->queryName();
-            appendAtom(name.clear(), nameAtom);
+            IHqlExpression * prev = (IHqlExpression *)expr->queryTransformExtra();
+            IIdAtom * prevId = prev->queryId();
+            appendId(name.clear(), prevId);
         }
 
         if(tmp.length())
@@ -2962,13 +2960,13 @@ StringBuffer &HqltHql::doAlias(IHqlExpression * expr, StringBuffer &name, bool i
             makeUniqueName(expr, temp);
             clashCounter++;
             temp.append("___").append(clashCounter);
-            OwnedHqlExpr extra = createAttribute(createIdentifierAtom(temp.str()));
+            OwnedHqlExpr extra = createId(createIdAtom(temp.str()));
             expr->setTransformExtra(extra); // LINKs !
         }
 
 #ifdef SHOW_SYMBOL_LOCATION
         if (expandProcessed)
-            newdef.append(expr->queryFullModuleName()).append("(").append(expr->getStartLine()).append(",").append(expr->getStartColumn()).append("):");
+            newdef.append(expr->queryFullModuleId()).append("(").append(expr->getStartLine()).append(",").append(expr->getStartColumn()).append("):");
 #endif
         newdef.append(exports);
         lookupSymbolName(expr, name);
@@ -2984,7 +2982,7 @@ StringBuffer &HqltHql::doAlias(IHqlExpression * expr, StringBuffer &name, bool i
             {
                 if(!expr->queryTransformExtra())
                 {
-                    IHqlExpression * extra = createAttribute(createIdentifierAtom(name.str()));
+                    IHqlExpression * extra = createId(createIdAtom(name.str()));
                     expr->setTransformExtra(extra); // LINKs !
                     extra->Release();
                     addVisited(expr);
@@ -3000,7 +2998,7 @@ StringBuffer &HqltHql::doAlias(IHqlExpression * expr, StringBuffer &name, bool i
         }
         else if(!inType)
         {
-            OwnedHqlExpr extra = createAttribute(createIdentifierAtom(name.str()));
+            OwnedHqlExpr extra = createId(createIdAtom(name.str()));
             expr->setTransformExtra(extra); // LINKs !
             addVisited(expr);
         
@@ -3114,7 +3112,7 @@ void HqltHql::defineCallTarget(IHqlExpression * call, StringBuffer & name)
         StringBuffer newdef;
         m_service_names.append(*new StringBufferItem(name));
 
-        OwnedHqlExpr extra = createAttribute(createIdentifierAtom(name.str()));
+        OwnedHqlExpr extra = createId(createIdAtom(name.str()));
         call->setTransformExtra(extra);
         addVisited(call);
 
@@ -3166,7 +3164,7 @@ void HqltHql::defineCallTarget(IHqlExpression * call, StringBuffer & name)
     else
     {
         if (prevName)
-            appendAtom(name, prevName->queryName());
+            appendId(name, prevName->queryId());
         else
             lookupSymbolName(call, name);
     }

+ 11 - 11
ecl/hql/hqltrans.cpp

@@ -453,7 +453,7 @@ IHqlExpression * HqlTransformerBase::transformAlienType(IHqlExpression * expr)
             insertScopeSymbols(newScope, newSymbols);
             scope.setown(closeScope(newScope.getClear()));
         }
-        return createAlienType(expr->queryName(), scope.getClear(), children, LINK(expr->queryFunctionDefinition()));
+        return createAlienType(expr->queryId(), scope.getClear(), children, LINK(expr->queryFunctionDefinition()));
     }
     return LINK(expr);
 }
@@ -491,7 +491,7 @@ IHqlExpression * HqlTransformerBase::transformField(IHqlExpression * expr)
     if (type != newType)
     {
         transformChildren(expr, children);
-        return createField(expr->queryName(), LINK(newType), children);
+        return createField(expr->queryId(), LINK(newType), children);
     }
     return completeTransform(expr, children);
 }
@@ -921,7 +921,7 @@ IHqlExpression * QuickHqlTransformer::createTransformedBody(IHqlExpression * exp
             if (type != newType)
             {
                 transformChildren(expr, children);
-                return createField(expr->queryName(), LINK(newType), children);
+                return createField(expr->queryId(), LINK(newType), children);
             }
             break;
         }
@@ -929,7 +929,7 @@ IHqlExpression * QuickHqlTransformer::createTransformedBody(IHqlExpression * exp
         {
             if (transformChildren(expr, children))
                 return LINK(expr);
-            return createFunctionDefinition(expr->queryName(), children);
+            return createFunctionDefinition(expr->queryId(), children);
         }
     case no_param:
         {
@@ -937,7 +937,7 @@ IHqlExpression * QuickHqlTransformer::createTransformedBody(IHqlExpression * exp
             Owned<ITypeInfo> newType = transformType(type);
             transformChildren(expr, children);
             if (type != newType)
-                return createParameter(expr->queryName(), (unsigned)expr->querySequenceExtra(), newType.getClear(), children);
+                return createParameter(expr->queryId(), (unsigned)expr->querySequenceExtra(), newType.getClear(), children);
             break;
         }
     case no_delayedselect:
@@ -946,7 +946,7 @@ IHqlExpression * QuickHqlTransformer::createTransformedBody(IHqlExpression * exp
             OwnedHqlExpr newModule = transform(oldModule);
             if (oldModule != newModule)
             {
-                _ATOM selectedName = expr->queryChild(3)->queryName();
+                IIdAtom * selectedName = expr->queryChild(3)->queryId();
                 HqlDummyLookupContext dummyctx(errors);
                 IHqlScope * newScope = newModule->queryScope();
                 if (newScope)
@@ -1053,7 +1053,7 @@ extern void assertNoMatchingExpression(IHqlExpression * expr, IHqlExpression * s
 //-------------------------------------------------------------------------------------------------
 
 static HqlTransformerInfo debugDifferenceAnalyserInfo("DebugDifferenceAnalyser");
-DebugDifferenceAnalyser::DebugDifferenceAnalyser(_ATOM _search) : QuickHqlTransformer(debugDifferenceAnalyserInfo, NULL) 
+DebugDifferenceAnalyser::DebugDifferenceAnalyser(IIdAtom * _search) : QuickHqlTransformer(debugDifferenceAnalyserInfo, NULL)
 { 
     prev = NULL; 
     search = _search; 
@@ -1062,7 +1062,7 @@ DebugDifferenceAnalyser::DebugDifferenceAnalyser(_ATOM _search) : QuickHqlTransf
 
 void DebugDifferenceAnalyser::doAnalyse(IHqlExpression * expr)
 {
-    if (expr->queryName() == createIdentifierAtom("f_fuzzy") || expr->queryName() == createIdentifierAtom("f_exact"))
+    if (expr->queryName() == createAtom("f_fuzzy") || expr->queryName() == createAtom("f_exact"))
     {
         if (prev && prev->queryBody() != expr->queryBody())
         {
@@ -1512,7 +1512,7 @@ IHqlExpression * NewHqlTransformer::createTransformed(IHqlExpression * expr)
         {
             if (transformChildren(expr, children))
                 return LINK(expr);
-            return createFunctionDefinition(expr->queryName(), children);
+            return createFunctionDefinition(expr->queryId(), children);
         }
     default:
         return completeTransform(expr, children);
@@ -3170,7 +3170,7 @@ void NewSelectorReplacingTransformer::setNestedMapping(IHqlExpression * oldSel,
             break;
         case no_field:
             {
-                OwnedHqlExpr oldField = oldScope->lookupSymbol(cur->queryName());
+                OwnedHqlExpr oldField = oldScope->lookupSymbol(cur->queryId());
                 assertex(oldField);
                 if (cur != oldField)
                 {
@@ -4631,7 +4631,7 @@ IHqlExpression * GlobalToParameterTransformer::createTransformedBody(IHqlExpress
     paramName.append("_implicit_hidden_").append(parameters.ordinality());
     HqlExprArray attrs;
     attrs.append(*createAttribute(_hidden_Atom));
-    IHqlExpression * param = createParameter(createIdentifierAtom(paramName.str()), parameters.ordinality(), expr->getType(), attrs);
+    IHqlExpression * param = createParameter(createIdAtom(paramName.str()), parameters.ordinality(), expr->getType(), attrs);
     parameters.append(*param);
     defaults.append(*LINK(expr));
     return LINK(param);

+ 2 - 2
ecl/hql/hqltrans.ipp

@@ -261,13 +261,13 @@ public:
 class HQL_API DebugDifferenceAnalyser : public QuickHqlTransformer
 {
 public:
-    DebugDifferenceAnalyser(_ATOM _search);
+    DebugDifferenceAnalyser(IIdAtom * _search);
 
     virtual void doAnalyse(IHqlExpression * expr);
     
 protected:
     IHqlExpression * prev;
-    _ATOM search;
+    IIdAtom * search;
 };
 
 //---------------------------------------------------------------------------

+ 49 - 48
ecl/hql/hqlutil.cpp

@@ -63,7 +63,7 @@ static IHqlExpression * cachedLocalSequenceNumber;
 static IHqlExpression * cachedStoredSequenceNumber;
 static IHqlExpression * cachedOmittedValueExpr;
 
-static void initBoolAttr(_ATOM name, IHqlExpression * x[2])
+static void initBoolAttr(IAtom * name, IHqlExpression * x[2])
 {
     x[0] = createExprAttribute(name, createConstant(false));
     x[1] = createExprAttribute(name, createConstant(true));
@@ -144,12 +144,12 @@ IHqlExpression * createUIntConstant(unsigned __int64 val)
     return createConstant(createMinIntValue(val));
 }
 
-inline _ATOM createMangledName(IHqlExpression * module, IHqlExpression * child)
+inline IIdAtom * createMangledName(IHqlExpression * module, IHqlExpression * child)
 {
     StringBuffer mangledName;
     mangledName.append(module->queryName()).append(".").append(child->queryName());
 
-    return createIdentifierAtom(mangledName.str());
+    return createIdAtom(mangledName.str());
 }
 
 IHqlExpression * queryDefaultMaxRecordLengthExpr()
@@ -1045,7 +1045,7 @@ DedupInfoExtractor::DedupInfoExtractor(IHqlExpression * expr)
         case no_attr_expr:
         case no_attr_link:
             {
-                _ATOM name = cur->queryName();
+                IAtom * name = cur->queryName();
                 if (name == hashAtom)
                     compareAllRows = true;
                 else if (name == localAtom)
@@ -1252,7 +1252,7 @@ IHqlExpression * getExpandSelectExpr(IHqlExpression * expr)
         case no_record:
             {
                 IHqlSimpleScope * scope = mappingExpr->querySimpleScope();
-                OwnedHqlExpr matched = scope->lookupSymbol(field->queryName());
+                OwnedHqlExpr matched = scope->lookupSymbol(field->queryId());
                 assertex(matched == field);
                 ret = LINK(queryRealChild(field, 0));
                 break;
@@ -1327,14 +1327,14 @@ interface IHintVisitor
 class SearchHintVisitor : implements IHintVisitor
 {
 public:
-    SearchHintVisitor(_ATOM _name) : name(_name) {}
+    SearchHintVisitor(IAtom * _name) : name(_name) {}
 
     virtual IHqlExpression * visit(IHqlExpression * hint) 
     {
         return hint->queryProperty(name);
     }
 
-    _ATOM name;
+    IAtom * name;
 };
 
 
@@ -1391,7 +1391,7 @@ static IHqlExpression * walkHints(IHqlExpression * expr, IHintVisitor & visitor)
     return NULL;
 }
 
-IHqlExpression * queryHint(IHqlExpression * expr, _ATOM name)
+IHqlExpression * queryHint(IHqlExpression * expr, IAtom * name)
 {
     SearchHintVisitor visitor(name);
     return walkHints(expr, visitor);
@@ -1403,7 +1403,7 @@ void gatherHints(HqlExprCopyArray & target, IHqlExpression * expr)
     walkHints(expr, visitor);
 }
 
-IHqlExpression * queryHintChild(IHqlExpression * expr, _ATOM name, unsigned idx)
+IHqlExpression * queryHintChild(IHqlExpression * expr, IAtom * name, unsigned idx)
 {
     IHqlExpression * match = queryHint(expr, name);
     if (match)
@@ -1924,7 +1924,7 @@ bool isTrivialSelectN(IHqlExpression * expr)
     return false;
 }
 
-IHqlExpression * queryPropertyChild(IHqlExpression * expr, _ATOM name, unsigned idx)
+IHqlExpression * queryPropertyChild(IHqlExpression * expr, IAtom * name, unsigned idx)
 {
     IHqlExpression * match = expr->queryProperty(name);
     if (match)
@@ -2370,7 +2370,7 @@ protected:
         IHqlExpression * record = ds->queryRecord();
         assertex(record);
         IHqlSimpleScope * scope = record->querySimpleScope();
-        OwnedHqlExpr match = scope->lookupSymbol(field->queryName());
+        OwnedHqlExpr match = scope->lookupSymbol(field->queryId());
         if (match != field)
         {
             EclIR::dbglogIR(2, field, match.get());
@@ -3021,7 +3021,7 @@ IHqlExpression * convertScalarToRow(IHqlExpression * value, ITypeInfo * fieldTyp
 {
     if (!fieldType)
         fieldType = value->queryType();
-    OwnedHqlExpr field = createField(unnamedAtom, LINK(fieldType), NULL, NULL);
+    OwnedHqlExpr field = createField(unnamedId, LINK(fieldType), NULL, NULL);
     OwnedHqlExpr record = createRecord(field);
 
     OwnedHqlExpr dataset;
@@ -3344,7 +3344,7 @@ IHqlExpression * convertScalarToGraphResult(IHqlExpression * value, ITypeInfo *
 
 IHqlExpression * createScalarFromGraphResult(ITypeInfo * scalarType, ITypeInfo * fieldType, IHqlExpression * represents, unsigned seq)
 {
-    OwnedHqlExpr counterField = createField(unnamedAtom, LINK(fieldType), NULL, NULL);
+    OwnedHqlExpr counterField = createField(unnamedId, LINK(fieldType), NULL, NULL);
     OwnedHqlExpr counterRecord = createRecord(counterField);
     HqlExprArray args;
     args.append(*LINK(counterRecord));
@@ -3356,7 +3356,7 @@ IHqlExpression * createScalarFromGraphResult(ITypeInfo * scalarType, ITypeInfo *
     return ensureExprType(select, scalarType);
 }
 
-_ATOM queryCsvEncoding(IHqlExpression * mode)
+IAtom * queryCsvEncoding(IHqlExpression * mode)
 {
     if (mode)
     {
@@ -3370,7 +3370,7 @@ _ATOM queryCsvEncoding(IHqlExpression * mode)
     return NULL;
 }
 
-_ATOM queryCsvTableEncoding(IHqlExpression * tableExpr)
+IAtom * queryCsvTableEncoding(IHqlExpression * tableExpr)
 {
     if (!tableExpr)
         return NULL;
@@ -3944,7 +3944,7 @@ IHqlExpression * ModuleExpander::createExpanded(IHqlExpression * scopeExpr, IHql
     ForEachItemIn(i, symbols)
     {
         IHqlExpression & cur = symbols.item(i);
-        _ATOM name = cur.queryName();
+        IIdAtom * name = cur.queryId();
         OwnedHqlExpr resolved = scope->lookupSymbol(name, LSFpublic, ctx);
         LinkedHqlExpr value = resolved;
         if (value && value->isFunction())
@@ -3980,7 +3980,7 @@ IHqlExpression * ModuleExpander::createExpanded(IHqlExpression * scopeExpr, IHql
         }
         if (value && isExported(resolved))
         {
-            lowername.clear().append(prefix).append(name).toLowerCase();
+            lowername.clear().append(prefix).append(name->lower()).toLowerCase();
 
             node_operator op = no_none;
             if (outputOp == no_output)
@@ -4048,8 +4048,7 @@ extern HQL_API IHqlExpression * createStoredModule(IHqlExpression * scopeExpr)
     newScopeExpr->addOperand(LINK(scopeExpr));
 
     HqlExprArray noParameters;
-    StringBuffer lowername;
-    _ATOM moduleName = NULL;
+    IIdAtom * moduleName = NULL;
     ForEachItemIn(i, symbols)
     {
         IHqlExpression & cur = symbols.item(i);
@@ -4061,9 +4060,8 @@ extern HQL_API IHqlExpression * createStoredModule(IHqlExpression * scopeExpr)
                 if (value->getOperator() == no_purevirtual)
                     value.setown(createNullExpr(value));
 
-                _ATOM name = symbols.item(i).queryName();
-                lowername.clear().append(name).toLowerCase();
-                OwnedHqlExpr failure = createValue(no_stored, makeVoidType(), createConstant(lowername));
+                IIdAtom * name = symbols.item(i).queryId();
+                OwnedHqlExpr failure = createValue(no_stored, makeVoidType(), createConstant(name->lower()->str()));
 
                 HqlExprArray meta;
                 value.setown(attachWorkflowOwn(meta, value.getClear(), failure, NULL));
@@ -4102,7 +4100,7 @@ extern HQL_API IHqlExpression * convertScalarAggregateToDataset(IHqlExpression *
     if ((newop == no_mingroup || newop == no_maxgroup) && (arg->getOperator() == no_select))
         field.set(arg->queryChild(1));                  // inherit maxlength etc...
     else
-        field.setown(createField(valueAtom, expr->getType(), NULL));
+        field.setown(createField(valueId, expr->getType(), NULL));
 
     IHqlExpression * aggregateRecord = createRecord(field);
     IHqlExpression * keyedAttr = expr->queryProperty(keyedAtom);
@@ -4260,19 +4258,19 @@ IHqlExpression * appendOwnedOperandsF(IHqlExpression * expr, ...)
 }
 
 
-extern HQL_API void inheritAttribute(HqlExprArray & attrs, IHqlExpression * donor, _ATOM name)
+extern HQL_API void inheritAttribute(HqlExprArray & attrs, IHqlExpression * donor, IAtom * name)
 {
     IHqlExpression * match = donor->queryProperty(name);
     if (match)
         attrs.append(*LINK(match));
 }
 
-IHqlExpression * inheritAttribute(IHqlExpression * expr, IHqlExpression * donor, _ATOM name)
+IHqlExpression * inheritAttribute(IHqlExpression * expr, IHqlExpression * donor, IAtom * name)
 {
     return appendOwnedOperand(expr, LINK(donor->queryProperty(name)));
 }
 
-IHqlExpression * appendAttribute(IHqlExpression * expr, _ATOM attr)
+IHqlExpression * appendAttribute(IHqlExpression * expr, IAtom * attr)
 {
     return appendOwnedOperand(expr, createAttribute(attr));
 }
@@ -4305,7 +4303,7 @@ IHqlExpression * removeChildOp(IHqlExpression * expr, node_operator op)
     return expr->clone(args);
 }
 
-IHqlExpression * removeProperty(IHqlExpression * expr, _ATOM attr)
+IHqlExpression * removeProperty(IHqlExpression * expr, IAtom * attr)
 {
     HqlExprArray args;
     unwindChildren(args, expr);
@@ -4553,7 +4551,7 @@ bool SplitDatasetAttributeTransformer::split(SharedHqlExpr & dataset, SharedHqlE
         break;
     case 2:
         {
-            OwnedHqlExpr field = createField(unnamedAtom, value->getType(), NULL);
+            OwnedHqlExpr field = createField(unnamedId, value->getType(), NULL);
             OwnedHqlExpr transform = createTransformForField(field, value);
             OwnedHqlExpr combine = createDatasetF(no_combine, LINK(&newDatasets.item(0)), LINK(&newDatasets.item(1)), LINK(transform), LINK(selSeq), NULL);
             OwnedHqlExpr first = createRowF(no_selectnth, LINK(combine), getSizetConstant(1), createAttribute(noBoundCheckAtom), NULL);
@@ -4805,7 +4803,7 @@ static HqlTransformerInfo fieldPropertyRemoverInfo("FieldPropertyRemover");
 class FieldPropertyRemover : public NewHqlTransformer
 {
 public:
-    FieldPropertyRemover(_ATOM _name) : NewHqlTransformer(fieldPropertyRemoverInfo), name(_name) {}
+    FieldPropertyRemover(IAtom * _name) : NewHqlTransformer(fieldPropertyRemoverInfo), name(_name) {}
 
     virtual IHqlExpression * createTransformed(IHqlExpression * expr)
     {
@@ -4831,10 +4829,10 @@ public:
     }
 
 private:
-    _ATOM name;
+    IAtom * name;
 };
 
-IHqlExpression * removePropertyFromFields(IHqlExpression * expr, _ATOM name)
+IHqlExpression * removePropertyFromFields(IHqlExpression * expr, IAtom * name)
 {
     FieldPropertyRemover remover(name);
     return remover.transformRoot(expr);
@@ -5514,13 +5512,13 @@ IHqlExpression *recursiveStretchFields(IHqlExpression *record)
             case type_row:
             {
                 OwnedHqlExpr childType = recursiveStretchFields(child->queryRecord());
-                newrec->addOperand(createField(child->queryName(), makeRowType(childType->getType()), NULL, NULL));
+                newrec->addOperand(createField(child->queryId(), makeRowType(childType->getType()), NULL, NULL));
                 break;
             }
             default:
             {
                 Owned<ITypeInfo> stretched = getMaxLengthType(fieldType);
-                newrec->addOperand(createField(child->queryName(), stretched.getClear(), NULL, NULL));
+                newrec->addOperand(createField(child->queryId(), stretched.getClear(), NULL, NULL));
                 break;
             }
             }
@@ -5912,7 +5910,7 @@ void LibraryInputMapper::expandParameter(IHqlExpression * expr, unsigned & nextP
         ForEachItemIn(i, symbols)
         {
             IHqlExpression & cur = symbols.item(i);
-            _ATOM nestedName = createMangledName(expr, &cur);
+            IIdAtom * nestedName = createMangledName(expr, &cur);
 
             //default values are handled elsewhere - lost from the mapped values here.
             HqlExprArray attrs;
@@ -5925,15 +5923,18 @@ void LibraryInputMapper::expandParameter(IHqlExpression * expr, unsigned & nextP
 }
 
 
-unsigned LibraryInputMapper::findParameter(_ATOM search)
+unsigned LibraryInputMapper::findParameter(IIdAtom * searchId)
 {
+    IAtom * searchName = searchId->lower();
     ForEachItemIn(i, realParameters)
-        if (realParameters.item(i).queryName() == search)
+    {
+        if (realParameters.item(i).queryName() == searchName)
             return i;
+    }
     return NotFound;
 }
 
-IHqlExpression * LibraryInputMapper::resolveParameter(_ATOM search)
+IHqlExpression * LibraryInputMapper::resolveParameter(IIdAtom * search)
 {
     unsigned match = findParameter(search);
     assertex(match != NotFound);
@@ -5982,7 +5983,7 @@ void LibraryInputMapper::mapRealToLogical(HqlExprArray & inputExprs, HqlExprArra
                 result = createValue(no_libraryinput, cur->getType(), seq);
         }
         
-        inputExprs.append(*createSymbol(cur->queryName(), result, ob_private));
+        inputExprs.append(*createSymbol(cur->queryId(), result, ob_private));
     }
 
     IHqlExpression * formals = libraryInterface->queryChild(1);
@@ -6005,7 +6006,7 @@ IHqlExpression * LibraryInputMapper::mapRealToLogical(const HqlExprArray & input
             IHqlExpression * param = resolveParameter(createMangledName(expr, &cur));
             OwnedHqlExpr mapped = mapRealToLogical(inputExprs, param, libraryId);
 
-            OwnedHqlExpr named = createSymbol(cur.queryName(), LINK(mapped), ob_private);
+            OwnedHqlExpr named = createSymbol(cur.queryId(), LINK(mapped), ob_private);
             newScope->defineSymbol(named.getClear());
         }
         return queryExpression(closeScope(newScope.getClear()));
@@ -6045,7 +6046,7 @@ void LibraryInputMapper::mapLogicalToReal(HqlExprArray & mapped, IHqlExpression
             IHqlExpression & cur = symbols.item(i);
             IHqlExpression * param = resolveParameter(createMangledName(expr, &cur));
             
-            OwnedHqlExpr childValue = valueScope->lookupSymbol(cur.queryName(), LSFpublic, lookupCtx);
+            OwnedHqlExpr childValue = valueScope->lookupSymbol(cur.queryId(), LSFpublic, lookupCtx);
             mapLogicalToReal(mapped, param, childValue);
         }
     }
@@ -6150,7 +6151,7 @@ void gatherGraphReferences(HqlExprCopyArray & graphs, IHqlExpression * value, bo
 
 //---------------------------------------------------------------------------
 
-_ATOM getWarningAction(unsigned errorCode, const HqlExprArray & overrides, unsigned first)
+IAtom * getWarningAction(unsigned errorCode, const HqlExprArray & overrides, unsigned first)
 {
     //warnings are assumed to be infrequent, so don't worry about efficiency here.
     const unsigned max = overrides.ordinality();
@@ -6173,7 +6174,7 @@ WarningProcessor::WarningProcessor()
 void WarningProcessor::addWarning(IECLError * warning)
 {
     //warnings are assumed to be infrequent, so don't worry about efficiency here.
-    _ATOM action = getWarningAction(warning->errorCode(), localOnWarnings, firstLocalOnWarning);
+    IAtom * action = getWarningAction(warning->errorCode(), localOnWarnings, firstLocalOnWarning);
 
     if (action == defaultAtom)
         appendUnique(possibleWarnings, warning);
@@ -6189,7 +6190,7 @@ void WarningProcessor::addWarning(IECLError * warning)
     }
 }
 
-void WarningProcessor::addGlobalOnWarning(unsigned code, _ATOM action)
+void WarningProcessor::addGlobalOnWarning(unsigned code, IAtom * action)
 {
     globalOnWarnings.append(*createAttribute(onWarningAtom, getSizetConstant(code), createAttribute(action)));
 }
@@ -6251,7 +6252,7 @@ void WarningProcessor::report(IErrorReceiver & errors)
 
 void WarningProcessor::report(IErrorReceiver * errors, IErrorReceiver * warnings, IECLError * warning)
 {
-    _ATOM action = getWarningAction(warning->errorCode(), localOnWarnings, firstLocalOnWarning);
+    IAtom * action = getWarningAction(warning->errorCode(), localOnWarnings, firstLocalOnWarning);
 
     if (action == defaultAtom)
         action = getWarningAction(warning->errorCode(), globalOnWarnings, 0);
@@ -6301,7 +6302,7 @@ void WarningProcessor::applyGlobalOnWarning()
     ForEachItemIn(i, possibleWarnings)
     {
         IECLError & cur = possibleWarnings.item(i);
-        _ATOM action = getWarningAction(cur.errorCode(), globalOnWarnings, 0);
+        IAtom * action = getWarningAction(cur.errorCode(), globalOnWarnings, 0);
         if (action == defaultAtom || action == warningAtom)
         {
             if (cur.isError())
@@ -7842,7 +7843,7 @@ static void createMappingAssigns(HqlExprArray & assigns, IHqlExpression * selfSe
             break;
         case no_field:
             {
-                OwnedHqlExpr oldField = oldScope->lookupSymbol(cur->queryName());
+                OwnedHqlExpr oldField = oldScope->lookupSymbol(cur->queryId());
                 assertex(oldField);
                 OwnedHqlExpr selfSelected = createSelectExpr(LINK(selfSelector), LINK(cur));
                 OwnedHqlExpr oldSelected = createSelectExpr(LINK(oldSelector), LINK(oldField));
@@ -7957,7 +7958,7 @@ static IHqlExpression * transformAttributeToQuery(IHqlExpression * expr, HqlLook
     if (expr->isScope())
     {
         IHqlScope * scope = expr->queryScope();
-        OwnedHqlExpr main = scope->lookupSymbol(createAtom("main"), LSFpublic, ctx);
+        OwnedHqlExpr main = scope->lookupSymbol(createIdAtom("main"), LSFpublic, ctx);
         if (main)
             return main.getClear();
 
@@ -8169,7 +8170,7 @@ bool userPreventsSort(IHqlExpression * noSortAttr, node_operator side)
     if (!child)
         return true;
 
-    _ATOM name = child->queryName();
+    IAtom * name = child->queryName();
     if (side == no_left)
         return name == leftAtom;
     if (side == no_right)

+ 14 - 14
ecl/hql/hqlutil.hpp

@@ -41,8 +41,8 @@ extern HQL_API bool isValidFieldReference(IHqlExpression * expr);
 extern HQL_API bool isFieldSelectedFromRecord(IHqlExpression * expr);
 
 extern HQL_API void gatherHints(HqlExprCopyArray & target, IHqlExpression * expr);
-extern HQL_API IHqlExpression * queryHint(IHqlExpression * expr, _ATOM name);
-extern HQL_API IHqlExpression * queryHintChild(IHqlExpression * expr, _ATOM name, unsigned idx);
+extern HQL_API IHqlExpression * queryHint(IHqlExpression * expr, IAtom * name);
+extern HQL_API IHqlExpression * queryHintChild(IHqlExpression * expr, IAtom * name, unsigned idx);
 extern HQL_API void unwindHintAttrs(HqlExprArray & args, IHqlExpression * expr);
 
 extern HQL_API IHqlExpression * replaceChildDataset(IHqlExpression * expr, IHqlExpression * newChild, unsigned whichChild);
@@ -70,7 +70,7 @@ extern HQL_API void gatherIndexBuildSortOrder(HqlExprArray & sorts, IHqlExpressi
 extern HQL_API bool recordContainsBlobs(IHqlExpression * record);
 inline bool recordIsEmpty(IHqlExpression * record) { return queryLastField(record) == NULL; }
 extern HQL_API IHqlExpression * queryVirtualFileposField(IHqlExpression * record);
-extern HQL_API IHqlExpression * removePropertyFromFields(IHqlExpression * expr, _ATOM name);
+extern HQL_API IHqlExpression * removePropertyFromFields(IHqlExpression * expr, IAtom * name);
 
 extern HQL_API IHqlExpression * flattenListOwn(IHqlExpression * list);
 extern HQL_API void flattenListOwn(HqlExprArray & out, IHqlExpression * list);
@@ -92,7 +92,7 @@ extern HQL_API unsigned isEmptyRecord(IHqlExpression * record);
 extern HQL_API bool isTrivialSelectN(IHqlExpression * expr);
 extern HQL_API IHqlExpression * queryConvertChoosenNSort(IHqlExpression * expr, unsigned __int64 topNlimit);
 
-extern HQL_API IHqlExpression * queryPropertyChild(IHqlExpression * expr, _ATOM name, unsigned idx);
+extern HQL_API IHqlExpression * queryPropertyChild(IHqlExpression * expr, IAtom * name, unsigned idx);
 extern HQL_API IHqlExpression * querySequence(IHqlExpression * expr);
 extern HQL_API IHqlExpression * queryResultName(IHqlExpression * expr);
 extern HQL_API int getResultSequenceValue(IHqlExpression * expr);
@@ -147,20 +147,20 @@ extern HQL_API IHqlExpression * createMappingTransform(IHqlExpression * selfSele
 extern HQL_API IHqlExpression * getFailCode(IHqlExpression * failExpr);
 extern HQL_API IHqlExpression * getFailMessage(IHqlExpression * failExpr, bool nullIfOmitted);
 
-extern HQL_API _ATOM queryCsvTableEncoding(IHqlExpression * tableExpr);
-extern HQL_API _ATOM queryCsvEncoding(IHqlExpression * csvAttr);
+extern HQL_API IAtom * queryCsvTableEncoding(IHqlExpression * tableExpr);
+extern HQL_API IAtom * queryCsvEncoding(IHqlExpression * csvAttr);
 extern HQL_API IHqlExpression * combineIfsToMap(IHqlExpression * expr);
 extern HQL_API IHqlExpression * appendLocalAttribute(IHqlExpression * expr);
 extern HQL_API IHqlExpression * removeLocalAttribute(IHqlExpression * expr);
-extern HQL_API IHqlExpression * removeProperty(IHqlExpression * expr, _ATOM attr);
+extern HQL_API IHqlExpression * removeProperty(IHqlExpression * expr, IAtom * attr);
 extern HQL_API IHqlExpression * removeOperand(IHqlExpression * expr, IHqlExpression * operand);
 extern HQL_API IHqlExpression * removeChildOp(IHqlExpression * expr, node_operator op);
-extern HQL_API IHqlExpression * appendAttribute(IHqlExpression * expr, _ATOM attr);
+extern HQL_API IHqlExpression * appendAttribute(IHqlExpression * expr, IAtom * attr);
 extern HQL_API IHqlExpression * appendOwnedOperand(IHqlExpression * expr, IHqlExpression * ownedOperand);
 extern HQL_API IHqlExpression * replaceOwnedProperty(IHqlExpression * expr, IHqlExpression * ownedProeprty);
 extern HQL_API IHqlExpression * appendOwnedOperandsF(IHqlExpression * expr, ...);
-extern HQL_API IHqlExpression * inheritAttribute(IHqlExpression * expr, IHqlExpression * donor, _ATOM name);
-extern HQL_API void inheritAttribute(HqlExprArray & attrs, IHqlExpression * donor, _ATOM name);
+extern HQL_API IHqlExpression * inheritAttribute(IHqlExpression * expr, IHqlExpression * donor, IAtom * name);
+extern HQL_API void inheritAttribute(HqlExprArray & attrs, IHqlExpression * donor, IAtom * name);
 extern HQL_API bool hasOperand(IHqlExpression * expr, IHqlExpression * child);
 
 extern HQL_API unsigned numRealChildren(IHqlExpression * expr);
@@ -481,14 +481,14 @@ public:
     LibraryInputMapper(IHqlExpression * _libraryInterface);
 
     void expandParameters();
-    unsigned findParameter(_ATOM search);
+    unsigned findParameter(IIdAtom * search);
 
     void mapLogicalToReal(HqlExprArray & mapped, HqlExprArray & params);
     void mapRealToLogical(HqlExprArray & inputExprs, HqlExprArray & logicalParams, IHqlExpression * libraryId, bool canStream, bool distributed);
     inline unsigned numParameters() const { return realParameters.ordinality(); }
     inline unsigned numStreamedInputs() const { return streamingAllowed ? numDatasets : 0; }
 
-    IHqlExpression * resolveParameter(_ATOM search);
+    IHqlExpression * resolveParameter(IIdAtom * search);
     inline const HqlExprArray & queryRealParameters() const { return realParameters; }
 
 protected:
@@ -504,7 +504,7 @@ protected:
     bool streamingAllowed;
 };
 
-extern HQL_API _ATOM getWarningAction(unsigned errorCode, const HqlExprArray & overrides, unsigned first);
+extern HQL_API IAtom * getWarningAction(unsigned errorCode, const HqlExprArray & overrides, unsigned first);
 class HQL_API WarningProcessor
 {
 public:
@@ -538,7 +538,7 @@ public:
 public:
     WarningProcessor();
 
-    void addGlobalOnWarning(unsigned code, _ATOM action);
+    void addGlobalOnWarning(unsigned code, IAtom * action);
     void addGlobalOnWarning(IHqlExpression * setMetaExpr);
     void addWarning(IECLError * warning);
     inline void checkForGlobalOnWarning(IHqlExpression * expr)

+ 3 - 3
ecl/hql/hqlwuerr.cpp

@@ -17,11 +17,11 @@
 #include "jliball.hpp"
 #include "hqlwuerr.hpp"
 
-static void formatError(StringBuffer & out, int errNo, const char *msg, _ATOM modulename, _ATOM attributename, int lineno, int column)
+static void formatError(StringBuffer & out, int errNo, const char *msg, IIdAtom * modulename, IIdAtom * attributename, int lineno, int column)
 {
-    out.append(modulename);
+    out.append(modulename->str());
     if (attributename)
-        out.append('.').append(attributename);
+        out.append('.').append(attributename->str());
     
     if(lineno && column)
         out.append('(').append(lineno).append(',').append(column).append(')');

文件差異過大導致無法顯示
+ 1384 - 1394
ecl/hqlcpp/hqlcatom.cpp


文件差異過大導致無法顯示
+ 700 - 708
ecl/hqlcpp/hqlcatom.hpp


+ 4 - 4
ecl/hqlcpp/hqlckey.cpp

@@ -794,7 +794,7 @@ IHqlExpression * KeyedJoinInfo::optimizeTransfer(HqlExprArray & fields, HqlExprA
                         //Check same field isn't used in two different nested records.
                         StringBuffer name;
                         name.append("__unnamed__").append(fields.ordinality());
-                        field.setown(createField(createIdentifierAtom(name), field->getType(), NULL, NULL));
+                        field.setown(createField(createIdAtom(name), field->getType(), NULL, NULL));
                     }
 
                     fields.append(*LINK(field));
@@ -1718,7 +1718,7 @@ IHqlExpression * HqlCppTranslator::getBlobRowSelector(BuildCtx & ctx, IHqlExpres
 
     //MORE: Need to clone the dataset attributes. Really they should be included in the type somehow: via modifiers?
     //or give an error if blob used on alien with ref/
-    OwnedHqlExpr field = createField(unnamedAtom, expr->getType(), NULL, NULL); 
+    OwnedHqlExpr field = createField(unnamedId, expr->getType(), NULL, NULL);
     HqlExprArray fields;
     fields.append(*LINK(field));
     OwnedHqlExpr record = createRecord(fields);
@@ -1733,7 +1733,7 @@ IHqlExpression * HqlCppTranslator::getBlobRowSelector(BuildCtx & ctx, IHqlExpres
         HqlExprArray args;
         args.append(*LINK(helper));
         args.append(*LINK(boundId.expr));
-        OwnedHqlExpr call = bindTranslatedFunctionCall(lookupBlobAtom, args);
+        OwnedHqlExpr call = bindTranslatedFunctionCall(lookupBlobId, args);
         ctx.addAssign(boundRow, call);
 
         bindRow(ctx, row, boundRow);
@@ -1790,5 +1790,5 @@ void HqlCppTranslator::doBuildExprBlobToId(BuildCtx & ctx, IHqlExpression * expr
     args.append(*LINK(helper));
     args.append(*LINK(boundSize.expr));
     args.append(*LINK(boundAddress.expr));
-    tgt.expr.setown(bindTranslatedFunctionCall(createBlobAtom, args));
+    tgt.expr.setown(bindTranslatedFunctionCall(createBlobId, args));
 }

文件差異過大導致無法顯示
+ 398 - 397
ecl/hqlcpp/hqlcpp.cpp


+ 2 - 2
ecl/hqlcpp/hqlcpp.hpp

@@ -113,9 +113,9 @@ class HqlStmts;
 interface HQLCPP_API IHqlCppInstance : public IInterface
 {
 public:
-    virtual HqlStmts * ensureSection(_ATOM section) = 0;
+    virtual HqlStmts * ensureSection(IAtom * section) = 0;
     virtual const char * queryLibrary(unsigned idx) = 0;
-    virtual HqlStmts * querySection(_ATOM section) = 0;
+    virtual HqlStmts * querySection(IAtom * section) = 0;
     virtual void addResource(const char * type, unsigned len, const void * data, IPropertyTree *manifestEntry, unsigned id=(unsigned)-1) = 0;
     virtual void addCompressResource(const char * type, unsigned len, const void * data, IPropertyTree *manifestEntry, unsigned id=(unsigned)-1) = 0;
     virtual void addManifest(const char *filename) = 0;

+ 38 - 36
ecl/hqlcpp/hqlcpp.ipp

@@ -115,7 +115,7 @@ public:
   HqlCppSection() : stmts(NULL) {}
 
 public:
-    _ATOM                       section;
+    IAtom *                       section;
     HqlStmts                    stmts;
 };
 
@@ -126,9 +126,9 @@ public:
     HqlCppInstance(IWorkUnit * _workunit, const char * _wupathname);
     IMPLEMENT_IINTERFACE
 
-    virtual HqlStmts * ensureSection(_ATOM section);
+    virtual HqlStmts * ensureSection(IAtom * section);
     virtual const char * queryLibrary(unsigned idx);
-    virtual HqlStmts * querySection(_ATOM section);
+    virtual HqlStmts * querySection(IAtom * section);
     virtual void flushHints();
     virtual void flushResources(const char *filename, ICodegenContextCallback * ctxCallback);
     virtual void addResource(const char * type, unsigned len, const void * data, IPropertyTree *manifestEntry=NULL, unsigned id=(unsigned)-1);
@@ -199,7 +199,7 @@ interface IHqlCppDatasetBuilder : public IInterface
 public:
     virtual void buildDeclare(BuildCtx & ctx) = 0;
     virtual BoundRow * buildCreateRow(BuildCtx & ctx) = 0;                  //NB: Must be called within a addGroup(), or another un-ambiguous child context, may create a filter
-    virtual BoundRow * buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, _ATOM serializeForm) = 0;
+    virtual BoundRow * buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, IAtom * serializeForm) = 0;
     virtual void finishRow(BuildCtx & ctx, BoundRow * selfCursor) = 0;
     virtual void buildFinish(BuildCtx & ctx, const CHqlBoundTarget & target) = 0;
     virtual void buildFinish(BuildCtx & ctx, CHqlBoundExpr & bound) = 0;
@@ -317,8 +317,8 @@ public:
     virtual void set(BuildCtx & ctx, IHqlExpression * expr) = 0;
     virtual void setRow(BuildCtx & ctx, IReferenceSelector * rhs) = 0;
 
-    virtual void buildDeserialize(BuildCtx & ctx, IHqlExpression * helper, _ATOM serializeForm) = 0;
-    virtual void buildSerialize(BuildCtx & ctx, IHqlExpression * helper, _ATOM serializeForm) = 0;
+    virtual void buildDeserialize(BuildCtx & ctx, IHqlExpression * helper, IAtom * serializeForm) = 0;
+    virtual void buildSerialize(BuildCtx & ctx, IHqlExpression * helper, IAtom * serializeForm) = 0;
 
 //managing the selection
     virtual AColumnInfo * queryColumn() = 0;
@@ -717,6 +717,8 @@ struct HqlCppOptions
     bool                paranoidCheckSelects;
     bool                matchExistingDistributionForJoin;
     bool                expandHashJoin;
+    bool                traceIR;
+    bool                preserveCaseExternalParameter;
 };
 
 //Any information gathered while processing the query should be moved into here, rather than cluttering up the translator class
@@ -882,19 +884,19 @@ public:
     void buildAssignChildDataset(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
     void buildChildDataset(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
 
-    IHqlExpression * bindFunctionCall(_ATOM name, HqlExprArray & args);
-    IHqlExpression * bindFunctionCall(_ATOM name, IHqlExpression * arg1);
-    IHqlExpression * bindFunctionCall(_ATOM name, HqlExprArray & args, ITypeInfo * newType);
+    IHqlExpression * bindFunctionCall(IIdAtom * name, HqlExprArray & args);
+    IHqlExpression * bindFunctionCall(IIdAtom * name, IHqlExpression * arg1);
+    IHqlExpression * bindFunctionCall(IIdAtom * name, HqlExprArray & args, ITypeInfo * newType);
     IHqlExpression * bindFunctionCall(IHqlExpression * function, HqlExprArray & args);
-    IHqlExpression * bindTranslatedFunctionCall(_ATOM name, HqlExprArray & args);
+    IHqlExpression * bindTranslatedFunctionCall(IIdAtom * name, HqlExprArray & args);
     IHqlExpression * bindTranslatedFunctionCall(IHqlExpression * function, HqlExprArray & args);
 
-    void buildFunctionCall(BuildCtx & ctx, _ATOM name, HqlExprArray & args);
-    void buildTranslatedFunctionCall(BuildCtx & ctx, _ATOM name, HqlExprArray & args);
-    void callProcedure(BuildCtx & ctx, _ATOM name, HqlExprArray & args);
+    void buildFunctionCall(BuildCtx & ctx, IIdAtom * name, HqlExprArray & args);
+    void buildTranslatedFunctionCall(BuildCtx & ctx, IIdAtom * name, HqlExprArray & args);
+    void callProcedure(BuildCtx & ctx, IIdAtom * name, HqlExprArray & args);
     
     void expandFunctions(bool expandInline);
-    IHqlExpression * needFunction(_ATOM name);
+    IHqlExpression * needFunction(IIdAtom * name);
     bool registerGlobalUsage(IHqlExpression * filename);
     IHqlExpression * queryActiveNamedActivity();
     IHqlExpression * queryActiveActivityLocation() const;
@@ -953,8 +955,8 @@ public:
     BoundRow * bindSelf(BuildCtx & ctx, IHqlExpression * dataset, IHqlExpression * expr, IHqlExpression * builder);
     BoundRow * bindTableCursor(BuildCtx & ctx, IHqlExpression * dataset, const char * bound, bool isLinkCounted, node_operator no_side, IHqlExpression * selSeq);
     BoundRow * bindTableCursor(BuildCtx & ctx, IHqlExpression * dataset, IHqlExpression * bound, node_operator no_side, IHqlExpression * selSeq);
-    BoundRow * bindCsvTableCursor(BuildCtx & ctx, IHqlExpression * dataset, const char * name, node_operator side, IHqlExpression * selSeq, bool translateVirtuals, _ATOM encoding);
-    BoundRow * bindCsvTableCursor(BuildCtx & ctx, IHqlExpression * dataset, IHqlExpression * bound, node_operator side, IHqlExpression * selSeq, bool translateVirtuals, _ATOM encoding);
+    BoundRow * bindCsvTableCursor(BuildCtx & ctx, IHqlExpression * dataset, const char * name, node_operator side, IHqlExpression * selSeq, bool translateVirtuals, IAtom * encoding);
+    BoundRow * bindCsvTableCursor(BuildCtx & ctx, IHqlExpression * dataset, IHqlExpression * bound, node_operator side, IHqlExpression * selSeq, bool translateVirtuals, IAtom * encoding);
     BoundRow * bindXmlTableCursor(BuildCtx & ctx, IHqlExpression * dataset, const char * name, node_operator side, IHqlExpression * selSeq, bool translateVirtuals);
     BoundRow * bindXmlTableCursor(BuildCtx & ctx, IHqlExpression * dataset, IHqlExpression * bound, node_operator side, IHqlExpression * selSeq, bool translateVirtuals);
     BoundRow * createTableCursor(IHqlExpression * dataset, IHqlExpression * bound, node_operator side, IHqlExpression * selSeq);
@@ -1007,9 +1009,9 @@ public:
     unsigned getMaxRecordSize(IHqlExpression * record);
     IHqlExpression * getRecordSize(IHqlExpression * dataset);
     unsigned getCsvMaxLength(IHqlExpression * csvAttr);
-    void ensureRowSerializer(StringBuffer & serializerName, BuildCtx & ctx, IHqlExpression * record, _ATOM format, _ATOM kind);
+    void ensureRowSerializer(StringBuffer & serializerName, BuildCtx & ctx, IHqlExpression * record, IAtom * format, IAtom * kind);
     void ensureRowPrefetcher(StringBuffer & prefetcherName, BuildCtx & ctx, IHqlExpression * record);
-    IHqlExpression * createSerializer(BuildCtx & ctx, IHqlExpression * record, _ATOM format, _ATOM kind);
+    IHqlExpression * createSerializer(BuildCtx & ctx, IHqlExpression * record, IAtom * format, IAtom * kind);
 
     AliasKind buildExprInCorrectContext(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt, bool evaluateLocally);
     ParentExtract * createExtractBuilder(BuildCtx & ctx, PEtype type, IHqlExpression * graphId, IHqlExpression * expr, bool doDeclare);
@@ -1150,7 +1152,7 @@ public:
     void doBuildAssignEventExtra(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
     void doBuildAssignEventName(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
     void doBuildAssignFailMessage(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
-    void doBuildAssignFormat(_ATOM func, BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
+    void doBuildAssignFormat(IIdAtom * func, BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
     void doBuildAssignGetResult(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
     void doBuildAssignGetGraphResult(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
     void doBuildAssignHashCrc(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
@@ -1178,10 +1180,10 @@ public:
     void doBuildInCaseInfo(IHqlExpression * expr, HqlCppCaseInfo & info, IHqlExpression * normalizedValues = NULL);
     void doBuildAssignToFromUnicode(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr);
 
-    void buildAssignDeserializedDataset(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr, _ATOM serializeForm);
-    void buildAssignSerializedDataset(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr, _ATOM serializeForm);
-    void buildDeserializedDataset(BuildCtx & ctx, ITypeInfo * type, IHqlExpression * expr, CHqlBoundExpr & tgt, _ATOM serializeForm);
-    void buildSerializedDataset(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt, _ATOM serializeForm);
+    void buildAssignDeserializedDataset(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr, IAtom * serializeForm);
+    void buildAssignSerializedDataset(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr, IAtom * serializeForm);
+    void buildDeserializedDataset(BuildCtx & ctx, ITypeInfo * type, IHqlExpression * expr, CHqlBoundExpr & tgt, IAtom * serializeForm);
+    void buildSerializedDataset(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt, IAtom * serializeForm);
 
     void buildDatasetAssignAggregate(BuildCtx & ctx, IHqlCppDatasetBuilder * target, IHqlExpression * expr);
     void buildDatasetAssignChoose(BuildCtx & ctx, IHqlCppDatasetBuilder * target, IHqlExpression * expr);
@@ -1284,7 +1286,7 @@ public:
     void doBuildExprField(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
     void doBuildExprFileLogicalName(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
     void doBuildExprFilepos(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
-    void doBuildExprFormat(_ATOM func, BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
+    void doBuildExprFormat(IIdAtom * func, BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
     void doBuildExprGetGraphResult(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt, ExpressionFormat format);
     void doBuildExprGetResult(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
     void doBuildExprIdToBlob(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
@@ -1306,7 +1308,7 @@ public:
     void doBuildExprSelect(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
     void doBuildExprSizeof(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
     void doBuildExprSubString(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
-    void doBuildExprSysFunc(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt, IAtom * funcName);
+    void doBuildExprSysFunc(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt, IIdAtom * funcName);
     void doBuildExprTransfer(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt);
     void doBuildExprTrim(BuildCtx & ctx, IHqlExpression * target, CHqlBoundExpr & tgt);
     void doBuildExprTrunc(BuildCtx & ctx, IHqlExpression * target, CHqlBoundExpr & tgt);
@@ -1492,7 +1494,7 @@ public:
     void doBuildCastViaTemp(BuildCtx & ctx, ITypeInfo * to, CHqlBoundExpr & pure, CHqlBoundExpr & tgt);
     void doBuildCastViaString(BuildCtx & ctx, ITypeInfo * to, const CHqlBoundExpr & pure, CHqlBoundExpr & tgt);
     void bindAndPush(BuildCtx & ctx, IHqlExpression * value);
-    IHqlExpression * createFormatCall(_ATOM func, IHqlExpression * expr);
+    IHqlExpression * createFormatCall(IIdAtom * func, IHqlExpression * expr);
     void createOrderList(BuildCtx & ctx, IHqlExpression * expr, IHqlExpression * ascdesc, CHqlBoundExpr & tgt);
     bool ensurePushed(BuildCtx & ctx, const CHqlBoundExpr & pure);
     void ensureSimpleExpr(BuildCtx & ctx, CHqlBoundExpr & tgt);
@@ -1522,7 +1524,7 @@ public:
     void expandAliasScope(BuildCtx & ctx, IHqlExpression * expr);
     IHqlExpression * queryExpandAliasScope(BuildCtx & ctx, IHqlExpression * expr);
 
-    void addDependency(BuildCtx & ctx, ABoundActivity * element, ABoundActivity * dependent, _ATOM kind, const char * label=NULL, int controlId = 0);
+    void addDependency(BuildCtx & ctx, ABoundActivity * element, ABoundActivity * dependent, IAtom * kind, const char * label=NULL, int controlId = 0);
     void addFileDependency(IHqlExpression * name, ABoundActivity * whoAmI);
 
     void doBuildClearAggregateRecord(BuildCtx & ctx, IHqlExpression * record, IHqlExpression * self, IHqlExpression * transform);
@@ -1651,8 +1653,8 @@ public:
     void buildSetXmlSerializer(StringBuffer & helper, ITypeInfo * valueType);
 
     void buildMetaMember(BuildCtx & ctx, IHqlExpression * datasetOrRecord, bool isGrouped, const char * name);
-    void buildMetaSerializerClass(BuildCtx & ctx, IHqlExpression * record, const char * serializerName, _ATOM serializeForm);
-    void buildMetaDeserializerClass(BuildCtx & ctx, IHqlExpression * record, const char * deserializerName, _ATOM serializeForm);
+    void buildMetaSerializerClass(BuildCtx & ctx, IHqlExpression * record, const char * serializerName, IAtom * serializeForm);
+    void buildMetaDeserializerClass(BuildCtx & ctx, IHqlExpression * record, const char * deserializerName, IAtom * serializeForm);
     bool buildMetaPrefetcherClass(BuildCtx & ctx, IHqlExpression * record, const char * prefetcherName);
 
     void buildLibraryInstanceExtract(BuildCtx & ctx, HqlCppLibraryInstance * libraryInstance);
@@ -1676,7 +1678,7 @@ public:
     void buildXmlReadTransform(IHqlExpression * dataset, StringBuffer & className, bool & usesContents);
     void doBuildXmlReadMember(ActivityInstance & instance, IHqlExpression * expr, const char * functionName, bool & usesContents);
 
-    void ensureSerialized(const CHqlBoundTarget & variable, BuildCtx & serializectx, BuildCtx & deserializectx, const char * inBufferName, const char * outBufferName, _ATOM serializeForm);
+    void ensureSerialized(const CHqlBoundTarget & variable, BuildCtx & serializectx, BuildCtx & deserializectx, const char * inBufferName, const char * outBufferName, IAtom * serializeForm);
     void ensureRowAllocator(StringBuffer & allocatorName, BuildCtx & ctx, IHqlExpression * record, IHqlExpression * activityId);
     IHqlExpression * createRowAllocator(BuildCtx & ctx, IHqlExpression * record);
 
@@ -1763,8 +1765,8 @@ protected:
 
     void doFilterAssignment(BuildCtx & ctx, TransformBuilder * builder, HqlExprArray & assigns, IHqlExpression * expr);
     void doFilterAssignments(BuildCtx & ctx, TransformBuilder * builder, HqlExprArray & assigns, IHqlExpression * expr);
-    void generateSerializeAssigns(BuildCtx & ctx, IHqlExpression * record, IHqlExpression * selector, IHqlExpression * selfSelect, IHqlExpression * leftSelect, const DatasetReference & srcDataset, const DatasetReference & tgtDataset, HqlExprArray & srcSelects, HqlExprArray & tgtSelects, bool needToClear, node_operator serializeOp, _ATOM serialForm);
-    void generateSerializeFunction(BuildCtx & ctx, const char * funcName, const DatasetReference & srcDataset, const DatasetReference & tgtDataset, HqlExprArray & srcSelects, HqlExprArray & tgtSelects, node_operator serializeOp, _ATOM serialForm);
+    void generateSerializeAssigns(BuildCtx & ctx, IHqlExpression * record, IHqlExpression * selector, IHqlExpression * selfSelect, IHqlExpression * leftSelect, const DatasetReference & srcDataset, const DatasetReference & tgtDataset, HqlExprArray & srcSelects, HqlExprArray & tgtSelects, bool needToClear, node_operator serializeOp, IAtom * serialForm);
+    void generateSerializeFunction(BuildCtx & ctx, const char * funcName, const DatasetReference & srcDataset, const DatasetReference & tgtDataset, HqlExprArray & srcSelects, HqlExprArray & tgtSelects, node_operator serializeOp, IAtom * serialForm);
     void generateSerializeKey(BuildCtx & ctx, node_operator side, const DatasetReference & dataset, HqlExprArray & sorts, bool isGlobal, bool generateCompares, bool canReuseLeft);             //NB: sorts are ats.xyz
     void generateSortCompare(BuildCtx & nestedctx, BuildCtx & ctx, node_operator index, const DatasetReference & dataset, HqlExprArray & sorts, bool canRemoveSort, IHqlExpression * noSortAttr, bool canReuseLeft, bool isLightweight, bool isLocal);
     void addSchemaField(IHqlExpression *field, MemoryBuffer &schema, IHqlExpression *selector);
@@ -1781,9 +1783,9 @@ protected:
     void buildCsvReadTransform(BuildCtx & subctx, IHqlExpression * expr, IHqlExpression * selector, unsigned & numFields);
     void buildCsvReadTransformer(IHqlExpression * dataset, StringBuffer & instanceName, IHqlExpression * optCsvAttr);
 
-    void buildCsvWriteScalar(BuildCtx & ctx, IHqlExpression * expr, _ATOM encoding);
-    void buildCsvWriteTransform(BuildCtx & subctx, IHqlExpression * dataset, _ATOM encoding);
-    void buildCsvWriteTransform(BuildCtx & subctx, IHqlExpression * expr, IHqlExpression * selector, _ATOM encoding);
+    void buildCsvWriteScalar(BuildCtx & ctx, IHqlExpression * expr, IAtom * encoding);
+    void buildCsvWriteTransform(BuildCtx & subctx, IHqlExpression * dataset, IAtom * encoding);
+    void buildCsvWriteTransform(BuildCtx & subctx, IHqlExpression * expr, IHqlExpression * selector, IAtom * encoding);
 
     void buildCsvWriteMembers(ActivityInstance * instance, IHqlExpression * dataset, IHqlExpression * csvAttr);
     void buildXmlWriteMembers(ActivityInstance * instance, IHqlExpression * dataset, IHqlExpression * xmlAttr);
@@ -1811,7 +1813,7 @@ protected:
     void pickBestEngine(HqlExprArray & exprs);
     IHqlExpression * separateLibraries(IHqlExpression * query, HqlExprArray & internalLibraries);
 
-    void doBuildSerialize(BuildCtx & ctx, _ATOM name, IHqlExpression * length, CHqlBoundExpr & bound, const char * bufferName);
+    void doBuildSerialize(BuildCtx & ctx, IIdAtom * name, IHqlExpression * length, CHqlBoundExpr & bound, const char * bufferName);
     void modifyOutputLocations(HqlExprArray & exprs);
     IHqlExpression * getDefaultOutputAttr(IHqlExpression * expr);
     IHqlExpression * calculatePersistInputCrc(BuildCtx & ctx, IHqlExpression * expr);

+ 2 - 2
ecl/hqlcpp/hqlcppc.hpp

@@ -51,8 +51,8 @@ public:
     virtual bool modifyColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value, node_operator op) = 0;
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value) = 0;
     virtual void setRow(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IReferenceSelector * value) = 0;
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm) = 0;
-    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm) = 0;
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm) = 0;
+    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm) = 0;
     virtual bool prepareReadAhead(HqlCppTranslator & translator, ReadAheadState & state) = 0;
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state) = 0;
 };

+ 19 - 19
ecl/hqlcpp/hqlcppcase.cpp

@@ -41,21 +41,21 @@
 
 //===========================================================================
 
-static _ATOM searchDataTableAtom;
-static _ATOM searchEStringTableAtom;
-static _ATOM searchQStringTableAtom;
-static _ATOM searchStringTableAtom;
-static _ATOM searchVStringTableAtom;
+static IIdAtom * searchDataTableAtom;
+static IIdAtom * searchEStringTableAtom;
+static IIdAtom * searchQStringTableAtom;
+static IIdAtom * searchStringTableAtom;
+static IIdAtom * searchVStringTableAtom;
 
 //===========================================================================
 
 MODULE_INIT(INIT_PRIORITY_STANDARD)
 {
-    searchDataTableAtom = createIdentifierAtom("searchDataTable");
-    searchEStringTableAtom = createIdentifierAtom("searchEStringTable");
-    searchQStringTableAtom = createIdentifierAtom("searchQStringTable");
-    searchStringTableAtom = createIdentifierAtom("searchStringTable");
-    searchVStringTableAtom = createIdentifierAtom("searchVStringTable");
+    searchDataTableAtom = createIdAtom("searchDataTable");
+    searchEStringTableAtom = createIdAtom("searchEStringTable");
+    searchQStringTableAtom = createIdAtom("searchQStringTable");
+    searchStringTableAtom = createIdAtom("searchStringTable");
+    searchVStringTableAtom = createIdAtom("searchVStringTable");
     return true;
 }
 MODULE_EXIT()
@@ -457,7 +457,7 @@ void HqlCppCaseInfo::buildLoopChopMap(BuildCtx & ctx, const CHqlBoundTarget & ta
         ITypeInfo * tableType = makePointerType(tableEntryType);
         HqlExprArray args;
 
-        _ATOM func;
+        IIdAtom * func;
         switch (ctc)
         {
         case type_data: 
@@ -478,13 +478,13 @@ void HqlCppCaseInfo::buildLoopChopMap(BuildCtx & ctx, const CHqlBoundTarget & ta
                 UNIMPLEMENTED;
             break;
         case type_unicode:
-            func = searchUnicodeTableAtom;
+            func = searchUnicodeTableId;
             break;
         case type_utf8:
-            func = searchUtf8TableAtom;
+            func = searchUtf8TableId;
             break;
         case type_varunicode:
-            func = searchVUnicodeTableAtom;
+            func = searchVUnicodeTableId;
             break;
         default:
             throwUnexpectedType(compareType);
@@ -586,20 +586,20 @@ void HqlCppCaseInfo::buildIntegerSearchMap(BuildCtx & ctx, const CHqlBoundTarget
     args.append(*createCompareList());
     args.append(*LINK(test));
 
-    _ATOM func;
+    IIdAtom * func;
     if (compareType->isSigned())
     {
         if (compareType->getSize() > 4)
-            func = searchTableInteger8Atom;
+            func = searchTableInteger8Id;
         else
-            func = searchTableInteger4Atom;
+            func = searchTableInteger4Id;
     }
     else
     {
         if (compareType->getSize() > 4)
-            func = searchTableUInteger8Atom;
+            func = searchTableUInteger8Id;
         else
-            func = searchTableUInteger4Atom;
+            func = searchTableUInteger4Id;
     }
 
     OwnedHqlExpr search = translator.bindFunctionCall(func, args);

+ 46 - 46
ecl/hqlcpp/hqlcppds.cpp

@@ -119,7 +119,7 @@ IReferenceSelector * HqlCppTranslator::doBuildRowDeserializeRow(BuildCtx & ctx,
 {
     IHqlExpression * srcRow = expr->queryChild(0);
     IHqlExpression * record = expr->queryRecord();
-    _ATOM serializeForm = expr->queryChild(2)->queryName();
+    IAtom * serializeForm = expr->queryChild(2)->queryName();
 
     Owned<BoundRow> tempRow = declareLinkedRow(ctx, expr, false);
 
@@ -131,7 +131,7 @@ IReferenceSelector * HqlCppTranslator::doBuildRowDeserializeRow(BuildCtx & ctx,
     args.append(*createSerializer(ctx, record, serializeForm, deserializerAtom));
     args.append(*LINK(srcRow));
     Owned<ITypeInfo> resultType = makeReferenceModifier(makeAttributeModifier(makeRowType(record->getType()), getLinkCountedAttr()));
-    OwnedHqlExpr call = bindFunctionCall(rtlDeserializeRowAtom, args, resultType);
+    OwnedHqlExpr call = bindFunctionCall(rtlDeserializeRowId, args, resultType);
     buildExprAssign(ctx, target, call);
 
     ctx.associate(*tempRow);
@@ -356,7 +356,7 @@ IReferenceSelector * HqlCppTranslator::doBuildRowFromXML(BuildCtx & ctx, IHqlExp
     args.append(*ensureExprType(expr->queryChild(1), utf8Type));
     args.append(*createQuoted(xmlInstanceName, makeBoolType()));
     args.append(*createConstant(expr->hasProperty(trimAtom)));
-    OwnedHqlExpr function = bindFunctionCall(createRowFromXmlAtom, args, overrideType);
+    OwnedHqlExpr function = bindFunctionCall(createRowFromXmlId, args, overrideType);
 
     CHqlBoundExpr bound;
     buildExpr(ctx, function, bound);
@@ -421,7 +421,7 @@ IReferenceSelector * HqlCppTranslator::buildNewRow(BuildCtx & ctx, IHqlExpressio
     case no_serialize:
         {
             IHqlExpression * deserialized = expr->queryChild(0);
-            _ATOM serializeForm = expr->queryChild(1)->queryName();
+            IAtom * serializeForm = expr->queryChild(1)->queryName();
             if (isDummySerializeDeserialize(expr))
                 return buildNewRow(ctx, deserialized->queryChild(0));
             else if (!typeRequiresDeserialization(deserialized->queryType(), serializeForm))
@@ -432,7 +432,7 @@ IReferenceSelector * HqlCppTranslator::buildNewRow(BuildCtx & ctx, IHqlExpressio
     case no_deserialize:
         {
             IHqlExpression * serialized = expr->queryChild(0);
-            _ATOM serializeForm = expr->queryChild(2)->queryName();
+            IAtom * serializeForm = expr->queryChild(2)->queryName();
             if (isDummySerializeDeserialize(expr))
                 return buildNewRow(ctx, serialized->queryChild(0));
             else if (!typeRequiresDeserialization(expr->queryType(), serializeForm))
@@ -472,7 +472,7 @@ IReferenceSelector * HqlCppTranslator::buildNewRow(BuildCtx & ctx, IHqlExpressio
         }
     case no_getresult:
         {
-            _ATOM serializeForm = diskAtom;  // What if we start using internal in the engines?
+            IAtom * serializeForm = diskAtom;  // What if we start using internal in the engines?
             IHqlExpression * seqAttr = expr->queryProperty(sequenceAtom);
             IHqlExpression * nameAttr = expr->queryProperty(namedAtom);
             IHqlExpression * record = expr->queryRecord();
@@ -1192,11 +1192,11 @@ void HqlCppTranslator::doBuildAggregateList(BuildCtx & ctx, const CHqlBoundTarge
         elemType = defaultIntegralType;
 
     //Default implementation in terms of a dataset
-    OwnedHqlExpr field = createField(valueAtom, LINK(elemType), NULL);
+    OwnedHqlExpr field = createField(valueId, LINK(elemType), NULL);
     OwnedHqlExpr record = createRecord(field);
     OwnedHqlExpr ds = createDataset(no_temptable, LINK(list), LINK(record));
 
-    OwnedHqlExpr aggField = createField(valueAtom, expr->getType(), NULL);
+    OwnedHqlExpr aggField = createField(valueId, expr->getType(), NULL);
     OwnedHqlExpr aggRecord = createRecord(aggField);
     OwnedHqlExpr self = createSelector(no_self, aggRecord, NULL);
     OwnedHqlExpr aggExpr = createValue(aggOp, expr->getType(), createSelectExpr(LINK(ds), LINK(field)));
@@ -1323,7 +1323,7 @@ unsigned ChildGraphExprBuilder::addInput()
     return id;
 }
 
-IHqlExpression * ChildGraphExprBuilder::getGraph(_ATOM extraAttrName)
+IHqlExpression * ChildGraphExprBuilder::getGraph(IAtom * extraAttrName)
 {
     HqlExprArray args;
     args.append(*LINK(represents));
@@ -1386,7 +1386,7 @@ void ChildGraphBuilder::generateGraph(BuildCtx & ctx)
     args.append(*createTranslated(boundExtract.length));
     args.append(*boundExtract.getTranslatedExpr());
 
-    OwnedHqlExpr call = translator.bindFunctionCall(evaluateChildQueryInstanceAtom, args);
+    OwnedHqlExpr call = translator.bindFunctionCall(evaluateChildQueryInstanceId, args);
     CHqlBoundExpr bound;
     translator.buildExpr(graphctx, call, bound);
     StringBuffer s;
@@ -1874,7 +1874,7 @@ IHqlExpression * createGetResultFromWorkunitDataset(IHqlExpression * expr)
     return createDataset(no_getresult, LINK(expr->queryRecord()), createComma(LINK(expr->queryProperty(sequenceAtom)), name));
 }
 
-void HqlCppTranslator::buildAssignSerializedDataset(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr, _ATOM serializeForm)
+void HqlCppTranslator::buildAssignSerializedDataset(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr, IAtom * serializeForm)
 {
     OwnedITypeInfo serializedType = getSerializedForm(expr->queryType(), serializeForm);
     assertex(recordTypesMatch(target.queryType(), serializedType));
@@ -1883,23 +1883,23 @@ void HqlCppTranslator::buildAssignSerializedDataset(BuildCtx & ctx, const CHqlBo
     args.append(*createSerializer(ctx, expr->queryRecord(), serializeForm, serializerAtom));
     args.append(*LINK(expr));
 
-    _ATOM func;
+    IIdAtom * func;
     if (target.expr->isDictionary())
     {
         assertex(serializeForm == internalAtom);
-        func = rtlSerializeDictionaryAtom;
+        func = rtlSerializeDictionaryId;
     }
     else if (expr->isDictionary())
     {
         assertex(serializeForm == diskAtom);
-        func = rtlSerializeDictionaryToDatasetAtom;
+        func = rtlSerializeDictionaryToDatasetId;
     }
     else
     {
         if (isGrouped(expr))
-            func = groupedRowset2DatasetXAtom;
+            func = groupedRowset2DatasetXId;
         else
-            func = rowset2DatasetXAtom;
+            func = rowset2DatasetXId;
     }
 
 
@@ -1907,7 +1907,7 @@ void HqlCppTranslator::buildAssignSerializedDataset(BuildCtx & ctx, const CHqlBo
     buildExprAssign(ctx, target, call);
 }
 
-void HqlCppTranslator::buildSerializedDataset(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt, _ATOM serializeForm)
+void HqlCppTranslator::buildSerializedDataset(BuildCtx & ctx, IHqlExpression * expr, CHqlBoundExpr & tgt, IAtom * serializeForm)
 {
     CHqlBoundTarget target;
     OwnedITypeInfo serializedType = getSerializedForm(expr->queryType(), serializeForm);
@@ -1917,12 +1917,12 @@ void HqlCppTranslator::buildSerializedDataset(BuildCtx & ctx, IHqlExpression * e
 }
 
 
-void HqlCppTranslator::buildAssignDeserializedDataset(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr, _ATOM serializeForm)
+void HqlCppTranslator::buildAssignDeserializedDataset(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr, IAtom * serializeForm)
 {
     OwnedITypeInfo serializedType = getSerializedForm(target.queryType(), serializeForm);
     assertex(recordTypesMatch(serializedType, expr->queryType()));
 
-    _ATOM func;
+    IIdAtom * func;
     IHqlExpression * record = ::queryRecord(target.queryType());
     HqlExprArray args;
     args.append(*createSerializer(ctx, record, serializeForm, deserializerAtom));
@@ -1931,12 +1931,12 @@ void HqlCppTranslator::buildAssignDeserializedDataset(BuildCtx & ctx, const CHql
         if (serializeForm == internalAtom)
         {
             assertex(expr->isDictionary());
-            func = rtlDeserializeDictionaryAtom;
+            func = rtlDeserializeDictionaryId;
         }
         else if (serializeForm == diskAtom)
         {
             assertex(expr->isDataset());
-            func = rtlDeserializeDictionaryFromDatasetAtom;
+            func = rtlDeserializeDictionaryFromDatasetId;
             StringBuffer lookupHelperName;
             buildDictionaryHashClass(record, lookupHelperName);
             args.append(*createQuoted(lookupHelperName.str(), makeBoolType()));
@@ -1947,9 +1947,9 @@ void HqlCppTranslator::buildAssignDeserializedDataset(BuildCtx & ctx, const CHql
     else
     {
         if (isGrouped(expr))
-            func = groupedDataset2RowsetXAtom;
+            func = groupedDataset2RowsetXId;
         else
-            func = dataset2RowsetXAtom;
+            func = dataset2RowsetXId;
     }
 
     args.append(*LINK(expr));
@@ -1957,7 +1957,7 @@ void HqlCppTranslator::buildAssignDeserializedDataset(BuildCtx & ctx, const CHql
     buildExprAssign(ctx, target, call);
 }
 
-void HqlCppTranslator::buildDeserializedDataset(BuildCtx & ctx, ITypeInfo * type, IHqlExpression * expr, CHqlBoundExpr & tgt, _ATOM serializeForm)
+void HqlCppTranslator::buildDeserializedDataset(BuildCtx & ctx, ITypeInfo * type, IHqlExpression * expr, CHqlBoundExpr & tgt, IAtom * serializeForm)
 {
 #ifdef _DEBUG
     OwnedITypeInfo serializedType = getSerializedForm(type, serializeForm);
@@ -1978,7 +1978,7 @@ void HqlCppTranslator::buildDeserializedDataset(BuildCtx & ctx, ITypeInfo * type
 
 void HqlCppTranslator::ensureDatasetFormat(BuildCtx & ctx, ITypeInfo * type, CHqlBoundExpr & tgt, ExpressionFormat format)
 {
-    const _ATOM serializeForm = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
+    IAtom * serializeForm = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
     switch (format)
     {
     case FormatBlockedDataset:
@@ -2172,7 +2172,7 @@ void HqlCppTranslator::doBuildDataset(BuildCtx & ctx, IHqlExpression * expr, CHq
     case no_serialize:
         {
             IHqlExpression * deserialized = expr->queryChild(0);
-            _ATOM serializeForm = expr->queryChild(1)->queryName();
+            IAtom * serializeForm = expr->queryChild(1)->queryName();
             if (isDummySerializeDeserialize(expr))
                 doBuildDataset(ctx, deserialized->queryChild(0), tgt, format);
             else if (!typeRequiresDeserialization(deserialized->queryType(), serializeForm))
@@ -2185,7 +2185,7 @@ void HqlCppTranslator::doBuildDataset(BuildCtx & ctx, IHqlExpression * expr, CHq
     case no_deserialize:
         {
             IHqlExpression * serialized = expr->queryChild(0);
-            _ATOM serializeForm = expr->queryChild(2)->queryName();
+            IAtom * serializeForm = expr->queryChild(2)->queryName();
             if (isDummySerializeDeserialize(expr))
                 doBuildDataset(ctx, serialized->queryChild(0), tgt, format);
             else if (!typeRequiresDeserialization(expr->queryType(), serializeForm))
@@ -2291,7 +2291,7 @@ void HqlCppTranslator::doBuildDataset(BuildCtx & ctx, IHqlExpression * expr, CHq
             Owned<IHqlCppDatasetBuilder> builder;
 
             IHqlExpression * record = expr->queryRecord();
-            const _ATOM serializeForm = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
+            IAtom * serializeForm = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
             OwnedHqlExpr serializedRecord = getSerializedForm(record, serializeForm);
             if (format == FormatNatural)
             {
@@ -2479,7 +2479,7 @@ void HqlCppTranslator::buildDatasetAssign(BuildCtx & ctx, const CHqlBoundTarget
     case no_serialize:
         {
             IHqlExpression * deserialized = expr->queryChild(0);
-            _ATOM serializeForm = expr->queryChild(1)->queryName();
+            IAtom * serializeForm = expr->queryChild(1)->queryName();
             if (isDummySerializeDeserialize(expr))
                 buildDatasetAssign(ctx, target, deserialized->queryChild(0));
             else if (!typeRequiresDeserialization(deserialized->queryType(), serializeForm))
@@ -2491,7 +2491,7 @@ void HqlCppTranslator::buildDatasetAssign(BuildCtx & ctx, const CHqlBoundTarget
     case no_deserialize:
         {
             IHqlExpression * serialized = expr->queryChild(0);
-            _ATOM serializeForm = expr->queryChild(2)->queryName();
+            IAtom * serializeForm = expr->queryChild(2)->queryName();
             if (isDummySerializeDeserialize(expr))
                 buildDatasetAssign(ctx, target, serialized->queryChild(0));
             else if (!typeRequiresDeserialization(expr->queryType(), serializeForm))
@@ -2587,7 +2587,7 @@ void HqlCppTranslator::buildDatasetAssign(BuildCtx & ctx, const CHqlBoundTarget
             bool sourceOutOfLine = isArrayRowset(exprType);
             if (sourceOutOfLine != targetOutOfLine)
             {
-                _ATOM serializeFormat = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
+                IAtom * serializeFormat = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
                 OwnedITypeInfo serializedSourceType = getSerializedForm(exprType, serializeFormat);
                 OwnedITypeInfo serializedTargetType = getSerializedForm(to, serializeFormat);
                 if (queryUnqualifiedType(serializedSourceType) == queryUnqualifiedType(serializedTargetType))
@@ -2631,11 +2631,11 @@ void HqlCppTranslator::buildDatasetAssign(BuildCtx & ctx, const CHqlBoundTarget
         case no_null:
         case no_id2blob:
             {
-                _ATOM func = NULL;
+                IIdAtom * func = NULL;
                 if (!isArrayRowset(to))
                 {
                     if (!isArrayRowset(exprType))
-                        func = dataset2DatasetXAtom;
+                        func = dataset2DatasetXId;
                 }
                 else if (hasLinkCountedModifier(to))
                 {
@@ -2662,7 +2662,7 @@ void HqlCppTranslator::buildDatasetAssign(BuildCtx & ctx, const CHqlBoundTarget
                             ctx.addAssign(target.count, bound.count);
                             HqlExprArray args;
                             args.append(*LINK(bound.expr));
-                            OwnedHqlExpr call = bindTranslatedFunctionCall(linkRowsetAtom, args);
+                            OwnedHqlExpr call = bindTranslatedFunctionCall(linkRowsetId, args);
                             ctx.addAssign(target.expr, call);
                         }
                         return;
@@ -4007,7 +4007,7 @@ void HqlCppTranslator::buildCompoundAssign(BuildCtx & ctx, IHqlExpression * left
             else
             {
                 IHqlSimpleScope * scope = rightScope->querySimpleScope();
-                IHqlExpression * resolved = scope->lookupSymbol(left->queryName());
+                IHqlExpression * resolved = scope->lookupSymbol(left->queryId());
                 assertex(resolved);
                 selectedRight.setown(createSelectExpr(LINK(rightSelector), resolved));
             }
@@ -4306,7 +4306,7 @@ void HqlCppTranslator::doBuildRowAssignProjectRow(BuildCtx & ctx, IReferenceSele
 void HqlCppTranslator::doBuildRowAssignSerializeRow(BuildCtx & ctx, IReferenceSelector * target, IHqlExpression * expr)
 {
     IHqlExpression * srcRow = expr->queryChild(0);
-    _ATOM serializeForm = expr->queryChild(1)->queryName();
+    IAtom * serializeForm = expr->queryChild(1)->queryName();
 
     Owned<IReferenceSelector> source = buildNewRow(ctx, srcRow);
 
@@ -4325,7 +4325,7 @@ void HqlCppTranslator::doBuildRowAssignSerializeRow(BuildCtx & ctx, IReferenceSe
         args.append(*LINK(srcRow));
 
         Owned<ITypeInfo> type = makeTransformType(expr->queryRecord()->getType());
-        OwnedHqlExpr call = bindFunctionCall(rtlSerializeToBuilderAtom, args, type);
+        OwnedHqlExpr call = bindFunctionCall(rtlSerializeToBuilderId, args, type);
         doTransform(subctx, call, selfCursor);
         //MORE: This doesn't associated the returned size with the target if assigned to a child field.
         //very unusual code, so not too concerned.
@@ -4359,7 +4359,7 @@ void HqlCppTranslator::buildRowAssign(BuildCtx & ctx, IReferenceSelector * targe
     case no_serialize:
         {
             IHqlExpression * deserialized = expr->queryChild(0);
-            _ATOM serializeForm = expr->queryChild(1)->queryName();
+            IAtom * serializeForm = expr->queryChild(1)->queryName();
             if (isDummySerializeDeserialize(expr))
                 buildRowAssign(ctx, target, deserialized->queryChild(0));
             else if (!typeRequiresDeserialization(deserialized->queryType(), serializeForm))
@@ -4929,8 +4929,8 @@ IHqlExpression * HqlCppTranslator::buildGetLocalResult(BuildCtx & ctx, IHqlExpre
         args.append(*LINK(matchedResults->queryExpr()));
         args.append(*LINK(resultNum));
         if (expr->isDictionary())
-            return bindFunctionCall(getChildQueryDictionaryResultAtom, args, exprType);
-        return bindFunctionCall(getChildQueryLinkedResultAtom, args, exprType);
+            return bindFunctionCall(getChildQueryDictionaryResultId, args, exprType);
+        return bindFunctionCall(getChildQueryLinkedResultId, args, exprType);
     }
 
     assertex(activeActivities.ordinality());
@@ -4951,8 +4951,8 @@ IHqlExpression * HqlCppTranslator::buildGetLocalResult(BuildCtx & ctx, IHqlExpre
     args.append(*LINK(retInstanceExpr));
     args.append(*LINK(resultNum));
     if (expr->isDictionary())
-        return bindFunctionCall(getLocalDictionaryResultAtom, args, exprType);
-    return bindFunctionCall(getLocalLinkedResultAtom, args, exprType);
+        return bindFunctionCall(getLocalDictionaryResultId, args, exprType);
+    return bindFunctionCall(getLocalLinkedResultId, args, exprType);
 }
 
 void HqlCppTranslator::doBuildAssignGetGraphResult(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr)
@@ -5023,7 +5023,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityGetGraphResult(BuildCtx & ctx,
     bool useImplementationClass = options.minimizeActivityClasses && (resultNum->getOperator() == no_constant);
     Owned<ActivityInstance> instance = new ActivityInstance(*this, ctx, activityKind, expr, "LocalResultRead");
     if (useImplementationClass)
-        instance->setImplementationClass(newLocalResultReadArgAtom);
+        instance->setImplementationClass(newLocalResultReadArgId);
     if (expr->hasProperty(_loop_Atom))
     {
         if (isCurrentActiveGraph(ctx, graphId))
@@ -5111,7 +5111,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivitySetGraphResult(BuildCtx & ctx,
     }
 
     if (useImplementationClass)
-        instance->setImplementationClass(newLocalResultSpillArgAtom);
+        instance->setImplementationClass(newLocalResultSpillArgId);
 
     if (expr->hasProperty(_loop_Atom))
         instance->graphLabel.set("End Loop");
@@ -5203,7 +5203,7 @@ void HqlCppTranslator::doBuildAssignLoopCounter(BuildCtx & ctx, const CHqlBoundT
     }
 
     HqlExprArray args;
-    OwnedHqlExpr call = bindFunctionCall(getGraphLoopCounterAtom, args);
+    OwnedHqlExpr call = bindFunctionCall(getGraphLoopCounterId, args);
     buildExprAssign(ctx, target, call);
 }
 
@@ -5239,7 +5239,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivitySetGraphLoopResult(BuildCtx &
     bool useImplementationClass = options.minimizeActivityClasses;
     Owned<ActivityInstance> instance = new ActivityInstance(*this, ctx, TAKgraphloopresultwrite, expr, "GraphLoopResultWrite");
     if (useImplementationClass)
-        instance->setImplementationClass(newGraphLoopResultWriteArgAtom);
+        instance->setImplementationClass(newGraphLoopResultWriteArgId);
 
     buildActivityFramework(instance, true);
 

+ 1 - 1
ecl/hqlcpp/hqlcppds.hpp

@@ -27,7 +27,7 @@ public:
     IHqlExpression * addDataset(IHqlExpression * expr);
     void addAction(IHqlExpression * expr);
     unsigned addInput();
-    IHqlExpression * getGraph(_ATOM extraAttrName = NULL);
+    IHqlExpression * getGraph(IAtom * extraAttrName = NULL);
 
     inline IHqlExpression * queryRepresents() const { return represents; }
     inline unsigned numResults() const { return numInputs + numOutputs; }

+ 1 - 1
ecl/hqlcpp/hqlcpputil.cpp

@@ -395,7 +395,7 @@ IHqlExpression * projectCreateSetDataset(IHqlExpression * expr)
         if (select->getOperator() == no_select)
             targetField.set(select->queryChild(1));
         else
-            targetField.setown(createField(valueAtom, select->getType(), NULL));
+            targetField.setown(createField(valueId, select->getType(), NULL));
         IHqlExpression * newRecord = createRecord(targetField);
         assigns.append(*createAssign(createSelectExpr(getSelf(newRecord), LINK(targetField)), LINK(select)));
         IHqlExpression * newTransform = createValue(no_newtransform, makeTransformType(LINK(newRecord->queryRecordType())), assigns);

+ 13 - 13
ecl/hqlcpp/hqlcset.cpp

@@ -728,7 +728,7 @@ BoundRow * InlineLinkedDictionaryCursor::buildSelectMap(BuildCtx & ctx, IHqlExpr
     CHqlBoundTarget target;
     target.expr.set(tempRow->queryBound());
     HqlExprArray args;
-    _ATOM lookupFunction = NULL;
+    IIdAtom * lookupFunction = NULL;
     IHqlExpression *dictionary = mapExpr->queryChild(0);
     IHqlExpression *searchExpr = mapExpr->queryChild(1);
 
@@ -769,7 +769,7 @@ BoundRow * InlineLinkedDictionaryCursor::buildSelectMap(BuildCtx & ctx, IHqlExpr
         args.add(*LINK(dictionary), 0);
         args.append(*getExtractSelect(searchExpr->queryChild(0), queryFirstField(searchRecord)));
         args.append(*::createRow(no_null, LINK(record))); // the default record
-        lookupFunction = createAtom(optimizedLookupFunc);
+        lookupFunction = createIdAtom(optimizedLookupFunc);
     }
     else
     {
@@ -779,7 +779,7 @@ BoundRow * InlineLinkedDictionaryCursor::buildSelectMap(BuildCtx & ctx, IHqlExpr
         args.append(*LINK(dictionary));
         args.append(*LINK(searchExpr));
         args.append(*::createRow(no_null, LINK(record))); // the default record
-        lookupFunction = dictionaryLookupAtom;
+        lookupFunction = dictionaryLookupId;
     }
     Owned<ITypeInfo> resultType = makeReferenceModifier(makeAttributeModifier(makeRowType(record->getType()), getLinkCountedAttr()));
     OwnedHqlExpr call = translator.bindFunctionCall(lookupFunction, args, resultType);
@@ -798,7 +798,7 @@ void InlineLinkedDictionaryCursor::buildInDataset(BuildCtx & ctx, IHqlExpression
     OwnedHqlExpr searchRecord = getDictionarySearchRecord(record);
     OwnedHqlExpr keyRecord = getDictionaryKeyRecord(record);
     unsigned numKeyFields = getFlatFieldCount(keyRecord);
-    _ATOM lookupFunction = NULL;
+    IIdAtom * lookupFunction = NULL;
     StringBuffer optimizedLookupFunc;
     if (numKeyFields == 1)
     {
@@ -832,7 +832,7 @@ void InlineLinkedDictionaryCursor::buildInDataset(BuildCtx & ctx, IHqlExpression
     {
         args.add(*LINK(dictionary), 0);
         args.append(*getExtractSelect(searchExpr->queryChild(0), queryFirstField(searchRecord)));
-        lookupFunction = createAtom(optimizedLookupFunc);
+        lookupFunction = createIdAtom(optimizedLookupFunc);
     }
     else
     {
@@ -841,7 +841,7 @@ void InlineLinkedDictionaryCursor::buildInDataset(BuildCtx & ctx, IHqlExpression
         args.append(*createQuoted(lookupHelperName, makeBoolType()));
         args.append(*LINK(dictionary));
         args.append(*LINK(searchExpr));
-        lookupFunction = dictionaryLookupExistsAtom;
+        lookupFunction = dictionaryLookupExistsId;
     }
     OwnedHqlExpr call = translator.bindFunctionCall(lookupFunction, args, makeBoolType());
     translator.buildExpr(ctx, call, tgt);
@@ -851,7 +851,7 @@ void InlineLinkedDictionaryCursor::buildCountDict(BuildCtx & ctx, CHqlBoundExpr
 {
     HqlExprArray args;
     args.append(*LINK(ds));
-    OwnedHqlExpr call = translator.bindFunctionCall(dictionaryCountAtom, args, makeIntType(8, false));
+    OwnedHqlExpr call = translator.bindFunctionCall(dictionaryCountId, args, makeIntType(8, false));
     translator.buildExpr(ctx, call, tgt);
 }
 
@@ -859,7 +859,7 @@ void InlineLinkedDictionaryCursor::buildExistsDict(BuildCtx & ctx, CHqlBoundExpr
 {
     HqlExprArray args;
     args.append(*LINK(ds));
-    OwnedHqlExpr call = translator.bindFunctionCall(dictionaryExistsAtom, args, makeBoolType());
+    OwnedHqlExpr call = translator.bindFunctionCall(dictionaryExistsId, args, makeBoolType());
     translator.buildExpr(ctx, call, tgt);
 }
 
@@ -1195,7 +1195,7 @@ GeneralSetCursor::GeneralSetCursor(HqlCppTranslator & _translator, IHqlExpressio
     ITypeInfo * elementType = LINK(expr->queryType()->queryChildType());
     if (!elementType)
         elementType = makeStringType(UNKNOWN_LENGTH, NULL, NULL);
-    element.setown(createField(valueAtom, elementType, NULL));
+    element.setown(createField(valueId, elementType, NULL));
 
     HqlExprArray fields;
     fields.append(*LINK(element));
@@ -1383,7 +1383,7 @@ IHqlExpression * CreateSetCursor::createDatasetSelect(IHqlExpression * indexExpr
     }
     else
     {
-        OwnedHqlExpr field = createField(createIdentifierAtom("__f1__"), value->getType(), NULL);
+        OwnedHqlExpr field = createField(createIdAtom("__f1__"), value->getType(), NULL);
         IHqlExpression * aggregateRecord = createRecord(field);
 
         IHqlExpression * assign = createAssign(createSelectExpr(getSelf(aggregateRecord), LINK(field)), LINK(value));
@@ -1517,7 +1517,7 @@ BoundRow * DatasetBuilderBase::buildCreateRow(BuildCtx & ctx)
     return translator.bindSelf(ctx, dataset, builderName);
 }
 
-BoundRow * DatasetBuilderBase::buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, _ATOM serializeForm)
+BoundRow * DatasetBuilderBase::buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, IAtom * serializeForm)
 {
     StringBuffer serializerInstanceName;
     translator.ensureRowSerializer(serializerInstanceName, ctx, record, serializeForm, deserializerAtom);
@@ -1913,7 +1913,7 @@ void LinkedDictionaryBuilder::buildDeclare(BuildCtx & ctx)
 SetBuilder::SetBuilder(HqlCppTranslator & _translator, ITypeInfo * fieldType, IHqlExpression * _allVar) : translator(_translator)
 {
     HqlExprArray fields;
-    fields.append(*createField(valueAtom, LINK(fieldType), NULL));
+    fields.append(*createField(valueId, LINK(fieldType), NULL));
     record.setown(createRecord(fields));
     allVar.set(_allVar);
     activeRow = NULL;
@@ -2128,7 +2128,7 @@ void HqlCppTranslator::doBuildAssignAddSets(BuildCtx & ctx, const CHqlBoundTarge
     HqlExprArray args;
     args.append(*LINK(left));
     args.append(*LINK(right));
-    OwnedHqlExpr call = bindFunctionCall(appendSetXAtom, args, left->queryType());
+    OwnedHqlExpr call = bindFunctionCall(appendSetXId, args, left->queryType());
     buildExprAssign(ctx, target, call);
 }
 

+ 3 - 3
ecl/hqlcpp/hqlcset.ipp

@@ -231,7 +231,7 @@ public:
     IMPLEMENT_IINTERFACE
 
     virtual BoundRow * buildCreateRow(BuildCtx & ctx);
-    virtual BoundRow * buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, _ATOM serializeForm);
+    virtual BoundRow * buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, IAtom * serializeForm);
     virtual void finishRow(BuildCtx & ctx, BoundRow * selfCursor);
 
 protected:
@@ -268,7 +268,7 @@ public:
 
     virtual void buildDeclare(BuildCtx & ctx);
     virtual BoundRow * buildCreateRow(BuildCtx & ctx);
-    virtual BoundRow * buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, _ATOM serializeForm) { throwUnexpected(); }
+    virtual BoundRow * buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, IAtom * serializeForm) { throwUnexpected(); }
     virtual void buildFinish(BuildCtx & ctx, const CHqlBoundTarget & target);
     virtual void buildFinish(BuildCtx & ctx, CHqlBoundExpr & bound);
     virtual void finishRow(BuildCtx & ctx, BoundRow * selfCursor);
@@ -357,7 +357,7 @@ public:
 
     virtual void buildDeclare(BuildCtx & ctx);
     virtual BoundRow * buildCreateRow(BuildCtx & ctx);
-    virtual BoundRow * buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, _ATOM serializeForm) { throwUnexpected(); }
+    virtual BoundRow * buildDeserializeRow(BuildCtx & ctx, IHqlExpression * serializedInput, IAtom * serializeForm) { throwUnexpected(); }
     virtual void buildFinish(BuildCtx & ctx, const CHqlBoundTarget & target);
     virtual void buildFinish(BuildCtx & ctx, CHqlBoundExpr & bound);
     virtual void finishRow(BuildCtx & ctx, BoundRow * selfCursor);

+ 2 - 2
ecl/hqlcpp/hqlfunc.hpp

@@ -45,7 +45,7 @@ public:
     virtual unsigned                    getNumParameters() = 0;
     virtual const char *            queryCppName() = 0;
     virtual IModuleInfo *       queryModule() = 0;
-    virtual _ATOM                       queryName() = 0;
+    virtual IAtom *                       queryName() = 0;
     virtual IFunctionParamInfo * queryParam(unsigned idx) = 0;
     virtual ITypeInfo *             queryReturnType() = 0;
 };
@@ -63,7 +63,7 @@ interface IFunctionDatabase : public IInterface
 {
 public:
     virtual IFunctionInfo *     queryFunction(unsigned idx) = 0;
-    virtual IFunctionInfo *     queryFunction(_ATOM name) = 0;
+    virtual IFunctionInfo *     queryFunction(IAtom * name) = 0;
     virtual IModuleInfo *       queryModule(unsigned idx) = 0;
 };
 

+ 6 - 6
ecl/hqlcpp/hqlfunc.ipp

@@ -20,7 +20,7 @@
 class FunctionParamInfo : public CInterface, implements IFunctionParamInfo
 {
 public:
-  FunctionParamInfo(ITypeInfo * type, _ATOM name, unsigned _dir, bool _isArray);
+  FunctionParamInfo(ITypeInfo * type, IAtom * name, unsigned _dir, bool _isArray);
   ~FunctionParamInfo();
   IMPLEMENT_IINTERFACE
 
@@ -33,7 +33,7 @@ public:
   enum { ParamIn = 1, ParamOut=2, ParamInOut=3 };
 protected:
   ITypeInfo *           type;
-  _ATOM                 name;
+  IAtom *                 name;
   unsigned              dir;
   bool                  isArray;
 };
@@ -41,7 +41,7 @@ protected:
 class FunctionInfo : public CInterface, implements IFunctionInfo
 {
 public:
-  FunctionInfo(_ATOM _name, IModuleInfo * _module);
+  FunctionInfo(IAtom * _name, IModuleInfo * _module);
   ~FunctionInfo();
   IMPLEMENT_IINTERFACE
 
@@ -50,7 +50,7 @@ public:
   virtual unsigned          getNumParameters();
   virtual const char *      queryCppName();
   virtual IModuleInfo *     queryModule();
-  virtual _ATOM             queryName();
+  virtual IAtom *             queryName();
   virtual IFunctionParamInfo *  queryParam(unsigned idx);
   virtual ITypeInfo *       queryReturnType();
 
@@ -59,7 +59,7 @@ public:
           void              setReturnType(ITypeInfo * type);
 
 protected:
-  _ATOM                 name;
+  IAtom *                 name;
   StringAttr            cppName;
   CIArray               params;
   ITypeInfo *           returnType;
@@ -90,7 +90,7 @@ public:
 
 //interface IFunctionDatabase
   virtual IFunctionInfo *   queryFunction(unsigned idx);
-  virtual IFunctionInfo *   queryFunction(_ATOM name);
+  virtual IFunctionInfo *   queryFunction(IAtom * name);
   virtual IModuleInfo *     queryModule(unsigned idx);
 
           void              addFunction(FunctionInfo & info) { functions.append(info); }

+ 16 - 15
ecl/hqlcpp/hqlgraph.cpp

@@ -66,7 +66,7 @@ void addGraphAttributeBool(IPropertyTree * node, const char * name, bool value)
         addGraphAttribute(node, name)->setPropBool("@value", value);
 }
 
-void addSimpleGraphEdge(IPropertyTree * subGraph, unsigned __int64 source, unsigned __int64 target, unsigned outputIndex, unsigned inputIndex, _ATOM kind, const char * label, bool nWay)
+void addSimpleGraphEdge(IPropertyTree * subGraph, unsigned __int64 source, unsigned __int64 target, unsigned outputIndex, unsigned inputIndex, IAtom * kind, const char * label, bool nWay)
 {
     IPropertyTree *edge = createPTree();
     edge->setPropInt64("@target", target);
@@ -90,7 +90,7 @@ void addSimpleGraphEdge(IPropertyTree * subGraph, unsigned __int64 source, unsig
 }
 
 
-void addComplexGraphEdge(IPropertyTree * graph, unsigned __int64 sourceGraph, unsigned __int64 targetGraph, unsigned __int64 sourceActivity, unsigned __int64 targetActivity, unsigned outputIndex, _ATOM kind, const char * label)
+void addComplexGraphEdge(IPropertyTree * graph, unsigned __int64 sourceGraph, unsigned __int64 targetGraph, unsigned __int64 sourceActivity, unsigned __int64 targetActivity, unsigned outputIndex, IAtom * kind, const char * label)
 {
     StringBuffer idText;
     IPropertyTree *edge = createPTree();
@@ -160,10 +160,11 @@ LogicalGraphCreator::~LogicalGraphCreator()
 
 void LogicalGraphCreator::addAttribute(const char * name, const char * value)
 {
-    addGraphAttribute(activityNode, name, value);
+    if (value)
+        addGraphAttribute(activityNode, name, value);
 }
 
-void LogicalGraphCreator::addAttribute(const char * name, _ATOM value)
+void LogicalGraphCreator::addAttribute(const char * name, IAtom * value)
 {
     if (value)
         addGraphAttribute(activityNode, name, value->str());
@@ -215,7 +216,7 @@ void LogicalGraphCreator::beginSubGraph(const char * label, bool nested)
     }
 }
 
-void LogicalGraphCreator::connectActivities(IHqlExpression * fromExpr, IHqlExpression * toExpr, _ATOM kind, const char * label, bool nWay)
+void LogicalGraphCreator::connectActivities(IHqlExpression * fromExpr, IHqlExpression * toExpr, IAtom * kind, const char * label, bool nWay)
 {
     StringBuffer tempLabel;
     if (fromExpr->getOperator() == no_comma)
@@ -297,7 +298,7 @@ void LogicalGraphCreator::createGraphActivity(IHqlExpression * expr)
 
     //First generate children...
     //MORE: may want to do inputs first and dependents afterwards.
-    _ATOM dependencyKind = dependencyAtom;
+    IAtom * dependencyKind = dependencyAtom;
     unsigned first = getFirstActivityArgument(expr);
     unsigned last = first + getNumActivityArguments(expr);
     node_operator op = expr->getOperator();
@@ -372,8 +373,8 @@ void LogicalGraphCreator::createGraphActivity(IHqlExpression * expr)
     IHqlExpression * symbol = queryNamedSymbol(expr);
     if (symbol)
     {
-        addAttribute("name", symbol->queryName());
-        addAttribute("module", symbol->queryFullModuleName());
+        addAttribute("name", symbol->queryId()->str());
+        addAttribute("module", symbol->queryFullModuleId()->str());
         addAttributeInt("line", symbol->getStartLine());
         addAttributeInt("column", symbol->getStartColumn());
     }
@@ -563,8 +564,8 @@ const char * LogicalGraphCreator::getActivityText(IHqlExpression * expr, StringB
 {
     if (expr->queryBody() != expr)
     {
-        _ATOM module = includeModuleInText ? expr->queryFullModuleName() : NULL;
-        _ATOM name = includeNameInText ? expr->queryName() : NULL;
+        IIdAtom * module = includeModuleInText ? expr->queryFullModuleId() : NULL;
+        IIdAtom * name = includeNameInText ? expr->queryId() : NULL;
         StringBuffer header;
         if (module)
         {
@@ -576,18 +577,18 @@ const char * LogicalGraphCreator::getActivityText(IHqlExpression * expr, StringB
                 if (dot)
                 {
                     if (stricmp(dot+1, name->str()) == 0)
-                        header.append(module);
+                        header.append(module->str());
                     else
-                        header.append(module).append("::").append(name);
+                        header.append(module->str()).append("::").append(name->str());
                 }
                 else
-                    header.append(module).append(".").append(name);
+                    header.append(module->str()).append(".").append(name->str());
             }
             else
-                header.append(module);
+                header.append(module->str());
         }
         else if (name)
-            header.append(name);
+            header.append(name->str());
 
         if (header.length())
             temp.append(header).append("\n");

+ 4 - 4
ecl/hqlcpp/hqlgraph.ipp

@@ -54,7 +54,7 @@ public:
     unsigned queryMaxActivityId() { return seq; }
 
 protected:
-    void connectActivities(IHqlExpression * from, IHqlExpression * to, _ATOM kind, const char * comment = NULL, bool nWay = false);
+    void connectActivities(IHqlExpression * from, IHqlExpression * to, IAtom * kind, const char * comment = NULL, bool nWay = false);
     void createRootGraphActivity(IHqlExpression * expr);
     void createGraphActivity(IHqlExpression * expr);
     void createSubGraphActivity(IHqlExpression * expr);
@@ -70,7 +70,7 @@ protected:
     bool isWorkflowExpanded(IHqlExpression * expr) const;
 
     void addAttribute(const char * name, const char * value);
-    void addAttribute(const char * name, _ATOM value);
+    void addAttribute(const char * name, IAtom * value);
     void addAttributeInt(const char * name, __int64 value);
     void addAttributeBool(const char * name, bool value);
 
@@ -108,8 +108,8 @@ IPropertyTree * addGraphAttribute(IPropertyTree * node, const char * name);
 void addGraphAttribute(IPropertyTree * node, const char * name, const char * value);
 void addGraphAttributeInt(IPropertyTree * node, const char * name, __int64 value);
 void addGraphAttributeBool(IPropertyTree * node, const char * name, bool value);
-void addSimpleGraphEdge(IPropertyTree * subGraph, unsigned __int64 source, unsigned __int64 target, unsigned outputIndex, unsigned inputIndex, _ATOM kind, const char * label, bool nWay);
-void addComplexGraphEdge(IPropertyTree * graph, unsigned __int64 sourceGraph, unsigned __int64 targetGraph, unsigned __int64 sourceActivity, unsigned __int64 targetActivity, unsigned outputIndex, _ATOM kind, const char * label);
+void addSimpleGraphEdge(IPropertyTree * subGraph, unsigned __int64 source, unsigned __int64 target, unsigned outputIndex, unsigned inputIndex, IAtom * kind, const char * label, bool nWay);
+void addComplexGraphEdge(IPropertyTree * graph, unsigned __int64 sourceGraph, unsigned __int64 targetGraph, unsigned __int64 sourceActivity, unsigned __int64 targetActivity, unsigned outputIndex, IAtom * kind, const char * label);
 void removeGraphAttribute(IPropertyTree * node, const char * name);
 
 #endif

文件差異過大導致無法顯示
+ 195 - 191
ecl/hqlcpp/hqlhtcpp.cpp


+ 4 - 4
ecl/hqlcpp/hqlhtcpp.ipp

@@ -166,7 +166,7 @@ public:
 
     BuildCtx &   onlyEvalOnceContext();
     inline IPropertyTree * querySubgraphNode() { return subgraph ? subgraph->tree.get() : NULL; }
-    inline void setImplementationClass(_ATOM name) { implementationClassName = name; }
+    inline void setImplementationClass(IIdAtom * name) { implementationClassName = name; }
     void setInternalSink(bool value);
 
     void changeActivityKind(ThorActivityKind newKind);
@@ -191,7 +191,7 @@ public:
     StringAttr   graphLabel;
     StringBuffer baseClassExtra;
     MetaInstance meta;
-    _ATOM        implementationClassName;
+    IIdAtom *        implementationClassName;
     ABoundActivity* table;
     bool         isMember;
     bool         instanceIsLocal;
@@ -273,8 +273,8 @@ public:
     virtual void setRow(BuildCtx & ctx, IReferenceSelector * rhs);
     virtual IReferenceSelector * select(BuildCtx & ctx, IHqlExpression * selectExpr);
 
-    virtual void buildDeserialize(BuildCtx & ctx, IHqlExpression * helper, _ATOM serializeForm);
-    virtual void buildSerialize(BuildCtx & ctx, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(BuildCtx & ctx, IHqlExpression * helper, IAtom * serializeForm);
+    virtual void buildSerialize(BuildCtx & ctx, IHqlExpression * helper, IAtom * serializeForm);
 
 private:
     DatasetSelector(DatasetSelector * _parent, BoundRow * _cursor, AColumnInfo * _column, IHqlExpression * _path);

+ 7 - 7
ecl/hqlcpp/hqlinline.cpp

@@ -353,7 +353,7 @@ static unsigned calcInlineFlags(BuildCtx * ctx, IHqlExpression * expr)
                 IHqlExpression * cur = expr->queryChild(i);
                 if (!cur->isAttribute())
                     return 0;
-                _ATOM name = cur->queryName();
+                IAtom * name = cur->queryName();
                 //possibly implement keep as well.  (Local on a child join does nothing.)
                 if ((name != leftouterAtom) && (name != leftonlyAtom) && (name != innerAtom) && (name != allAtom) && (name != localAtom) && !isInternalAttributeName(name))
                     return 0;
@@ -856,7 +856,7 @@ void ParentExtract::beginCreateExtract(BuildCtx & ctx, bool doDeclare)
     HqlExprArray args;
     args.append(*LINK(serialization->queryBound()));
     args.append(*serialization->getFinalFixedSizeExpr());
-    translator.callProcedure(*buildctx, ensureRowAvailableAtom, args);
+    translator.callProcedure(*buildctx, ensureRowAvailableId, args);
 
     //Collect a list of cursors together... NB these are in reverse order..
     gatherActiveRows(*buildctx);
@@ -923,7 +923,7 @@ void ParentExtract::beginChildActivity(BuildCtx & declareCtx, BuildCtx & startCt
                 {
                     HqlExprArray args;
                     args.append(*LINK(src));
-                    src.setown(translator.bindTranslatedFunctionCall(getBytesFromBuilderAtom, args));
+                    src.setown(translator.bindTranslatedFunctionCall(getBytesFromBuilderId, args));
                 }
             }
 
@@ -1148,7 +1148,7 @@ void ParentExtract::gatherActiveRows(BuildCtx & ctx)
     }
 
     //MORE: Should possibly create two sets of cursors one if children are colocal, other if children aren't
-    //so colocal cursors can be used whereever possible.  Would change following to localisation != GraphNonLocal
+    //so colocal cursors can be used wherever possible.  Would change following to localisation != GraphNonLocal
     //and remove else
     if (localisation == GraphCoLocal || localisation == GraphCoNonLocal)
     {
@@ -1511,7 +1511,7 @@ void ClassEvalContext::createMemberAlias(CtxCollection & ctxs, BuildCtx & ctx, I
     assertex(ctxs.evalctx != NULL);
     translator.expandAliases(*ctxs.evalctx, value);
 
-    const _ATOM serializeForm = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
+    IAtom * serializeForm = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
     CHqlBoundTarget tempTarget;
     if (translator.needToSerializeToSlave(value))
     {
@@ -1538,7 +1538,7 @@ void ClassEvalContext::doCallNestedHelpers(const char * member, const char * act
 }
 
 
-void ClassEvalContext::ensureSerialized(CtxCollection & ctxs, const CHqlBoundTarget & target, _ATOM serializeForm)
+void ClassEvalContext::ensureSerialized(CtxCollection & ctxs, const CHqlBoundTarget & target, IAtom * serializeForm)
 {
     if (ctxs.serializectx)
         translator.ensureSerialized(target, *ctxs.serializectx, *ctxs.deserializectx, "*in", "out", serializeForm);
@@ -1628,7 +1628,7 @@ AliasKind ClassEvalContext::evaluateExpression(BuildCtx & ctx, IHqlExpression *
 
 void ClassEvalContext::tempCompatiablityEnsureSerialized(const CHqlBoundTarget & tgt)
 {
-    const _ATOM serializeForm = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
+    IAtom * serializeForm = internalAtom; // The format of serialized expressions in memory must match the internal serialization format
     ensureSerialized(onCreate, tgt, serializeForm);
 }
 

+ 1 - 1
ecl/hqlcpp/hqlinline.hpp

@@ -160,7 +160,7 @@ protected:
     IHqlExpression * cloneExprInClass(CtxCollection & ctxs, IHqlExpression * expr);
     void createMemberAlias(CtxCollection & ctxs, BuildCtx & ctx, IHqlExpression * value, CHqlBoundExpr & tgt);
     void doCallNestedHelpers(const char * member, const char * acticity);
-    void ensureSerialized(CtxCollection & ctxs, const CHqlBoundTarget & tgt, _ATOM serializeForm);
+    void ensureSerialized(CtxCollection & ctxs, const CHqlBoundTarget & tgt, IAtom * serializeForm);
 
 protected:
     CtxCollection onCreate;

+ 6 - 6
ecl/hqlcpp/hqliproj.cpp

@@ -174,7 +174,7 @@ unsigned UsedFieldSet::getOriginalPosition(IHqlExpression * field) const
         return match;
     assertex(field->isDatarow());
     assertex(finalRecord);
-    OwnedHqlExpr originalField = finalRecord->querySimpleScope()->lookupSymbol(field->queryName());
+    OwnedHqlExpr originalField = finalRecord->querySimpleScope()->lookupSymbol(field->queryId());
     assertex(originalField && originalField != field);
     unsigned matchOriginal = fields.find(*originalField);
     assertex(matchOriginal != NotFound);
@@ -199,7 +199,7 @@ bool UsedFieldSet::contains(IHqlExpression & field) const
 #endif
 }
 
-bool UsedFieldSet::contains(_ATOM name) const
+bool UsedFieldSet::contains(IAtom * name) const
 {
     if (all)
         return true;
@@ -299,7 +299,7 @@ IHqlExpression * UsedFieldSet::createFilteredAssign(IHqlExpression * field, IHql
 
             if (createSubset)
             {
-                newField.setown(finalRecord->querySimpleScope()->lookupSymbol(field->queryName()));
+                newField.setown(finalRecord->querySimpleScope()->lookupSymbol(field->queryId()));
                 assertex(newField);
                 assertex(exception || newField != field);
 
@@ -445,7 +445,7 @@ void UsedFieldSet::calcFinalRecord(bool canPack, bool ignoreIfEmpty)
                 unwindChildren(args, &cur);
                 //MORE: Any default will now have the wrong type => remove it for the moment (ideally it would be projected)
                 removeProperty(args, defaultAtom);
-                OwnedHqlExpr newField = createField(cur.queryName(), makeRowType(newRecord->getType()), args);
+                OwnedHqlExpr newField = createField(cur.queryId(), makeRowType(newRecord->getType()), args);
                 recordFields.append(*newField.getClear());
             }
         }
@@ -1713,7 +1713,7 @@ void ImplicitProjectTransformer::gatherFieldsUsed(IHqlExpression * expr, Implici
 
     case no_attr_expr:
         {
-            _ATOM name = expr->queryName();
+            IAtom * name = expr->queryName();
             if (name != _selectors_Atom)
                 inheritActiveFields(expr, extra, 0, expr->numChildren());
         }
@@ -2652,7 +2652,7 @@ void ImplicitProjectTransformer::calculateFieldsUsed(IHqlExpression * expr)
 
 void ImplicitProjectTransformer::logChange(const char * message, IHqlExpression * expr, const UsedFieldSet & fields)
 {
-    _ATOM exprName = expr->queryName();
+    IAtom * exprName = expr->queryName();
     if (!exprName && isCompoundSource(expr))
         exprName = expr->queryChild(0)->queryName();
 

+ 1 - 1
ecl/hqlcpp/hqliproj.ipp

@@ -157,7 +157,7 @@ public:
 
 protected:
     bool contains(IHqlExpression & field) const;
-    bool contains(_ATOM name) const; // debugging only
+    bool contains(IAtom * name) const; // debugging only
     IHqlExpression * createFilteredAssign(IHqlExpression * field, IHqlExpression * value, IHqlExpression * newSelf, const UsedFieldSet * exceptions) const;
     void createFilteredAssigns(HqlExprArray & assigns, IHqlExpression * transform, IHqlExpression * newSelf, const UsedFieldSet * exceptions) const;
     IHqlExpression * createRowTransform(IHqlExpression * row, const UsedFieldSet * exceptions) const;

+ 13 - 13
ecl/hqlcpp/hqllib.cpp

@@ -73,8 +73,8 @@ void HqlCppLibrary::extractOutputs()
         IHqlExpression & cur = symbols.item(i);
         if (isExported(&cur))
         {
-            _ATOM name = cur.queryName();
-            OwnedHqlExpr value = scope->lookupSymbol(name, LSFpublic, dummyctx);
+            IIdAtom * id = cur.queryId();
+            OwnedHqlExpr value = scope->lookupSymbol(id, LSFpublic, dummyctx);
 
             if (value && !value->isFunction())
             {
@@ -141,7 +141,7 @@ unsigned HqlCppLibrary::getHash(const HqlExprArray & values, unsigned crc) const
 }
 
 
-unsigned HqlCppLibrary::queryOutputIndex(_ATOM name) const
+unsigned HqlCppLibrary::queryOutputIndex(IAtom * name) const
 {
     ForEachItemIn(i, outputs)
     {
@@ -196,9 +196,9 @@ public:
         if (oldModule == newModule)
             return LINK(expr);
 
-        _ATOM attrName = expr->queryChild(3)->queryName();
+        IIdAtom * id = expr->queryChild(3)->queryId();
         HqlDummyLookupContext dummyctx(NULL);
-        OwnedHqlExpr value = newModule->queryScope()->lookupSymbol(attrName, makeLookupFlags(true, expr->hasProperty(ignoreBaseAtom), false), dummyctx);
+        OwnedHqlExpr value = newModule->queryScope()->lookupSymbol(id, makeLookupFlags(true, expr->hasProperty(ignoreBaseAtom), false), dummyctx);
         assertex(value != NULL);
         IHqlExpression * oldAttr = expr->queryChild(2);
         if (oldAttr->isDataset() || oldAttr->isDatarow())
@@ -239,8 +239,8 @@ protected:
             IHqlExpression & cur = symbols.item(i);
             if (isExported(&cur))
             {
-                _ATOM name = cur.queryName();
-                OwnedHqlExpr oldSymbol = oldScope->lookupSymbol(name, LSFpublic, dummyctx);
+                IIdAtom * id = cur.queryId();
+                OwnedHqlExpr oldSymbol = oldScope->lookupSymbol(id, LSFpublic, dummyctx);
                 OwnedHqlExpr newValue;
                 ITypeInfo * type = oldSymbol->queryType();
                 if (oldSymbol->isDataset() || oldSymbol->isDatarow())
@@ -250,7 +250,7 @@ protected:
                 else
                 {
                     //Convert a scalar to a select from a dataset
-                    OwnedHqlExpr field = createField(unknownAtom, LINK(type), NULL, NULL);
+                    OwnedHqlExpr field = createField(unknownId, LINK(type), NULL, NULL);
                     OwnedHqlExpr newRecord = createRecord(field);
                     OwnedHqlExpr ds = createDataset(no_null, LINK(newRecord));
                     newValue.setown(createNullExpr(ds));
@@ -263,7 +263,7 @@ protected:
                     HqlExprArray parms;
                     unwindChildren(parms, oldSymbol, 1);
                     IHqlExpression * formals = createSortList(parms);
-                    newValue.setown(createFunctionDefinition(name, newValue.getClear(), formals, NULL, NULL));
+                    newValue.setown(createFunctionDefinition(id, newValue.getClear(), formals, NULL, NULL));
                 }
 
                 IHqlExpression * newSym = oldSymbol->cloneAllAnnotations(newValue);
@@ -410,7 +410,7 @@ static IHqlExpression * convertScalarToDataset(IHqlExpression * expr)
         break;
     }
 
-    OwnedHqlExpr field = createField(valueAtom, expr->getType(), NULL, NULL);
+    OwnedHqlExpr field = createField(valueId, expr->getType(), NULL, NULL);
     OwnedHqlExpr record = createRecord(field);
     OwnedHqlExpr assign = createAssign(createSelectExpr(createSelector(no_self, record, NULL), LINK(field)), LINK(expr));
     OwnedHqlExpr row = createRow(no_createrow, createValue(no_transform, makeTransformType(record->getType()), LINK(assign)));
@@ -433,7 +433,7 @@ void HqlCppLibraryImplementation::mapLogicalToImplementation(HqlExprArray & expr
     ForEachItemIn(i, outputs)
     {
         IHqlExpression & curOutput = outputs.item(i);
-        OwnedHqlExpr output = scope->lookupSymbol(curOutput.queryName(), LSFpublic, dummyctx);
+        OwnedHqlExpr output = scope->lookupSymbol(curOutput.queryId(), LSFpublic, dummyctx);
 
         // Do a global replace of input(n) with no_getgraphresult(n), and no_param with no_
         if (!output->isDatarow() && !output->isDataset())
@@ -450,7 +450,7 @@ void HqlCppLibraryImplementation::mapLogicalToImplementation(HqlExprArray & expr
 
 //---------------------------------------------------------------------------
 
-void ThorBoundLibraryActivity::noteOutputUsed(_ATOM name)
+void ThorBoundLibraryActivity::noteOutputUsed(IAtom * name)
 {
     unsigned matchIndex = libraryInstance->library->queryOutputIndex(name);
     assertex(matchIndex != NotFound);
@@ -585,7 +585,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityLibraryInstance(BuildCtx & ctx
     ForEachItemIn(iout, library->outputs)
     {
         IHqlExpression & cur = library->outputs.item(iout);
-        OwnedHqlExpr dataset = moduleScope->lookupSymbol(cur.queryName(), LSFpublic, dummyCtx);
+        OwnedHqlExpr dataset = moduleScope->lookupSymbol(cur.queryId(), LSFpublic, dummyCtx);
         assertex(dataset && dataset->queryRecord());
         MetaInstance meta(*this, dataset->queryRecord(), isGrouped(dataset));
         buildMetaInfo(meta);

+ 2 - 2
ecl/hqlcpp/hqllib.ipp

@@ -28,7 +28,7 @@ public:
     unsigned numStreamedInputs() const  { return streamedCount; }
     unsigned totalInputs() const        { return inputMapper.numParameters(); }
     unsigned getInterfaceHash() const;
-    unsigned queryOutputIndex(_ATOM name) const;
+    unsigned queryOutputIndex(IAtom * name) const;
     IHqlExpression * queryParameter(unsigned i) { return &inputMapper.queryRealParameters().item(i); }
 
 protected:
@@ -91,7 +91,7 @@ public:
         libraryInstance.set(_libraryInstance);
     }
 
-    void noteOutputUsed(_ATOM name);
+    void noteOutputUsed(IAtom * name);
 
 public:
     Linked<IPropertyTree> graphNode;

+ 20 - 20
ecl/hqlcpp/hqlnlp.cpp

@@ -114,7 +114,7 @@ void MatchReference::getPath(StringBuffer & path)
     {
         if (idx)
             path.append(".");
-        path.append(queryPatternName(&names.item(idx)));
+        path.append(queryPatternName(&names.item(idx))->lower());
     }
 }
 
@@ -123,10 +123,10 @@ StringBuffer & MatchReference::getDebugText(StringBuffer & out, RegexIdAllocator
     ForEachItemIn(i1, names)
     {
         IHqlExpression & curName = names.item(i1);
-        _ATOM name = queryPatternName(&curName);
+        IAtom * name = queryPatternName(&curName)->lower();
         if (i1)
             out.append("/");
-        out.append(name);
+        out.append(name->str());
         out.append("{").append(idAllocator.queryID(curName.queryChild(0), name)).append("}");
         unsigned inst = (unsigned)indices.item(i1).queryValue()->getIntValue();
         if (inst != UNKNOWN_INSTANCE)
@@ -140,7 +140,7 @@ void MatchReference::compileMatched(RegexIdAllocator & idAllocator, UnsignedArra
     ForEachItemIn(idx, names)
     {
         IHqlExpression & curName = names.item(idx);
-        ids.append(idAllocator.queryID(curName.queryChild(0), queryPatternName(&curName)));
+        ids.append(idAllocator.queryID(curName.queryChild(0), queryPatternName(&curName)->lower()));
         indexValues.append((unsigned)indices.item(idx).queryValue()->getIntValue());
     }
 }
@@ -362,7 +362,7 @@ void NlpParseContext::extractMatchedSymbols(IHqlExpression * expr)
     }
 }
 
-bool NlpParseContext::isMatched(IHqlExpression * expr, _ATOM name)
+bool NlpParseContext::isMatched(IHqlExpression * expr, IAtom * name)
 {
     if (allMatched)
         return true;
@@ -846,15 +846,15 @@ void HqlCppTranslator::doBuildMatched(BuildCtx & ctx, const CHqlBoundTarget * ta
     }
 
     unsigned matchedIndex = nlpParse->addMatchReference(patternExpr);
-    _ATOM func;
+    IIdAtom * func;
     switch (expr->getOperator())
     {
-    case no_matched:        func = getMatchedAtom; break;
-    case no_matchtext:      func = getMatchTextAtom; break;
-    case no_matchunicode:   func = getMatchUnicodeAtom; break;
-    case no_matchlength:    func = getMatchLengthAtom; break;
-    case no_matchposition:  func = getMatchPositionAtom; break;
-    case no_matchutf8:      func = getMatchUtf8Atom; break;
+    case no_matched:        func = getMatchedId; break;
+    case no_matchtext:      func = getMatchTextId; break;
+    case no_matchunicode:   func = getMatchUnicodeId; break;
+    case no_matchlength:    func = getMatchLengthId; break;
+    case no_matchposition:  func = getMatchPositionId; break;
+    case no_matchutf8:      func = getMatchUtf8Id; break;
     default: UNIMPLEMENTED;
     }
 
@@ -879,7 +879,7 @@ IReferenceSelector * HqlCppTranslator::doBuildRowMatchRow(BuildCtx & ctx, IHqlEx
     HqlExprArray args;
     args.append(*createQuoted("matched", makeVoidType()));
     args.append(*createConstant((__int64)matchedIndex));
-    OwnedHqlExpr call = bindTranslatedFunctionCall(getMatchRowAtom, args);
+    OwnedHqlExpr call = bindTranslatedFunctionCall(getMatchRowId, args);
 
     IHqlExpression * record = expr->queryRecord();
     StringBuffer rowName;
@@ -922,17 +922,17 @@ void HqlCppTranslator::doBuildMatchAttr(BuildCtx & ctx, const CHqlBoundTarget *
         args.append(*LINK(marker->queryExpr()));
         args.append(*LINK(expr->queryChild(0)));
 
-        _ATOM name;
+        IIdAtom * name;
         switch (exprType->getTypeCode())
         {
         case type_string:
-            name = getProductionTextAtom;
+            name = getProductionTextId;
             break;
         case type_unicode:
-            name = getProductionUnicodeAtom;
+            name = getProductionUnicodeId;
             break;
         case type_utf8:
-            name = getProductionUtf8Atom;
+            name = getProductionUtf8Id;
             break;
         default:
             throwUnexpectedType(exprType);
@@ -968,17 +968,17 @@ IReferenceSelector * HqlCppTranslator::doBuildRowMatchAttr(BuildCtx & ctx, IHqlE
         throwError(HQLERR_AccessMatchAttrInChildQuery);
 
     HqlExprArray args;
-    _ATOM name;
+    IIdAtom * name;
     HqlExprAssociation * marker = ctx.queryMatchExpr(activeProductionMarkerExpr);
     if (marker)
     {
-        name = getProductionResultAtom;
+        name = getProductionResultId;
         args.append(*LINK(marker->queryExpr()));
         args.append(*LINK(expr->queryChild(1)));
     }
     else
     {
-        name = getRootResultAtom;
+        name = getRootResultId;
         args.append(*createQuoted("matched", makeVoidType()));
     }
 

+ 4 - 4
ecl/hqlcpp/hqlnlp.ipp

@@ -32,11 +32,11 @@ class RegexIdAllocator
 public:
     RegexIdAllocator() { nextId = 0; }
 
-    regexid_t queryID(IHqlExpression * expr, _ATOM name);
-    void setID(IHqlExpression * expr, _ATOM name, regexid_t id);
+    regexid_t queryID(IHqlExpression * expr, IAtom * name);
+    void setID(IHqlExpression * expr, IAtom * name, regexid_t id);
 
 protected:
-    IHqlExpression * createKey(IHqlExpression * expr, _ATOM name);
+    IHqlExpression * createKey(IHqlExpression * expr, IAtom * name);
 
 protected:
     unsigned nextId;
@@ -111,7 +111,7 @@ public:
     void buildProductions(HqlCppTranslator & translator, BuildCtx & classctx, BuildCtx & startctx);
     void buildValidators(HqlCppTranslator & translator, BuildCtx & classctx);
     void extractValidates(IHqlExpression * expr);
-    bool isMatched(IHqlExpression * expr, _ATOM name);
+    bool isMatched(IHqlExpression * expr, IAtom * name);
 
     virtual void compileSearchPattern() = 0;
     virtual void getDebugText(StringBuffer & s, unsigned detail) = 0;

+ 8 - 8
ecl/hqlcpp/hqlregex.cpp

@@ -162,23 +162,23 @@ inline unsigned limitedMult(unsigned a, unsigned b)
     return a*b;
 }
 
-IHqlExpression * RegexIdAllocator::createKey(IHqlExpression * expr, _ATOM name)
+IHqlExpression * RegexIdAllocator::createKey(IHqlExpression * expr, IAtom * name)
 {
     if (!expr)
         return NULL;
     IHqlExpression * body = expr->queryBody();
     if (name)
-        return createSymbol(name, LINK(body), ob_private);
+        return createSymbol(createIdAtom(name->str()), LINK(body), ob_private);
     return LINK(body);
 }
 
-void RegexIdAllocator::setID(IHqlExpression * expr, _ATOM name, unsigned value)
+void RegexIdAllocator::setID(IHqlExpression * expr, IAtom * name, unsigned value)
 {
     OwnedHqlExpr key = createKey(expr, name);
     map.setValue(key, value);
 }
 
-regexid_t RegexIdAllocator::queryID(IHqlExpression * expr, _ATOM name)
+regexid_t RegexIdAllocator::queryID(IHqlExpression * expr, IAtom * name)
 {
     OwnedHqlExpr key = createKey(expr, name);
     regexid_t * match = map.getValue(key);
@@ -260,7 +260,7 @@ protected:
 
 //---------------------------------------------------------------------------
 
-HqlNamedRegex::HqlNamedRegex(IHqlExpression * _expr, _ATOM _name, IHqlExpression * _searchExpr, node_operator _kind, bool _caseSensitive, bool _isMatched)
+HqlNamedRegex::HqlNamedRegex(IHqlExpression * _expr, IAtom * _name, IHqlExpression * _searchExpr, node_operator _kind, bool _caseSensitive, bool _isMatched)
 { 
     kind = _kind;
     expr.set(_expr); 
@@ -2337,7 +2337,7 @@ RegexContext::~RegexContext()
         named.item(idx).cleanup();
 }
 
-HqlNamedRegex * RegexContext::queryNamed(IHqlExpression * defn, _ATOM name, node_operator op, bool caseSensitive)
+HqlNamedRegex * RegexContext::queryNamed(IHqlExpression * defn, IAtom * name, node_operator op, bool caseSensitive)
 {
     ForEachItemIn(idx, named)
     {
@@ -2352,7 +2352,7 @@ HqlNamedRegex * RegexContext::queryNamed(IHqlExpression * defn, _ATOM name, node
 }
 
 
-HqlNamedRegex * RegexContext::createNamed(IHqlExpression * expr, _ATOM name, node_operator op, bool caseSensitive)
+HqlNamedRegex * RegexContext::createNamed(IHqlExpression * expr, IAtom * name, node_operator op, bool caseSensitive)
 {
     LinkedHqlExpr searchExpr = expr;
     if (op != no_pat_instance)
@@ -2531,7 +2531,7 @@ void RegexContext::buildStructure()
     unsigned startTime = msTick();
     IHqlExpression * grammar = expr->queryChild(2);
     assertex(grammar->getOperator() == no_pat_instance);
-    _ATOM name = grammar->queryChild(1)->queryName();
+    IAtom * name = grammar->queryChild(1)->queryName();
     OwnedHqlExpr structure = LINK(grammar);//createValue(no_pat_instance, makeRuleType(NULL), LINK(grammar), LINK(grammar->queryChild(1)));
 
     HqlRegexExpr * rootRegex = createStructure(structure, isCaseSensitive());

+ 7 - 7
ecl/hqlcpp/hqlregex.ipp

@@ -32,7 +32,7 @@ class HqlNamedRegex : public CInterface
 {
     friend class HqlRegexExpr;
 public:
-    HqlNamedRegex(IHqlExpression * _expr, _ATOM _name, IHqlExpression * _searchExpr, node_operator _kind, bool _caseSensitive, bool _isMatched);
+    HqlNamedRegex(IHqlExpression * _expr, IAtom * _name, IHqlExpression * _searchExpr, node_operator _kind, bool _caseSensitive, bool _isMatched);
     ~HqlNamedRegex();
 
     void addBeginEnd(const ParseInformation & options);
@@ -50,8 +50,8 @@ public:
     RegexPattern * queryRootPattern();
     void insertSeparators(IHqlExpression * separator, RegexContext * ctx);
     void markDFAs(unsigned complexity);
-    bool matches(IHqlExpression * _def, _ATOM _name, bool _caseSensitive)                   { return searchExpr == _def && name == _name && caseSensitive == _caseSensitive; }
-    bool matches(IHqlExpression * _def, _ATOM _name, node_operator _op, bool _caseSensitive)    { return searchExpr == _def && name == _name && kind == _op && caseSensitive == _caseSensitive; }
+    bool matches(IHqlExpression * _def, IAtom * _name, bool _caseSensitive)                   { return searchExpr == _def && name == _name && caseSensitive == _caseSensitive; }
+    bool matches(IHqlExpression * _def, IAtom * _name, node_operator _op, bool _caseSensitive)    { return searchExpr == _def && name == _name && kind == _op && caseSensitive == _caseSensitive; }
     bool matchesDefine(IHqlExpression * name, bool _caseSensitive);
     void mergeCreateSets();
     bool queryExpandInline();
@@ -69,9 +69,9 @@ public:
 
 protected:
     unsigned numUses;
-    _ATOM name;
+    IAtom * name;
     LengthLimit limit;
-    _ATOM cachedModule;
+    IAtom * cachedModule;
     node_operator kind;
     OwnedHqlExpr searchExpr;
     OwnedHqlExpr expr;
@@ -331,8 +331,8 @@ protected:
     void insertSeparators();
     void optimizePattern();
     void optimizeSpotDFA();
-    HqlNamedRegex * queryNamed(IHqlExpression * defn, _ATOM name, node_operator op, bool caseSensitive);
-    HqlNamedRegex * createNamed(IHqlExpression * expr, _ATOM name, node_operator op, bool caseSensitive);
+    HqlNamedRegex * queryNamed(IHqlExpression * defn, IAtom * name, node_operator op, bool caseSensitive);
+    HqlNamedRegex * createNamed(IHqlExpression * expr, IAtom * name, node_operator op, bool caseSensitive);
 
 protected:
     CIArrayOf<HqlNamedRegex> named;

+ 6 - 6
ecl/hqlcpp/hqlresource.cpp

@@ -655,8 +655,8 @@ bool ResourceGraphInfo::addCondition(IHqlExpression * condition)
         conditions.append(*LINK(condition));
 
 #ifdef SPOT_UNCONDITIONAL_CONDITIONS
-        _ATOM name = condition->queryName();
-        _ATOM invName = NULL;
+        IAtom * name = condition->queryName();
+        IAtom * invName = NULL;
         if (name == trueAtom)
             invName = falseAtom;
         else if (name == falseAtom)
@@ -965,7 +965,7 @@ void ResourceGraphInfo::removeResources(const CResources & value)
 
 //---------------------------------------------------------------------------
 
-static void appendCloneProperty(HqlExprArray & args, IHqlExpression * expr, _ATOM name)
+static void appendCloneProperty(HqlExprArray & args, IHqlExpression * expr, IAtom * name)
 {
     IHqlExpression * prop = expr->queryProperty(name);
     if (prop)
@@ -2024,7 +2024,7 @@ public:
                 if (selected->getOperator() == no_select)
                     field.set(selected->queryChild(1));
                 else
-                    field.setown(createField(valueAtom, selected->getType(), NULL));
+                    field.setown(createField(valueId, selected->getType(), NULL));
                 OwnedHqlExpr record = createRecord(field);
                 OwnedHqlExpr self = getSelf(record);
                 OwnedHqlExpr assign = createAssign(createSelectExpr(LINK(self), LINK(field)), LINK(selected));
@@ -2034,7 +2034,7 @@ public:
 
             if (!hoisted)
             {
-                OwnedHqlExpr field = createField(valueAtom, value->getType(), NULL);
+                OwnedHqlExpr field = createField(valueId, value->getType(), NULL);
                 OwnedHqlExpr record = createRecord(field);
                 OwnedHqlExpr self = getSelf(record);
                 OwnedHqlExpr assign = createAssign(createSelectExpr(LINK(self), LINK(field)), LINK(value));
@@ -3452,7 +3452,7 @@ void EclResourcer::addDependencyUse(IHqlExpression * search, ResourceGraphInfo *
             //Don't give a warning if get/set is within the same activity (e.g., within a local())
             if (&dependencySource.exprs.item(index) != expr)
             //errors->reportWarning(HQLWRN_RecursiveDependendencies, HQLWRN_RecursiveDependendencies_Text, *codeGeneratorAtom, 0, 0, 0);
-                errors->reportError(HQLWRN_RecursiveDependendencies, HQLWRN_RecursiveDependendencies_Text, *codeGeneratorAtom, 0, 0, 0);
+                errors->reportError(HQLWRN_RecursiveDependendencies, HQLWRN_RecursiveDependendencies_Text, codeGeneratorId->str(), 0, 0, 0);
         }
         else
         {

+ 43 - 43
ecl/hqlcpp/hqlsource.cpp

@@ -226,7 +226,7 @@ IHqlExpression * getFileLogicalName(IHqlExpression * dataset)
 
 IHqlExpression * getVirtualReplacement(IHqlExpression * field, IHqlExpression * virtualDef, IHqlExpression * dataset)
 {
-    _ATOM virtualKind = virtualDef->queryName();
+    IAtom * virtualKind = virtualDef->queryName();
 
     if (virtualKind == filepositionAtom)
         return getFilepos(dataset, false);
@@ -267,7 +267,7 @@ static IHqlExpression * getExplicitlyPromotedCompare(IHqlExpression * filter)
 }
 
 
-static IHqlExpression * createFileposCall(HqlCppTranslator & translator, _ATOM name, const char * provider, const char * rowname)
+static IHqlExpression * createFileposCall(HqlCppTranslator & translator, IIdAtom * name, const char * provider, const char * rowname)
 {
     HqlExprArray args;
     args.append(*createVariable(provider, makeBoolType()));
@@ -474,7 +474,7 @@ static IHqlExpression * createPhysicalIndexRecord(HqlMapTransformer & mapper, IH
             physicalFields.append(*createPhysicalIndexRecord(mapper, tableExpr, cur, false, allowTranslate));
         else if (cur->hasProperty(blobAtom))
         {
-            newField = createField(cur->queryName(), makeIntType(8, false), NULL, NULL);
+            newField = createField(cur->queryId(), makeIntType(8, false), NULL, NULL);
         }
         else
         {
@@ -488,7 +488,7 @@ static IHqlExpression * createPhysicalIndexRecord(HqlMapTransformer & mapper, IH
                 OwnedHqlExpr newRecord = createPhysicalIndexRecord(childMapper, select, cur->queryRecord(), false, allowTranslate);
                 HqlExprArray args;
                 unwindChildren(args, cur);
-                newField = createField(cur->queryName(), newRecord->getType(), args);
+                newField = createField(cur->queryId(), newRecord->getType(), args);
             }
             else
             {
@@ -505,7 +505,7 @@ static IHqlExpression * createPhysicalIndexRecord(HqlMapTransformer & mapper, IH
                     if (hozed->queryType() == select->queryType())
                         newField = LINK(cur);
                     else
-                        newField = createField(cur->queryName(), hozed->getType(), extractFieldAttrs(cur));
+                        newField = createField(cur->queryId(), hozed->getType(), extractFieldAttrs(cur));
                 }
             }
         }
@@ -1073,19 +1073,19 @@ void SourceBuilder::associateFilePositions(BuildCtx & ctx, const char * provider
 {
     if (fpos)
     {
-        Owned<IHqlExpression> fposExpr = createFileposCall(translator, getFilePositionAtom, provider, rowname);
+        Owned<IHqlExpression> fposExpr = createFileposCall(translator, getFilePositionId, provider, rowname);
         ctx.associateExpr(fpos, fposExpr);
     }
 
     if (lfpos)
     {
-        Owned<IHqlExpression> fposExpr = createFileposCall(translator, getLocalFilePositionAtom, provider, rowname);
+        Owned<IHqlExpression> fposExpr = createFileposCall(translator, getLocalFilePositionId, provider, rowname);
         ctx.associateExpr(lfpos, fposExpr);
     }
 
     if (logicalFilenameMarker)
     {
-        Owned<IHqlExpression> nameExpr = createFileposCall(translator, queryLogicalFilenameAtom, provider, rowname);
+        Owned<IHqlExpression> nameExpr = createFileposCall(translator, queryLogicalFilenameId, provider, rowname);
         ctx.associateOwn(*new HqlFilePositionDefinedValue(*this, logicalFilenameMarker, nameExpr));
     }
 }
@@ -1784,7 +1784,7 @@ ABoundActivity * SourceBuilder::buildActivity(BuildCtx & ctx, IHqlExpression * e
 
     Owned<ActivityInstance> localInstance = new ActivityInstance(translator, ctx, activityKind, expr, kind);
     if (useImplementationClass)
-        localInstance->setImplementationClass(newMemorySpillReadArgAtom);
+        localInstance->setImplementationClass(newMemorySpillReadArgId);
 
     if ((activityKind >= TAKdiskread) && (activityKind <= TAKdiskgroupaggregate))
     {
@@ -2465,7 +2465,7 @@ void SourceBuilder::buildGroupAggregateTransformBody(BuildCtx & transformCtx, IH
         OwnedHqlExpr castBound = createValue(no_typetransfer, LINK(rowType), LINK(rowAddr));
         args.append(*createTranslated(castBound));
     }
-    OwnedHqlExpr call = translator.bindFunctionCall(addAggregateRowAtom, args);
+    OwnedHqlExpr call = translator.bindFunctionCall(addAggregateRowId, args);
     translator.buildStmt(transformCtx, call);
 }
 
@@ -3615,7 +3615,7 @@ void MonitorExtractor::callAddAll(BuildCtx & ctx, IHqlExpression * targetVar)
 {
     HqlExprArray args;
     args.append(*LINK(targetVar));
-    translator.callProcedure(ctx, addAllAtom, args);
+    translator.callProcedure(ctx, addAllId, args);
 }
 
 static IHqlExpression * createExpandedRecord(IHqlExpression * expr);
@@ -3778,7 +3778,7 @@ static void createExpanded(HqlExprArray & fields, IHqlExpression * expr)
                     unwindChildren(attrs, expr);
                     //MORE: Any default will now have the wrong type => remove it for the moment (ideally it would be projected)
                     removeProperty(attrs, defaultAtom);
-                    fields.append(*createField(expr->queryName(), LINK(expandedType), attrs));
+                    fields.append(*createField(expr->queryId(), LINK(expandedType), attrs));
                 }
             }
             break;
@@ -3885,7 +3885,7 @@ void MonitorExtractor::expandSelects(IHqlExpression * expr, IHqlSimpleScope * ex
         break;
     case no_field:
         {
-            OwnedHqlExpr match = expandedScope->lookupSymbol(expr->queryName());
+            OwnedHqlExpr match = expandedScope->lookupSymbol(expr->queryId());
             if (match)
             {
                 OwnedHqlExpr keySelected = createSelectExpr(LINK(keySelector), LINK(expr));
@@ -3939,11 +3939,11 @@ void MonitorExtractor::buildKeySegmentInExpr(BuildMonitorState & buildState, Key
     IHqlExpression * lhs = thisKey.queryChild(0);
     OwnedHqlExpr values = normalizeListCasts(thisKey.queryChild(1));
 
-    _ATOM func = addRangeAtom;
+    IIdAtom * func = addRangeId;
     if (thisKey.getOperator() == no_notin)
     {
         callAddAll(ctx, targetVar);
-        func = killRangeAtom;
+        func = killRangeId;
     }
 
     if (values->getOperator() != no_list)
@@ -4102,7 +4102,7 @@ void MonitorExtractor::buildKeySegmentCompareExpr(BuildMonitorState & buildState
             translator.buildFilter(subctx, compare);
         args.append(*LINK(address));
         args.append(*LINK(address));
-        translator.callProcedure(subctx, addRangeAtom, args);
+        translator.callProcedure(subctx, addRangeId, args);
         break;
     case no_ne:
         subctx.addQuoted(StringBuffer().appendf("%s->addAll();", targetSet));
@@ -4110,12 +4110,12 @@ void MonitorExtractor::buildKeySegmentCompareExpr(BuildMonitorState & buildState
             translator.buildFilter(subctx, compare);
         args.append(*LINK(address));
         args.append(*LINK(address));
-        translator.callProcedure(subctx, killRangeAtom, args);
+        translator.callProcedure(subctx, killRangeId, args);
         break;
     case no_le:
         args.append(*createValue(no_nullptr, makeVoidType()));
         args.append(*LINK(address));
-        translator.callProcedure(subctx, addRangeAtom, args);
+        translator.callProcedure(subctx, addRangeId, args);
         break;
     case no_lt:
         // e) no_lt.  If isExact add < value else add <= value
@@ -4126,14 +4126,14 @@ void MonitorExtractor::buildKeySegmentCompareExpr(BuildMonitorState & buildState
             //common this up...
             args.append(*createValue(no_nullptr, makeVoidType()));
             args.append(*LINK(address));
-            translator.callProcedure(subctx, addRangeAtom, args);
+            translator.callProcedure(subctx, addRangeId, args);
             subctx.selectElse(cond);
             args.append(*LINK(targetVar));
         }
         subctx.addQuoted(StringBuffer().appendf("%s->addAll();", targetSet));
         args.append(*LINK(address));
         args.append(*createValue(no_nullptr, makeVoidType()));
-        translator.callProcedure(subctx, killRangeAtom, args);
+        translator.callProcedure(subctx, killRangeId, args);
         break;
     case no_ge:
         // d) no_ge.  If isExact add >= value else add > value
@@ -4145,19 +4145,19 @@ void MonitorExtractor::buildKeySegmentCompareExpr(BuildMonitorState & buildState
             subctx.addQuoted(StringBuffer().appendf("%s->addAll();", targetSet));
             args.append(*createValue(no_nullptr, makeVoidType()));
             args.append(*LINK(address));
-            translator.callProcedure(subctx, killRangeAtom, args);
+            translator.callProcedure(subctx, killRangeId, args);
             subctx.selectElse(cond);
             args.append(*LINK(targetVar));
         }
         args.append(*LINK(address));
         args.append(*createValue(no_nullptr, makeVoidType()));
-        translator.callProcedure(subctx, addRangeAtom, args);
+        translator.callProcedure(subctx, addRangeId, args);
         break;
     case no_gt:
         subctx.addQuoted(StringBuffer().appendf("%s->addAll();", targetSet));
         args.append(*createValue(no_nullptr, makeVoidType()));
         args.append(*LINK(address));
-        translator.callProcedure(subctx, killRangeAtom, args);
+        translator.callProcedure(subctx, killRangeId, args);
         break;
     case no_between:
     case no_notbetween:
@@ -4170,18 +4170,18 @@ void MonitorExtractor::buildKeySegmentCompareExpr(BuildMonitorState & buildState
             OwnedHqlExpr adjustedUpper = invertTransforms(thisKey.queryChild(0), thisKey.queryChild(2));
             OwnedHqlExpr foldedUpper = foldHqlExpression(adjustedUpper);
             OwnedHqlExpr hozedValue = getHozedKeyValue(foldedUpper);
-            _ATOM name = hozedValue->queryName();
-            if ((name != createRangeHighAtom) && (name != createQStrRangeHighAtom))
+            IIdAtom * name = hozedValue->queryId();
+            if ((name != createRangeHighId) && (name != createQStrRangeHighId))
                 hozedValue.setown(ensureExprType(hozedValue, selectorInfo.expandedSelector->queryType()));
             translator.buildExpr(subctx, hozedValue, rhs2);
             translator.ensureHasAddress(subctx, rhs2);
             args.append(*getPointer(rhs2.expr));
             if (op == no_between)
-                translator.callProcedure(subctx, addRangeAtom, args);
+                translator.callProcedure(subctx, addRangeId, args);
             else
             {
                 subctx.addQuoted(StringBuffer().appendf("%s->addAll();", targetSet));
-                translator.callProcedure(subctx, killRangeAtom, args);
+                translator.callProcedure(subctx, killRangeId, args);
             }
             break;
         }
@@ -4381,7 +4381,7 @@ IHqlExpression * MonitorExtractor::getMonitorValueAddress(BuildCtx & ctx, IHqlEx
             args.append(*getPointer(tempTarget.expr));
             args.append(*getZero());
             args.append(*getSizetConstant(type->getSize()));
-            OwnedHqlExpr call = translator.bindTranslatedFunctionCall(memsetAtom, args);
+            OwnedHqlExpr call = translator.bindTranslatedFunctionCall(memsetId, args);
             ctx.addExpr(call);
             //then assign over the top
             translator.buildExprAssign(ctx, tempTarget, value);
@@ -4704,7 +4704,7 @@ void MonitorExtractor::buildArbitaryKeySegment(BuildMonitorState & buildState, B
     node_operator op = condition->getOperator();
 
     StringBuffer createMonitorText;
-    OwnedHqlExpr field = createField(unknownAtom, getExpandedFieldType(left->queryType(), NULL), NULL);
+    OwnedHqlExpr field = createField(unknownId, getExpandedFieldType(left->queryType(), NULL), NULL);
     OwnedHqlExpr pseudoSelector = createSelectExpr(getActiveTableSelector(), LINK(field));
 
     KeySelectorInfo selectorInfo(KeyedExtend, left, pseudoSelector, buildState.curOffset, curSize, false, true);
@@ -5193,25 +5193,25 @@ IHqlExpression * MonitorExtractor::getRangeLimit(ITypeInfo * fieldType, IHqlExpr
         return getCompareValue(fieldType, subStringLen, constValue, whichBoundary);
     }
 
-    _ATOM func;
+    IIdAtom * func;
     if (whichBoundary < 0)
     {
         switch (ftc)
         {
         case type_qstring:
-            func = createQStrRangeLowAtom;
+            func = createQStrRangeLowId;
             break;
         case type_string:
-            func = createStrRangeLowAtom;
+            func = createStrRangeLowId;
             break;
         case type_data:
-            func = createDataRangeLowAtom;
+            func = createDataRangeLowId;
             break;
         case type_unicode:
-            func = createUnicodeRangeLowAtom;
+            func = createUnicodeRangeLowId;
             break;
         default:
-            func = createRangeLowAtom;
+            func = createRangeLowId;
             break;
         }
     }
@@ -5220,19 +5220,19 @@ IHqlExpression * MonitorExtractor::getRangeLimit(ITypeInfo * fieldType, IHqlExpr
         switch (ftc)
         {
         case type_qstring:
-            func = createQStrRangeHighAtom;
+            func = createQStrRangeHighId;
             break;
         case type_string:
-            func = createStrRangeHighAtom;
+            func = createStrRangeHighId;
             break;
         case type_data:
-            func = createDataRangeHighAtom;
+            func = createDataRangeHighId;
             break;
         case type_unicode:
-            func = createUnicodeRangeHighAtom;
+            func = createUnicodeRangeHighId;
             break;
         default:
-            func = createRangeHighAtom;
+            func = createRangeHighId;
             break;
         }
     }
@@ -6025,7 +6025,7 @@ bool expandFilename(StringBuffer & s, IHqlExpression * expr)
 
 const char * MonitorExtractor::queryKeyName(StringBuffer & s)
 {
-    _ATOM name = tableExpr->queryName();
+    IAtom * name = tableExpr->queryName();
     if (name)
         s.append(" \'").append(name).append("'");
     else
@@ -6808,8 +6808,8 @@ void associateVirtualCallbacks(HqlCppTranslator & translator, BuildCtx & ctx, IH
 {
     OwnedHqlExpr fpos = getFilepos(dataset, false);
     OwnedHqlExpr lfpos = getFilepos(dataset, true);
-    Owned<IHqlExpression> fposExpr = createFileposCall(translator, getFilePositionAtom, "fpp", "crSelf.row()");
-    Owned<IHqlExpression> lfposExpr = createFileposCall(translator, getLocalFilePositionAtom, "fpp", "crSelf.row()");
+    Owned<IHqlExpression> fposExpr = createFileposCall(translator, getFilePositionId, "fpp", "crSelf.row()");
+    Owned<IHqlExpression> lfposExpr = createFileposCall(translator, getLocalFilePositionId, "fpp", "crSelf.row()");
     ctx.associateExpr(fpos, fposExpr);
     ctx.associateExpr(lfpos, lfposExpr);
 }

+ 39 - 39
ecl/hqlcpp/hqlstmt.cpp

@@ -58,7 +58,7 @@ void HqlExprAssociation::getBound(CHqlBoundExpr & result)
     
 //---------------------------------------------------------------------------
 
-BuildCtx::BuildCtx(HqlCppInstance & _state, _ATOM section) : state(_state)
+BuildCtx::BuildCtx(HqlCppInstance & _state, IAtom * section) : state(_state)
 {
     init(state.ensureSection(section));
 }
@@ -87,7 +87,7 @@ BuildCtx::~BuildCtx()
 {
 }
 
-void BuildCtx::set(_ATOM section)
+void BuildCtx::set(IAtom * section)
 {
     init(state.ensureSection(section));
 }
@@ -1306,7 +1306,7 @@ public:
     bool queryCombine(const SpecialFunction & next, bool memsetOnly, size32_t combineStringLimit);
 
 private:
-    _ATOM name;
+    IIdAtom * name;
     HqlExprAttr src;
     HqlExprAttr tgt;
     HqlExprAttr srcLen;
@@ -1336,12 +1336,12 @@ bool isAwkwardIntSize(IHqlExpression * size)
 
 bool SpecialFunction::canOptimize() const
 {
-    if ((name == memcpyAtom) && (queryMemsetChar(src) >= 0))
+    if ((name == memcpyId) && (queryMemsetChar(src) >= 0))
     {
         if ((getIntValue(srcLen, 0) > 1) || !wasAssign)
             return true;
     }
-    if ((name == memcpyAtom) && isAwkwardIntSize(srcLen))
+    if ((name == memcpyId) && isAwkwardIntSize(srcLen))
         return true;
 
     return false;
@@ -1351,15 +1351,15 @@ HqlStmt * SpecialFunction::createStmt(HqlStmts & curStmts, HqlCppTranslator & tr
 {
     HqlExprArray args;
 
-    _ATOM func = name;
-    if (name == memsetAtom)
+    IIdAtom * func = name;
+    if (name == memsetId)
     {
-        func = memsetAtom;
+        func = memsetId;
         args.append(*LINK(tgt));
         args.append(*LINK(src));
         args.append(*LINK(srcLen));
     }
-    else if (name == memcpyAtom)
+    else if (name == memcpyId)
     {
         int clearByte = queryMemsetChar(src);
         size32_t size = (size32_t)getIntValue(srcLen, 0);
@@ -1387,7 +1387,7 @@ HqlStmt * SpecialFunction::createStmt(HqlStmts & curStmts, HqlCppTranslator & tr
         //MORE: assignment of 1,2,4 bytes possibly better as an assign?
         if (clearByte >= 0)
         {
-            func = memsetAtom;
+            func = memsetId;
             args.append(*LINK(tgt));
             args.append(*createConstant(createIntValue(clearByte, sizeof(int), true)));
             args.append(*LINK(srcLen));
@@ -1399,20 +1399,20 @@ HqlStmt * SpecialFunction::createStmt(HqlStmts & curStmts, HqlCppTranslator & tr
             args.append(*LINK(srcLen));
         }
     }
-    else if (name == deserializerReadNAtom || name == serializerPutAtom)
+    else if (name == deserializerReadNId || name == serializerPutId)
     {
         args.append(*LINK(src));
         args.append(*LINK(tgtLen));
         args.append(*LINK(tgt));
     }
-    else if ((name == ebcdic2asciiAtom) || (name == ascii2ebcdicAtom))
+    else if ((name == ebcdic2asciiId) || (name == ascii2ebcdicId))
     {
         args.append(*LINK(tgtLen));
         args.append(*LINK(tgt));
         args.append(*LINK(srcLen));
         args.append(*LINK(src));
     }
-    else if (name == deserializerSkipNAtom)
+    else if (name == deserializerSkipNId)
     {
         args.append(*LINK(src));
         args.append(*LINK(srcLen));
@@ -1451,7 +1451,7 @@ IHqlExpression * stripTranslatedCasts(IHqlExpression * e)
 void SpecialFunction::expandValue(void * target) const
 {
     size32_t size = (size32_t)getIntValue(srcLen);
-    if (name == memsetAtom)
+    if (name == memsetId)
         memset(target, (int)getIntValue(src), size);
     else
         memcpy(target, src->queryValue()->queryValue(), size);
@@ -1465,8 +1465,8 @@ bool SpecialFunction::extractIsSpecial(IHqlStmt & stmt, bool memsetOnly, unsigne
         IHqlExpression * expr = stmt.queryExpr(0);
         if (expr->getOperator() != no_externalcall)
             return false;
-        name = expr->queryName();
-        if (name == memcpyAtom)
+        name = expr->queryId();
+        if (name == memcpyId)
         {
             src.set(stripTranslatedCasts(expr->queryChild(1)));
             if (memsetOnly && (queryMemsetChar(src) == -1))
@@ -1476,7 +1476,7 @@ bool SpecialFunction::extractIsSpecial(IHqlStmt & stmt, bool memsetOnly, unsigne
             tgtLen.set(srcLen);
             return true;
         }
-        if (name == deserializerReadNAtom || name == serializerPutAtom)
+        if (name == deserializerReadNId || name == serializerPutId)
         {
             if (memsetOnly)
                 return false;
@@ -1485,7 +1485,7 @@ bool SpecialFunction::extractIsSpecial(IHqlStmt & stmt, bool memsetOnly, unsigne
             tgtLen.set(expr->queryChild(1));
             return true;
         }
-        if ((name == ebcdic2asciiAtom) || (name == ascii2ebcdicAtom))
+        if ((name == ebcdic2asciiId) || (name == ascii2ebcdicId))
         {
             if (memsetOnly)
                 return false;
@@ -1495,7 +1495,7 @@ bool SpecialFunction::extractIsSpecial(IHqlStmt & stmt, bool memsetOnly, unsigne
             tgtLen.set(expr->queryChild(0));
             return srcLen == tgtLen;
         }
-        if (name == memsetAtom)
+        if (name == memsetId)
         {
             IHqlExpression * value = expr->queryChild(1);
             IHqlExpression * len = expr->queryChild(2);
@@ -1508,27 +1508,27 @@ bool SpecialFunction::extractIsSpecial(IHqlStmt & stmt, bool memsetOnly, unsigne
             }
             return true;
         }
-        if (name == deserializerSkipNAtom)
+        if (name == deserializerSkipNId)
         {
             src.set(expr->queryChild(0));
             srcLen.set(expr->queryChild(1));
             return true;
         }
         unsigned size = 0;
-        if (name == writeIntAtom[3])
+        if (name == writeIntId[3])
             size = 3;
-        else if (name == writeIntAtom[5])
+        else if (name == writeIntId[5])
             size = 5;
-        else if (name == writeIntAtom[6])
+        else if (name == writeIntId[6])
             size = 6;
-        else if (name == writeIntAtom[7])
+        else if (name == writeIntId[7])
             size = 7;
         if (size)
         {
             IHqlExpression * value = expr->queryChild(1);
             if (isZero(value))
             {
-                name = memcpyAtom;
+                name = memcpyId;
                 src.setown(createDataForIntegerZero(size));
                 tgt.set(stripTranslatedCasts(expr->queryChild(0)));
                 srcLen.setown(getSizetConstant(size));
@@ -1542,10 +1542,10 @@ bool SpecialFunction::extractIsSpecial(IHqlStmt & stmt, bool memsetOnly, unsigne
                 value = value->queryChild(0);
             if (value->getOperator() == no_externalcall)
             {
-                if ((value->queryName() == readIntAtom[size][true]) ||
-                    (value->queryName() == readIntAtom[size][false]))
+                if ((value->queryId() == readIntId[size][true]) ||
+                    (value->queryId() == readIntId[size][false]))
                 {
-                    name = memcpyAtom;
+                    name = memcpyId;
                     src.set(stripTranslatedCasts(value->queryChild(0)));
                     tgt.set(stripTranslatedCasts(expr->queryChild(0)));
                     srcLen.setown(getSizetConstant(size));
@@ -1647,7 +1647,7 @@ bool SpecialFunction::extractIsSpecial(IHqlStmt & stmt, bool memsetOnly, unsigne
         tgtLen.set(srcLen);
         tgt.set(stripTranslatedCasts(tgt->queryChild(0)));
         src.set(stripTranslatedCasts(src));
-        name = memcpyAtom;
+        name = memcpyId;
         return true;
     }
     return false;
@@ -1655,16 +1655,16 @@ bool SpecialFunction::extractIsSpecial(IHqlStmt & stmt, bool memsetOnly, unsigne
 
 bool SpecialFunction::isBigClear() const
 {
-    if ((name == memsetAtom) || (name == memcpyAtom))
+    if ((name == memsetId) || (name == memcpyId))
         return getIntValue(srcLen, 0) > CLEAR_COPY_THRESHOLD;
     return false;
 }
 
 int SpecialFunction::queryClearValue() const
 {
-    if (name == memcpyAtom) 
+    if (name == memcpyId)
         return queryMemsetChar(src);
-    if (name == memsetAtom)
+    if (name == memsetId)
         return (int)getIntValue(src, -1);
     return -1;
 }
@@ -1673,11 +1673,11 @@ bool SpecialFunction::queryCombine(const SpecialFunction & next, bool memsetOnly
 {
     if (name != next.name)
     {
-        if (!((name == memsetAtom) && (next.name == memcpyAtom)) && 
-            !((name == memcpyAtom) && (next.name == memsetAtom)))
+        if (!((name == memsetId) && (next.name == memcpyId)) &&
+            !((name == memcpyId) && (next.name == memsetId)))
             return false;
     }
-    if (name == deserializerSkipNAtom)
+    if (name == deserializerSkipNId)
     {
         if (src != next.src)
             return false;
@@ -1686,9 +1686,9 @@ bool SpecialFunction::queryCombine(const SpecialFunction & next, bool memsetOnly
     }
     if (rightFollowsLeft(tgt, tgtLen, next.tgt))
     {
-        if ((name != memsetAtom) && (next.name != memsetAtom))
+        if ((name != memsetId) && (next.name != memsetId))
         {
-            if (name == deserializerReadNAtom || name == serializerPutAtom)
+            if (name == deserializerReadNId || name == serializerPutId)
             {
                 tgtLen.setown(peepholeAddExpr(tgtLen, next.tgtLen));
                 return true;
@@ -1735,8 +1735,8 @@ bool SpecialFunction::queryCombine(const SpecialFunction & next, bool memsetOnly
             free(temp);
             srcLen.setown(getSizetConstant(curSize + nextSize));
             tgtLen.set(srcLen);
-            if (name == memsetAtom)
-                name = memcpyAtom;
+            if (name == memsetId)
+                name = memcpyId;
             return true;
         }
     }

+ 3 - 3
ecl/hqlcpp/hqlstmt.hpp

@@ -79,7 +79,7 @@ class HQLCPP_API BuildCtx : public CInterface
 {
     friend class AssociationIterator;
 public:
-    BuildCtx(HqlCppInstance & _state, _ATOM section);
+    BuildCtx(HqlCppInstance & _state, IAtom * section);
     BuildCtx(HqlCppInstance & _state);
     BuildCtx(BuildCtx & _owner);
     ~BuildCtx();
@@ -127,7 +127,7 @@ public:
     bool                        getMatchExpr(IHqlExpression * expr, CHqlBoundExpr & bound);
     IHqlExpression *            getTempDeclare(ITypeInfo * type, IHqlExpression * value);
     void                        needFunction(IFunctionInfo & helper);
-    void                        needFunction(_ATOM name);
+    void                        needFunction(IAtom * name);
     void                        removeAssociation(HqlExprAssociation * search);
     IHqlStmt *                  replaceExpr(IHqlStmt * stmt, IHqlExpression * expr);            // use with extreme care!
     IHqlStmt *                  selectBestContext(IHqlExpression * expr);
@@ -139,7 +139,7 @@ public:
     void                        setNextPriority(unsigned newPrio);
     unsigned                    setPriority(unsigned newPrio);
 
-    void                        set(_ATOM section);
+    void                        set(IAtom * section);
     void                        set(BuildCtx & _owner);
     void                        walkAssociations(IAssociationVisitor & visitor);
 

+ 73 - 73
ecl/hqlcpp/hqltcppc.cpp

@@ -459,7 +459,7 @@ void callDeserializeGetN(HqlCppTranslator & translator, BuildCtx & ctx, IHqlExpr
     args.append(*LINK(helper));
     args.append(*LINK(boundSize));
     args.append(*LINK(address));
-    OwnedHqlExpr call = translator.bindTranslatedFunctionCall(deserializerReadNAtom, args);
+    OwnedHqlExpr call = translator.bindTranslatedFunctionCall(deserializerReadNId, args);
     ctx.addExpr(call);
 }
 
@@ -467,7 +467,7 @@ IHqlExpression * callDeserializerGetSize(HqlCppTranslator & translator, BuildCtx
 {
     HqlExprArray args;
     args.append(*LINK(helper));
-    OwnedHqlExpr call = translator.bindFunctionCall(deserializerReadSizeAtom, args);
+    OwnedHqlExpr call = translator.bindFunctionCall(deserializerReadSizeId, args);
     OwnedHqlExpr sizeVariable = ctx.getTempDeclare(sizetType, call);
     return LINK(sizeVariable);
 }
@@ -479,7 +479,7 @@ void callDeserializerSkipInputSize(HqlCppTranslator & translator, BuildCtx & ctx
     HqlExprArray args;
     args.append(*LINK(helper));
     args.append(*LINK(bound.expr));
-    translator.callProcedure(ctx, deserializerSkipNAtom, args);
+    translator.callProcedure(ctx, deserializerSkipNId, args);
 }
 
 void callDeserializerSkipInputTranslatedSize(HqlCppTranslator & translator, BuildCtx & ctx, IHqlExpression * helper, IHqlExpression * size)
@@ -487,7 +487,7 @@ void callDeserializerSkipInputTranslatedSize(HqlCppTranslator & translator, Buil
     HqlExprArray args;
     args.append(*LINK(helper));
     args.append(*LINK(size));
-    translator.callProcedure(ctx, deserializerSkipNAtom, args);
+    translator.callProcedure(ctx, deserializerSkipNId, args);
 }
 
 void CMemberInfo::associateSizeOf(BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * rawSize, size32_t extraSize)
@@ -540,7 +540,7 @@ IHqlExpression * CMemberInfo::createSelfPeekDeserializer(HqlCppTranslator & tran
     HqlExprArray peekArgs;
     peekArgs.append(*LINK(helper));
     peekArgs.append(*LINK(maxSize));
-    return translator.bindTranslatedFunctionCall(deserializerPeekAtom, peekArgs);
+    return translator.bindTranslatedFunctionCall(deserializerPeekId, peekArgs);
 }
 
 void CMemberInfo::gatherMaxRowSize(SizeStruct & totalSize, IHqlExpression * newSize, size32_t fixedExtra, IReferenceSelector * selector)
@@ -599,7 +599,7 @@ void CMemberInfo::checkAssignOk(HqlCppTranslator & translator, BuildCtx & ctx, I
         HqlExprArray args2;
         args2.append(*LINK(row->queryBound()));
         args2.append(*LINK(bound.expr));
-        translator.callProcedure(ctx, ensureRowAvailableAtom, args2);
+        translator.callProcedure(ctx, ensureRowAvailableId, args2);
     }
     else
     {
@@ -629,7 +629,7 @@ void CMemberInfo::checkAssignOk(HqlCppTranslator & translator, BuildCtx & ctx, I
             args2.append(*LINK(row->queryBuilder()));
             args2.append(*LINK(bound.expr));
             args2.append(*createConstant(unknownVarStringType->castFrom(fieldname.length(), fieldname.str())));
-            OwnedHqlExpr call = translator.bindFunctionCall(ensureCapacityAtom, args2);
+            OwnedHqlExpr call = translator.bindFunctionCall(ensureCapacityId, args2);
 
             bool combined = false;
             if (bound.expr->isConstant())
@@ -667,7 +667,7 @@ void CMemberInfo::checkAssignOk(HqlCppTranslator & translator, BuildCtx & ctx, I
             args2.append(*LINK(bound.expr));
             args2.append(*LINK(max));
             args2.append(*createConstant(unknownVarStringType->castFrom(fieldname.length(), fieldname.str())));
-            translator.callProcedure(ctx, checkFieldOverflowAtom, args2);
+            translator.callProcedure(ctx, checkFieldOverflowId, args2);
         }
     }
 }
@@ -902,7 +902,7 @@ void CContainerInfo::buildClear(HqlCppTranslator & translator, BuildCtx & ctx, I
     }
 }
 
-void CContainerInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CContainerInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     ForEachItemIn(idx, children)
     {
@@ -912,7 +912,7 @@ void CContainerInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx &
     }
 }
 
-void CContainerInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CContainerInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     ForEachItemIn(idx, children)
     {
@@ -991,7 +991,7 @@ void CContainerInfo::setRow(HqlCppTranslator & translator, BuildCtx & ctx, IRefe
     args.append(*LINK(targetAddress.expr));
     args.append(*LINK(sourceAddress.expr));
     args.append(*LINK(length.expr));
-    translator.callProcedure(ctx, memcpyAtom, args);
+    translator.callProcedure(ctx, memcpyId, args);
 
     //Use the size just calulated for the field
     associateSizeOf(ctx, selector, length.expr, 0);
@@ -1150,7 +1150,7 @@ void CIfBlockInfo::buildExpr(HqlCppTranslator & translator, BuildCtx & ctx, IRef
     throwUnexpected();
 }
 
-void CIfBlockInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CIfBlockInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     //MORE: This should really associate offset of the ifblock with the offset of its first child as well.
     CHqlBoundExpr boundSize;
@@ -1168,7 +1168,7 @@ void CIfBlockInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ct
     CContainerInfo::buildDeserialize(translator, condctx, selector, helper, serializeForm);
 }
 
-void CIfBlockInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CIfBlockInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     OwnedHqlExpr cond = selector->queryRootRow()->bindToRow(condition, queryRootSelf());
     CHqlBoundExpr bound;
@@ -1433,7 +1433,7 @@ void CColumnInfo::buildClear(HqlCppTranslator & translator, BuildCtx & ctx, IRef
     setColumn(translator, ctx, selector, null);
 }
 
-void CColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     CHqlBoundExpr boundSize;
     OwnedHqlExpr unboundSize = ensureType(buildSizeOfUnbound(translator, ctx, selector), sizetType);
@@ -1442,7 +1442,7 @@ void CColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx
     doBuildDeserialize(translator, ctx, selector, helper, boundSize.expr);
 }
 
-void CColumnInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CColumnInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     OwnedHqlExpr sizeOfExpr = createValue(no_sizeof, LINK(sizetType), LINK(selector->queryExpr()));
     CHqlBoundExpr boundSize;
@@ -1452,7 +1452,7 @@ void CColumnInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx,
     args.append(*LINK(helper));
     args.append(*LINK(boundSize.expr));
     args.append(*getColumnAddress(translator, ctx, selector, queryPhysicalType()));
-    OwnedHqlExpr call = translator.bindTranslatedFunctionCall(serializerPutAtom, args);
+    OwnedHqlExpr call = translator.bindTranslatedFunctionCall(serializerPutId, args);
     ctx.addExpr(call);
 }
 
@@ -1477,7 +1477,7 @@ bool CColumnInfo::buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx,
             args.append(*LINK(state.helper));
             args.append(*getSizetConstant(columnSize));
             args.append(*getPointer(tempVariable));
-            OwnedHqlExpr call = translator.bindTranslatedFunctionCall(deserializerReadNAtom, args);
+            OwnedHqlExpr call = translator.bindTranslatedFunctionCall(deserializerReadNId, args);
             ctx.addExpr(call);
 
             OwnedHqlExpr translated = createTranslated(tempVariable);
@@ -1560,7 +1560,7 @@ CSpecialIntColumnInfo::CSpecialIntColumnInfo(CContainerInfo * _container, CMembe
 void CSpecialIntColumnInfo::buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound)
 {
     ITypeInfo * type = queryType();
-    _ATOM func = readIntAtom[type->getSize()][type->isSigned()];
+    IIdAtom * func = readIntId[type->getSize()][type->isSigned()];
 
     HqlExprArray args;
     args.append(*getColumnAddress(translator, ctx, selector, queryPhysicalType()));
@@ -1575,7 +1575,7 @@ void CSpecialIntColumnInfo::setColumn(HqlCppTranslator & translator, BuildCtx &
 {
     ITypeInfo * type = queryType();
     ITypeInfo * promoted = type->queryPromotedType();
-    _ATOM func = writeIntAtom[type->getSize()];
+    IIdAtom * func = writeIntId[type->getSize()];
 
     if (isConditional())
     {
@@ -1608,7 +1608,7 @@ CPackedIntColumnInfo::CPackedIntColumnInfo(CContainerInfo * _container, CMemberI
 void CPackedIntColumnInfo::buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound)
 {
     ITypeInfo * type = queryType();
-    _ATOM func = type->isSigned() ? getPackedSignedAtom : getPackedUnsignedAtom;
+    IIdAtom * func = type->isSigned() ? getPackedSignedId : getPackedUnsignedId;
 
     HqlExprArray args;
     args.append(*getColumnAddress(translator, ctx, selector, queryPhysicalType()));
@@ -1629,10 +1629,10 @@ IHqlExpression * CPackedIntColumnInfo::buildSizeOfUnbound(HqlCppTranslator & tra
 {
     HqlExprArray args;
     args.append(*getColumnAddress(translator, ctx, selector, queryPhysicalType()));
-    return createValue(no_translated, LINK(sizetType), translator.bindTranslatedFunctionCall(getPackedSizeAtom, args));
+    return createValue(no_translated, LINK(sizetType), translator.bindTranslatedFunctionCall(getPackedSizeId, args));
 }
 
-void CPackedIntColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CPackedIntColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     OwnedHqlExpr size = getSizetConstant(queryType()->queryPromotedType()->getSize()+1);    // an over-estimate, but more efficient than working out exactly.
     checkAssignOk(translator, ctx, selector, size, 0);
@@ -1640,7 +1640,7 @@ void CPackedIntColumnInfo::buildDeserialize(HqlCppTranslator & translator, Build
     HqlExprArray args;
     args.append(*LINK(helper));
     args.append(*getColumnAddress(translator, ctx, selector, queryPhysicalType()));
-    translator.buildTranslatedFunctionCall(ctx, deserializerReadPackedIntAtom, args);
+    translator.buildTranslatedFunctionCall(ctx, deserializerReadPackedIntId, args);
 }
 
 bool CPackedIntColumnInfo::buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state)
@@ -1651,14 +1651,14 @@ bool CPackedIntColumnInfo::buildReadAhead(HqlCppTranslator & translator, BuildCt
     HqlExprArray args;
     args.append(*LINK(state.helper));
     args.append(*getPointer(tempVar));
-    translator.buildTranslatedFunctionCall(ctx, deserializerReadPackedIntAtom, args);
+    translator.buildTranslatedFunctionCall(ctx, deserializerReadPackedIntId, args);
     return true;
 }
 
 void CPackedIntColumnInfo::setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value)
 {
     ITypeInfo * type = queryType();
-    _ATOM func = type->isSigned() ? setPackedSignedAtom : setPackedUnsignedAtom;
+    IIdAtom * func = type->isSigned() ? setPackedSignedId : setPackedUnsignedId;
 
     OwnedHqlExpr size = getSizetConstant(type->queryPromotedType()->getSize()+1);   // an over-estimate, but more efficient than working out exactly.
     checkAssignOk(translator, ctx, selector, size, 0);
@@ -1703,7 +1703,7 @@ void CSpecialStringColumnInfo::gatherSize(SizeStruct & target)
 }
 
 
-void CSpecialStringColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CSpecialStringColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     OwnedHqlExpr address = getColumnAddress(translator, ctx, selector, sizetType);
     OwnedHqlExpr addressStr = getColumnAddress(translator, ctx, selector, queryType(), sizeof(size32_t));
@@ -1726,7 +1726,7 @@ void CSpecialStringColumnInfo::buildDeserialize(HqlCppTranslator & translator, B
 
         assertex(!row->isSerialization() && row->queryBuilder());
 
-        _ATOM func = deserializerReadUtf8Atom;
+        IIdAtom * func = deserializerReadUtf8Id;
         HqlExprArray args;
         args.append(*LINK(helper));
         args.append(*LINK(row->queryBuilder()));
@@ -1767,7 +1767,7 @@ bool CSpecialStringColumnInfo::buildReadAhead(HqlCppTranslator & translator, Bui
         HqlExprArray args;
         args.append(*LINK(state.helper));
         args.append(*LINK(lengthVariable));
-        translator.callProcedure(ctx, deserializerSkipUtf8Atom, args);
+        translator.callProcedure(ctx, deserializerSkipUtf8Id, args);
     }
     else
     {
@@ -1841,7 +1841,7 @@ IHqlExpression * CSpecialVStringColumnInfo::buildSizeOfUnbound(HqlCppTranslator
     return createTranslatedOwned(length);
 }
 
-void CSpecialVStringColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CSpecialVStringColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     BoundRow * row = selector->queryRootRow();
 
@@ -1855,14 +1855,14 @@ void CSpecialVStringColumnInfo::buildDeserialize(HqlCppTranslator & translator,
 
     assertex(!row->isSerialization() && row->queryBuilder());
 
-    _ATOM func;
+    IIdAtom * func;
     switch (queryType()->getTypeCode())
     {
     case type_varstring:
-        func = deserializerReadVStrAtom;
+        func = deserializerReadVStrId;
         break;
     case type_varunicode:
-        func = deserializerReadVUniAtom;
+        func = deserializerReadVUniId;
         break;
     default:
         throwUnexpected();
@@ -1884,14 +1884,14 @@ bool CSpecialVStringColumnInfo::buildReadAhead(HqlCppTranslator & translator, Bu
     HqlExprArray args;
     args.append(*LINK(state.helper));
 
-    _ATOM func;
+    IIdAtom * func;
     switch (queryType()->getTypeCode())
     {
     case type_varstring:
-        func = deserializerSkipVStrAtom;
+        func = deserializerSkipVStrId;
         break;
     case type_varunicode:
-        func = deserializerSkipVUniAtom;
+        func = deserializerSkipVUniId;
         break;
     default:
         throwUnexpected();
@@ -1940,7 +1940,7 @@ void CSpecialVStringColumnInfo::setColumn(HqlCppTranslator & translator, BuildCt
     {
         args.append(*target.getLink());
         args.append(*translator.getElementPointer(bound.expr));     
-        translator.callProcedure(ctx, strcpyAtom, args);
+        translator.callProcedure(ctx, strcpyId, args);
     }
     else
     {
@@ -1948,7 +1948,7 @@ void CSpecialVStringColumnInfo::setColumn(HqlCppTranslator & translator, BuildCt
         args.append(*target.getLink());
         args.append(*LINK(length));
         args.append(*translator.getElementPointer(bound.expr));
-        translator.callProcedure(ctx, str2VStrAtom, args);
+        translator.callProcedure(ctx, str2VStrId, args);
     }
 }
 
@@ -2009,7 +2009,7 @@ IHqlExpression * CAlienColumnInfo::buildSizeOfUnbound(HqlCppTranslator & transla
     return doBuildSizeOfUnbound(translator, ctx, selector, NULL);
 }
 
-void CAlienColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CAlienColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     OwnedHqlExpr unboundSize = doBuildSizeOfUnbound(translator, ctx, selector, helper);
         
@@ -2204,7 +2204,7 @@ void CBitfieldContainerInfo::buildClear(HqlCppTranslator & translator, BuildCtx
     setColumn(translator, condctx, selector, null);
 }
 
-void CBitfieldContainerInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CBitfieldContainerInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     OwnedHqlExpr size = getSizetConstant(column->queryType()->getSize());
     doBuildDeserialize(translator, ctx, selector, helper, size);
@@ -2394,7 +2394,7 @@ void CVirtualColumnInfo::setColumn(HqlCppTranslator & translator, BuildCtx & ctx
 
 
 //******* For CSV the offset is the field number, not a byte offset ***********
-CCsvColumnInfo::CCsvColumnInfo(CContainerInfo * _container, CMemberInfo * _prior, IHqlExpression * _column, _ATOM _encoding) : CColumnInfo(_container, _prior, _column)
+CCsvColumnInfo::CCsvColumnInfo(CContainerInfo * _container, CMemberInfo * _prior, IHqlExpression * _column, IAtom * _encoding) : CColumnInfo(_container, _prior, _column)
 {
     encoding = _encoding;
 }
@@ -2494,7 +2494,7 @@ IHqlExpression * CCsvColumnInfo::getColumnExpr(HqlCppTranslator & translator, Bu
     {
         HqlExprArray args;
         args.append(*LINK(value));
-        value.setown(translator.bindFunctionCall(csvStr2BoolAtom,args));
+        value.setown(translator.bindFunctionCall(csvStr2BoolId,args));
     }
     else
         value.setown(ensureExprType(value, columnType));
@@ -2508,7 +2508,7 @@ void CCsvColumnInfo::setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IR
 
 //---------------------------------------------------------------------------
 
-static _ATOM getXmlReadFunction(ITypeInfo * type, bool hasDefault)
+static IIdAtom * getXmlReadFunction(ITypeInfo * type, bool hasDefault)
 {
     type = type->queryPromotedType();
     if (hasDefault)
@@ -2517,19 +2517,19 @@ static _ATOM getXmlReadFunction(ITypeInfo * type, bool hasDefault)
         {
         case type_unicode:
         case type_varunicode:
-            return columnReadUnicodeXAtom;
+            return columnReadUnicodeXId;
         case type_utf8:
-            return columnReadUtf8XAtom;
+            return columnReadUtf8XId;
         case type_int:
         case type_swapint:
         case type_packedint:
-            return columnReadIntAtom;
+            return columnReadIntId;
         case type_data:
-            return columnReadDataXAtom;
+            return columnReadDataXId;
         case type_boolean:
-            return columnReadBoolAtom;
+            return columnReadBoolId;
         default:
-            return columnReadStringXAtom;
+            return columnReadStringXId;
         }
     }
     else
@@ -2538,19 +2538,19 @@ static _ATOM getXmlReadFunction(ITypeInfo * type, bool hasDefault)
         {
         case type_unicode:
         case type_varunicode:
-            return columnGetUnicodeXAtom;
+            return columnGetUnicodeXId;
         case type_utf8:
-            return columnGetUtf8XAtom;
+            return columnGetUtf8XId;
         case type_int:
         case type_swapint:
         case type_packedint:
-            return columnGetIntAtom;
+            return columnGetIntId;
         case type_data:
-            return columnGetDataXAtom;
+            return columnGetDataXId;
         case type_boolean:
-            return columnGetBoolAtom;
+            return columnGetBoolId;
         default:
-            return columnGetStringXAtom;
+            return columnGetStringXId;
         }
     }
 }
@@ -2582,7 +2582,7 @@ bool CXmlColumnInfo::isFixedSize()
 }
 
 
-void CXmlColumnInfo::buildFixedStringAssign(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, const CHqlBoundTarget & target, IHqlExpression * defaultValue, _ATOM func)
+void CXmlColumnInfo::buildFixedStringAssign(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, const CHqlBoundTarget & target, IHqlExpression * defaultValue, IIdAtom * func)
 {
     StringBuffer row,path;
     selector->queryRootRow()->queryBound()->toString(row);
@@ -2604,7 +2604,7 @@ void CXmlColumnInfo::buildColumnAssign(HqlCppTranslator & translator, BuildCtx &
     Linked<ITypeInfo> type = queryPhysicalType();
     if (type->getSize() != UNKNOWN_LENGTH)
     {
-        _ATOM func = NULL;
+        IIdAtom * func = NULL;
         IHqlExpression * defaultValue = queryPropertyChild(column, xmlDefaultAtom, 0);
         if (!defaultValue)
             defaultValue = queryPropertyChild(column, defaultAtom, 0);
@@ -2613,13 +2613,13 @@ void CXmlColumnInfo::buildColumnAssign(HqlCppTranslator & translator, BuildCtx &
         {
         case type_string:
             if (type->queryCharset()->queryName() == asciiAtom)
-                func = defaultValue ? columnReadStringAtom : columnGetStringAtom;
+                func = defaultValue ? columnReadStringId : columnGetStringId;
             break;
         case type_data:
-            func = defaultValue ? columnReadDataAtom : columnGetDataAtom;
+            func = defaultValue ? columnReadDataId : columnGetDataId;
             break;
         case type_qstring:
-            func = defaultValue ? columnReadQStringAtom : columnGetQStringAtom;
+            func = defaultValue ? columnReadQStringId : columnGetQStringId;
             break;
         }
 
@@ -2760,7 +2760,7 @@ IHqlExpression * CXmlColumnInfo::getXmlSetExpr(HqlCppTranslator & translator, Bu
         isAllArgs.append(*createConstant(fullFieldPath.str()));
         if (defaultValue)
             isAllArgs.append(*createConstant(defaultIsAllValue));
-        OwnedHqlExpr isAll = translator.bindFunctionCall(defaultValue ? columnReadSetIsAllAtom : columnGetSetIsAllAtom, isAllArgs);
+        OwnedHqlExpr isAll = translator.bindFunctionCall(defaultValue ? columnReadSetIsAllId : columnGetSetIsAllId, isAllArgs);
         builder->setAll(ctx, isAll);
     }
     else
@@ -2788,7 +2788,7 @@ IHqlExpression * CXmlColumnInfo::getXmlSetExpr(HqlCppTranslator & translator, Bu
 IHqlExpression * CXmlColumnInfo::getCallExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector)
 {
     Linked<ITypeInfo> type = queryPhysicalType();
-    _ATOM func = NULL;
+    IIdAtom * func = NULL;
     IHqlExpression * defaultValue = queryPropertyChild(column, xmlDefaultAtom, 0);
     if (!defaultValue)
         defaultValue = queryPropertyChild(column, defaultAtom, 0);
@@ -2803,15 +2803,15 @@ IHqlExpression * CXmlColumnInfo::getCallExpr(HqlCppTranslator & translator, Buil
         return getXmlSetExpr(translator, ctx, selector);
     case type_string:
         if ((type->getSize() != UNKNOWN_LENGTH) && type->queryCharset()->queryName() == asciiAtom)
-            func = defaultValue ? columnReadStringAtom : columnGetStringAtom;
+            func = defaultValue ? columnReadStringId : columnGetStringId;
         break;
     case type_data:
         if (type->getSize() != UNKNOWN_LENGTH)
-            func = defaultValue ? columnReadDataAtom : columnGetDataAtom;
+            func = defaultValue ? columnReadDataId : columnGetDataId;
         break;
     case type_qstring:
         if (type->getSize() != UNKNOWN_LENGTH)
-            func = defaultValue ? columnReadQStringAtom : columnGetQStringAtom;
+            func = defaultValue ? columnReadQStringId : columnGetQStringId;
         break;
     }
 
@@ -2999,7 +2999,7 @@ CMemberInfo * ColumnToOffsetMap::createColumn(CContainerInfo * container, IHqlEx
                 IHqlExpression * cur = column->queryChild(i);
                 if (cur->isAttribute())
                 {
-                    _ATOM name = cur->queryName();
+                    IAtom * name = cur->queryName();
                     if (name == countAtom)
                         count = cur->queryChild(0);
                     else if (name == sizeofAtom)
@@ -3195,7 +3195,7 @@ bool canReadFromCsv(IHqlExpression * record)
 }
 
 
-CsvColumnToOffsetMap::CsvColumnToOffsetMap(IHqlExpression * _record, unsigned _maxRecordSize, bool _translateVirtuals, _ATOM _encoding) : ColumnToOffsetMap(_record, 1, _maxRecordSize, _translateVirtuals)
+CsvColumnToOffsetMap::CsvColumnToOffsetMap(IHqlExpression * _record, unsigned _maxRecordSize, bool _translateVirtuals, IAtom * _encoding) : ColumnToOffsetMap(_record, 1, _maxRecordSize, _translateVirtuals)
 {
     encoding = _encoding;
 }
@@ -3423,11 +3423,11 @@ IHqlExpression * SerializationRow::ensureSerialized(IHqlExpression * path, IHqlE
 
 IHqlExpression * SerializationRow::addSerializedValue(IHqlExpression * path, ITypeInfo * type, IHqlExpression * colocal, bool isConditional)
 {
-    _ATOM name = NULL;
+    IIdAtom * id = NULL;
     if (path->getOperator() == no_select)
-        name = path->queryChild(1)->queryName();
+        id = path->queryChild(1)->queryId();
     Owned<ITypeInfo> newType = getSimplifiedType(type, isConditional, (colocal == NULL), internalAtom);
-    OwnedHqlExpr newSelect = createField(name, newType);
+    OwnedHqlExpr newSelect = createField(id, newType);
 
     OwnedHqlExpr deserialized;
     if (colocal)
@@ -3453,16 +3453,16 @@ IHqlExpression * SerializationRow::addSerializedValue(IHqlExpression * path, ITy
     return LINK(deserialized);
 }
 
-IHqlExpression * SerializationRow::createField(_ATOM name, ITypeInfo * type)
+IHqlExpression * SerializationRow::createField(IIdAtom * id, ITypeInfo * type)
 {
-    if (!name)
+    if (!id)
     {
         StringBuffer fieldName;
         fieldName.append("__f").append(numFields()).append("__");
-        name = createIdentifierAtom(fieldName);
+        id = createIdAtom(fieldName);
     }
     IHqlExpression * attr = hasLinkCountedModifier(type) ? getLinkCountedAttr() : NULL;
-    OwnedHqlExpr newField = ::createField(name, LINK(type), attr, NULL);
+    OwnedHqlExpr newField = ::createField(id, LINK(type), attr, NULL);
     if (serializedMap->queryRootColumn()->lookupColumn(newField))
         return createField(NULL, type);                     // name clash -> create a new unnamed field
 

+ 1 - 1
ecl/hqlcpp/hqltcppc.hpp

@@ -116,7 +116,7 @@ public:
     virtual bool isSerialization() const                    { return true; }
     virtual ActivityInstance * queryActivity()              { return activity; }
 
-    IHqlExpression * createField(_ATOM name, ITypeInfo * type);         // returns a no_select reference to the field
+    IHqlExpression * createField(IIdAtom * id, ITypeInfo * type);         // returns a no_select reference to the field
     IHqlExpression * addSerializedValue(IHqlExpression * path, ITypeInfo * type, IHqlExpression * colocal, bool isConditional);
     IHqlExpression * ensureSerialized(IHqlExpression * path, IHqlExpression * colocal, bool isConditional);
     IHqlExpression * ensureSerialized(BuildCtx & ctx, IHqlExpression * colocal, IReferenceSelector * selector);

+ 26 - 26
ecl/hqlcpp/hqltcppc.ipp

@@ -142,7 +142,7 @@ protected:
 };
 
 
-typedef CIArrayOf<CMemberInfo> CMemberInfoArray;
+typedef IArrayOf<CMemberInfo> CMemberInfoArray;
 
 struct ReadAheadState
 {
@@ -173,8 +173,8 @@ public:
 // AColumnInfo
     virtual void buildSizeOf(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);
     virtual void buildClear(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, int direction);
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
-    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
+    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual bool prepareReadAhead(HqlCppTranslator & translator, ReadAheadState & state);
     virtual IHqlExpression * createSelectorExpr();
@@ -244,8 +244,8 @@ public:
 //AColumnInfo
     virtual void buildAssign(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, const CHqlBoundTarget & target);
     virtual void buildExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
-    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
+    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual bool prepareReadAhead(HqlCppTranslator & translator, ReadAheadState & state);
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value);
@@ -276,8 +276,8 @@ public:
     virtual void buildSizeOf(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);
     virtual void buildClear(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, int direction);
     virtual void buildExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
-    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
+    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual bool prepareReadAhead(HqlCppTranslator & translator, ReadAheadState & state);
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value);
@@ -294,8 +294,8 @@ protected:
     virtual void buildColumnAssign(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, const CHqlBoundTarget & target);
     virtual void calcCurrentOffset(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
 
-    void buildDeserializeToBuilder(HqlCppTranslator & translator, BuildCtx & ctx, IHqlCppDatasetBuilder * builder, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
-    virtual void buildDeserializeChildLoop(HqlCppTranslator & translator, BuildCtx & loopctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    void buildDeserializeToBuilder(HqlCppTranslator & translator, BuildCtx & ctx, IHqlCppDatasetBuilder * builder, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
+    virtual void buildDeserializeChildLoop(HqlCppTranslator & translator, BuildCtx & loopctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
 };
 
 class HQLCPP_API CSpecialIntColumnInfo : public CColumnInfo
@@ -316,7 +316,7 @@ public:
 //AColumnInfo
     virtual void buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);  // get() after conditions.
     virtual IHqlExpression * buildSizeOfUnbound(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value);
 
@@ -332,7 +332,7 @@ public:
 
 //AColumnInfo
     virtual void buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);  // get() after conditions.
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual IHqlExpression * buildSizeOfUnbound(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value);
@@ -348,7 +348,7 @@ public:
 //AColumnInfo
     virtual void buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);  // get() after conditions.
     virtual IHqlExpression * buildSizeOfUnbound(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value);
 
@@ -366,7 +366,7 @@ public:
 //Virtuals for column implementation
     virtual void buildAddress(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);
     virtual void buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);  // get() after conditions.
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual bool prepareReadAhead(HqlCppTranslator & translator, ReadAheadState & state);
     virtual IHqlExpression * buildSizeOfUnbound(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
@@ -397,7 +397,7 @@ public:
     virtual void buildAssign(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, const CHqlBoundTarget & target);
     virtual void buildClear(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, int direction);
     virtual void buildExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value);
 
@@ -468,7 +468,7 @@ protected:
 class HQLCPP_API CCsvColumnInfo : public CColumnInfo
 {
 public:
-    CCsvColumnInfo(CContainerInfo * _container, CMemberInfo * _prior, IHqlExpression * _column, _ATOM _encoding);
+    CCsvColumnInfo(CContainerInfo * _container, CMemberInfo * _prior, IHqlExpression * _column, IAtom * _encoding);
 
 //AColumnInfo
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value);
@@ -486,7 +486,7 @@ protected:
     IHqlExpression * getColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
 
 protected:
-    _ATOM encoding;
+    IAtom * encoding;
 };
 
 class HQLCPP_API CXmlColumnInfo : public CColumnInfo
@@ -507,7 +507,7 @@ public:
 
 protected:
     virtual void calcCurrentOffset(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector) {}
-    void buildFixedStringAssign(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, const CHqlBoundTarget & target, IHqlExpression * defaultValue, _ATOM func);
+    void buildFixedStringAssign(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, const CHqlBoundTarget & target, IHqlExpression * defaultValue, IIdAtom * func);
     IHqlExpression * getCallExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
     IHqlExpression * getXmlDatasetExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
     IHqlExpression * getXmlSetExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
@@ -608,13 +608,13 @@ public:
 class HQLCPP_API CsvColumnToOffsetMap : public ColumnToOffsetMap
 {
 public:
-    CsvColumnToOffsetMap(IHqlExpression * record, unsigned _maxRecordSize, bool _translateVirtuals, _ATOM _encoding);
+    CsvColumnToOffsetMap(IHqlExpression * record, unsigned _maxRecordSize, bool _translateVirtuals, IAtom * _encoding);
 
     virtual MapFormat getFormat()                   { return MapFormatCsv; }
     virtual CMemberInfo * createColumn(CContainerInfo * container, IHqlExpression * column, RecordOffsetMap & map);
 
 protected:
-    _ATOM encoding;
+    IAtom * encoding;
 };
 
 class HQLCPP_API XmlColumnToOffsetMap : public ColumnToOffsetMap
@@ -635,7 +635,7 @@ public:
 
 //AColumnInfo
     virtual void buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);  // get() after conditions.
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual IHqlExpression * buildSizeOfUnbound(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value);
@@ -651,9 +651,9 @@ public:
 
 //AColumnInfo
     virtual void buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);  // get() after conditions.
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
-    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual IHqlExpression * buildSizeOfUnbound(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
     virtual void setColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value);
 
@@ -672,7 +672,7 @@ public:
 
 //AColumnInfo
     virtual void buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);  // get() after conditions.
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool prepareReadAhead(HqlCppTranslator & translator, ReadAheadState & state);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual IHqlExpression * buildSizeOfUnbound(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
@@ -684,7 +684,7 @@ public:
 
 protected:
     void setColumnFromBuilder(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlCppDatasetBuilder * builder);
-    virtual void buildDeserializeChildLoop(HqlCppTranslator & translator, BuildCtx & loopctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserializeChildLoop(HqlCppTranslator & translator, BuildCtx & loopctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
 
 protected:
     OwnedHqlExpr countField;
@@ -700,8 +700,8 @@ public:
 
 //AColumnInfo
     virtual void buildColumnExpr(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, CHqlBoundExpr & bound);  // get() after conditions.
-    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
-    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm);
+    virtual void buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
+    virtual void buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm);
     virtual bool buildReadAhead(HqlCppTranslator & translator, BuildCtx & ctx, ReadAheadState & state);
     virtual IHqlExpression * buildSizeOfUnbound(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector);
     virtual bool modifyColumn(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * value, node_operator op);

+ 20 - 20
ecl/hqlcpp/hqltcppc2.cpp

@@ -74,7 +74,7 @@ IHqlExpression * CChildSetColumnInfo::buildSizeOfUnbound(HqlCppTranslator & tran
     return createValue(no_translated, LINK(sizetType), adjustValue(boundSize, sizeof(bool)+sizeof(size32_t)));
 }
 
-void CChildSetColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CChildSetColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     OwnedHqlExpr address = getColumnAddress(translator, ctx, selector, boolType, 0);
     OwnedHqlExpr addressSize = getColumnAddress(translator, ctx, selector, sizetType, sizeof(bool));
@@ -245,21 +245,21 @@ void CChildDatasetColumnInfo::gatherSize(SizeStruct & target)
     addVariableSize(sizeof(size32_t), target);
 }
 
-void CColumnInfo::buildDeserializeChildLoop(HqlCppTranslator & translator, BuildCtx & loopctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CColumnInfo::buildDeserializeChildLoop(HqlCppTranslator & translator, BuildCtx & loopctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     OwnedHqlExpr endMarker = loopctx.getTempDeclare(sizetType, NULL);
     HqlExprArray args;
     args.append(*LINK(helper));
-    OwnedHqlExpr beginCall = translator.bindTranslatedFunctionCall(deserializerBeginNestedAtom, args);
+    OwnedHqlExpr beginCall = translator.bindTranslatedFunctionCall(deserializerBeginNestedId, args);
     loopctx.addAssign(endMarker, beginCall);
 
     args.append(*LINK(helper));
     args.append(*LINK(endMarker));
-    OwnedHqlExpr loopCall = createBoolExpr(no_not, translator.bindTranslatedFunctionCall(deserializerFinishedNestedAtom, args));
+    OwnedHqlExpr loopCall = createBoolExpr(no_not, translator.bindTranslatedFunctionCall(deserializerFinishedNestedId, args));
     loopctx.addLoop(loopCall, NULL, false);
 }
 
-void CColumnInfo::buildDeserializeToBuilder(HqlCppTranslator & translator, BuildCtx & ctx, IHqlCppDatasetBuilder * builder, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CColumnInfo::buildDeserializeToBuilder(HqlCppTranslator & translator, BuildCtx & ctx, IHqlCppDatasetBuilder * builder, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     BuildCtx loopctx(ctx);
     buildDeserializeChildLoop(translator, loopctx, selector, helper, serializeForm);
@@ -269,7 +269,7 @@ void CColumnInfo::buildDeserializeToBuilder(HqlCppTranslator & translator, Build
 }
 
 
-void CChildDatasetColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CChildDatasetColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     IHqlExpression * record = column->queryRecord();
     assertex(!recordRequiresLinkCount(record)); // Why would it?
@@ -307,7 +307,7 @@ void CChildDatasetColumnInfo::buildDeserialize(HqlCppTranslator & translator, Bu
 }
 
 
-void CChildDatasetColumnInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CChildDatasetColumnInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     if (column->isDictionary())
     {
@@ -488,7 +488,7 @@ bool CChildLimitedDatasetColumnInfo::isFixedSize()
     return false;   //MORE:
 }
 
-void CChildLimitedDatasetColumnInfo::buildDeserializeChildLoop(HqlCppTranslator & translator, BuildCtx & loopctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CChildLimitedDatasetColumnInfo::buildDeserializeChildLoop(HqlCppTranslator & translator, BuildCtx & loopctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     OwnedHqlExpr mappedCount = replaceSelector(countField, querySelfReference(), selector->queryExpr()->queryChild(0));
     CHqlBoundExpr bound;
@@ -568,7 +568,7 @@ bool CChildLimitedDatasetColumnInfo::buildReadAhead(HqlCppTranslator & translato
 }
 
 
-void CChildLimitedDatasetColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeForm)
+void CChildLimitedDatasetColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeForm)
 {
     assertex(!column->isDictionary());
     if (sizeField || !countField)
@@ -672,7 +672,7 @@ IHqlExpression * CChildLinkedDatasetColumnInfo::buildSizeOfUnbound(HqlCppTransla
     return getSizetConstant(sizeof(size32_t) + sizeof(byte * *));
 }
 
-void CChildLinkedDatasetColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeFormat)
+void CChildLinkedDatasetColumnInfo::buildDeserialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeFormat)
 {
     if (isConditional())
         checkAssignOk(translator, ctx, selector, queryZero(), sizeof(size32_t) + sizeof(byte * *));
@@ -685,23 +685,23 @@ void CChildLinkedDatasetColumnInfo::buildDeserialize(HqlCppTranslator & translat
     boundTarget.count.setown(convertAddressToValue(addressSize, sizetType));
     boundTarget.expr.setown(convertAddressToValue(addressData, queryType()));
 
-    _ATOM func = NULL;
+    IIdAtom * func = NULL;
     HqlExprArray args;
     args.append(*translator.createSerializer(ctx, record, serializeFormat, deserializerAtom));
     if (column->isDictionary())
     {
         if (serializeFormat == diskAtom)
         {
-            func = deserializeChildDictionaryFromDatasetFromStreamAtom;
+            func = deserializeChildDictionaryFromDatasetFromStreamId;
             StringBuffer lookupHelperName;
             translator.buildDictionaryHashClass(record, lookupHelperName);
             args.append(*createQuoted(lookupHelperName.str(), makeBoolType()));
         }
         else
-            func = deserializeChildDictionaryFromStreamAtom;
+            func = deserializeChildDictionaryFromStreamId;
     }
     else
-        func = deserializeChildRowsetFromStreamAtom;
+        func = deserializeChildRowsetFromStreamId;
 
     args.append(*LINK(helper));
     OwnedHqlExpr call = translator.bindFunctionCall(func, args, queryType());
@@ -718,11 +718,11 @@ bool CChildLinkedDatasetColumnInfo::buildReadAhead(HqlCppTranslator & translator
 
 
 
-void CChildLinkedDatasetColumnInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, _ATOM serializeFormat)
+void CChildLinkedDatasetColumnInfo::buildSerialize(HqlCppTranslator & translator, BuildCtx & ctx, IReferenceSelector * selector, IHqlExpression * helper, IAtom * serializeFormat)
 {
     IHqlExpression * record = column->queryRecord();
 
-    _ATOM func = NULL;
+    IIdAtom * func = NULL;
     HqlExprArray args;
     args.append(*LINK(helper));
     args.append(*translator.createSerializer(ctx, record, serializeFormat, serializerAtom));
@@ -730,12 +730,12 @@ void CChildLinkedDatasetColumnInfo::buildSerialize(HqlCppTranslator & translator
     if (column->isDictionary())
     {
         if (serializeFormat == diskAtom)
-            func = serializeChildDictionaryToDatasetToStreamAtom;
+            func = serializeChildDictionaryToDatasetToStreamId;
         else
-            func = serializeChildDictionaryToStreamAtom;
+            func = serializeChildDictionaryToStreamId;
     }
     else
-        func = serializeChildRowsetToStreamAtom;
+        func = serializeChildRowsetToStreamId;
     OwnedHqlExpr call = translator.bindTranslatedFunctionCall(func, args);
     translator.buildStmt(ctx, call);
 }
@@ -760,7 +760,7 @@ bool CChildLinkedDatasetColumnInfo::modifyColumn(HqlCppTranslator & translator,
 
     HqlExprArray args;
     args.append(*LINK(value));
-    OwnedHqlExpr call = translator.bindFunctionCall(appendRowsToRowsetAtom, args, resultType);
+    OwnedHqlExpr call = translator.bindFunctionCall(appendRowsToRowsetId, args, resultType);
     translator.buildDatasetAssign(ctx, boundTarget, call);
     return true;
 }

+ 5 - 5
ecl/hqlcpp/hqltomita.cpp

@@ -156,7 +156,7 @@ StringBuffer & TomToken::getName(StringBuffer & out)
     IHqlExpression * expr = pattern;
     if (!expr)
         return out.append("EOF");
-    _ATOM name = expr->queryName();
+    IAtom * name = expr->queryName();
     if (expr->getOperator() == no_pat_instance)
     {
         name = expr->queryChild(1)->queryName();
@@ -551,7 +551,7 @@ void TomProduction::optimizeRules()
 
 //---------------------------------------------------------------------------
 
-TomRule::TomRule(IHqlExpression * expr, _ATOM _name, const TomFeatureArray & _features, bool _implicit, bool _isMatched)
+TomRule::TomRule(IHqlExpression * expr, IAtom * _name, const TomFeatureArray & _features, bool _implicit, bool _isMatched)
 {
     def.set(expr);
     cloneLinkedArray(features, _features);
@@ -1013,7 +1013,7 @@ TomGuard * TomitaContext::createGuard(IHqlExpression * featureExpr, IHqlExpressi
             StringBuffer text;
             valueExpr->queryValue()->getStringValue(text);
             //MORE: case sensitivity/unicode
-            _ATOM value = createAtom(text);
+            IAtom * value = createAtom(text);
             return new TomStrGuard(feature, value);
         }
     case type_int:
@@ -1159,7 +1159,7 @@ void TomitaContext::createProductions(TomRule * rule, IHqlExpression * expr, boo
 }
 
 
-TomRule * TomitaContext::createRule(IHqlExpression * expr, _ATOM name, bool expandTokens)
+TomRule * TomitaContext::createRule(IHqlExpression * expr, IAtom * name, bool expandTokens)
 {
     TomRule * rule = queryRule(expr, name);
     if (!rule)
@@ -1936,7 +1936,7 @@ TomFeature * TomitaContext::queryFeature(IHqlExpression * expr)
 }
 
 
-TomRule * TomitaContext::queryRule(IHqlExpression * expr, _ATOM name)
+TomRule * TomitaContext::queryRule(IHqlExpression * expr, IAtom * name)
 {
     //MORE: May need a hash table!
     ForEachItemIn(idx, rules)

+ 8 - 8
ecl/hqlcpp/hqltomita.ipp

@@ -84,12 +84,12 @@ protected:
 class TomStrGuard : public TomGuard
 {
 public:
-    TomStrGuard(TomFeature * _feature, _ATOM _value) : TomGuard(_feature)   { value = _value; }
+    TomStrGuard(TomFeature * _feature, IAtom * _value) : TomGuard(_feature)   { value = _value; }
 
     virtual StringBuffer & getDebugText(StringBuffer & out);
 
 protected:
-    _ATOM           value;
+    IAtom *           value;
 };
 
 class TomIntGuard : public TomGuard
@@ -295,7 +295,7 @@ class TomRule : public CInterface
     friend class TomitaContext;
     friend class HqlLRState;
 public:
-    TomRule(IHqlExpression * expr, _ATOM name, const TomFeatureArray & _features, bool implicit, bool _isMatched);
+    TomRule(IHqlExpression * expr, IAtom * name, const TomFeatureArray & _features, bool implicit, bool _isMatched);
 
     void addProductionOwn(TomProduction * production)       { productions.append(*production); }
     bool addFollowOwn(TomToken & token)                     { return follow.add(token); }
@@ -311,10 +311,10 @@ public:
     StringBuffer & getDebugText(StringBuffer & out);
     void getFeatures(TomFeatureArray & target);
     StringBuffer & getName(StringBuffer & out);
-    bool matches(IHqlExpression * expr, _ATOM name)                     { return expr == def && name == cachedName; }
+    bool matches(IHqlExpression * expr, IAtom * name)                     { return expr == def && name == cachedName; }
     bool matchesDefine(IHqlExpression * name);
     TomProduction * queryExpand();
-    _ATOM queryName()                                       { return cachedName; }
+    IAtom * queryName()                                       { return cachedName; }
     IHqlExpression * queryRecord();
     void optimizeRules();
 
@@ -332,7 +332,7 @@ protected:
     OwnedHqlExpr def;
     OwnedHqlExpr test;
     OwnedHqlExpr defineName;
-    _ATOM cachedName;
+    IAtom * cachedName;
     unsigned id;
     bool implicit;  // if implicit, need to inherit features from children...
     CIArrayOf<TomProduction> productions;
@@ -441,7 +441,7 @@ protected:
     TomRule * createImplicitRule(TomRule * self, IHqlExpression * expr, bool expandTokens);
     void createProduction(TomRule * self, TomRule * rule, IHqlExpression * expr, bool expandTokens);
     void createProductions(TomRule * rule, IHqlExpression * expr, bool expandTokens);
-    TomRule * createRule(IHqlExpression * expr, _ATOM name, bool expandTokens);
+    TomRule * createRule(IHqlExpression * expr, IAtom * name, bool expandTokens);
     void createStepAsImplicitRule(TomRule * self, TomProduction * production, IHqlExpression * expr, bool expandTokens);
     void createSteps(TomRule * self, TomProduction * production, IHqlExpression * expr, bool expandTokens);
     TomToken * createToken(IHqlExpression * expr);
@@ -454,7 +454,7 @@ protected:
 
     virtual TomRule * queryDefine(IHqlExpression * defineName);
     TomFeature * queryFeature(IHqlExpression * expr);
-    TomRule * queryRule(IHqlExpression * expr, _ATOM name);
+    TomRule * queryRule(IHqlExpression * expr, IAtom * name);
     
 protected:
     TomitaAlgorithm parser;

+ 72 - 49
ecl/hqlcpp/hqlttcpp.cpp

@@ -268,7 +268,7 @@ void NewThorStoredReplacer::doAnalyseBody(IHqlExpression * expr)
     {
         StringBuffer errorTemp;
         seenMeta = true;
-        _ATOM kind = expr->queryChild(0)->queryName();
+        IAtom * kind = expr->queryChild(0)->queryName();
         if (kind == debugAtom)
         {
             OwnedHqlExpr foldedName = foldHqlExpression(expr->queryChild(1));
@@ -1215,7 +1215,7 @@ SequenceNumberAllocator::SequenceNumberAllocator(HqlCppTranslator & _translator)
     sequence = 0;
 }
 
-void SequenceNumberAllocator::nextSequence(HqlExprArray & args, IHqlExpression * name, _ATOM overwriteAction, IHqlExpression * value, bool needAttr, bool * duplicate)
+void SequenceNumberAllocator::nextSequence(HqlExprArray & args, IHqlExpression * name, IAtom * overwriteAction, IHqlExpression * value, bool needAttr, bool * duplicate)
 {
     IHqlExpression * seq = NULL;
     if (duplicate)
@@ -1231,7 +1231,7 @@ void SequenceNumberAllocator::nextSequence(HqlExprArray & args, IHqlExpression *
             IHqlExpression * prev = matched->get();
             if (prev->isAttribute())
             {
-                _ATOM prevName = prev->queryName();
+                IAtom * prevName = prev->queryName();
                 if (!overwriteAction)
                 {
                     if (prevName == extendAtom)
@@ -1362,7 +1362,7 @@ IHqlExpression * SequenceNumberAllocator::createTransformed(IHqlExpression * exp
     return attachSequenceNumber(transformed.get());
 }
 
-static _ATOM queryOverwriteAction(IHqlExpression * expr)
+static IAtom * queryOverwriteAction(IHqlExpression * expr)
 {
     if (expr->hasProperty(extendAtom))
         return extendAtom;
@@ -1583,7 +1583,7 @@ IHqlExpression * evalNormalizeAggregateExpr(IHqlExpression * selector, IHqlExpre
             {
                 StringBuffer temp;
                 temp.append("_agg_").append(assigns.ordinality());
-                targetField = createField(createIdentifierAtom(temp.str()), expr->getType(), NULL);
+                targetField = createField(createIdAtom(temp.str()), expr->getType(), NULL);
                 extraSelectNeeded = true;
             }
             fields.append(*targetField);
@@ -3040,7 +3040,7 @@ IHqlExpression * ThorHqlTransformer::normalizeSubSort(IHqlExpression * expr)
 }
 
 
-IHqlExpression * ThorHqlTransformer::normalizeSortSteppedIndex(IHqlExpression * expr, _ATOM attrName)
+IHqlExpression * ThorHqlTransformer::normalizeSortSteppedIndex(IHqlExpression * expr, IAtom * attrName)
 {
     node_operator op = expr->getOperator();
     if (op == no_assertsorted)
@@ -3152,7 +3152,7 @@ static IHqlExpression * extractPrefetchFields(HqlExprArray & fields, HqlExprArra
         match = fields.ordinality();
         StringBuffer name;
         name.append("_f").append(match).append("_");
-        IHqlExpression * field = createField(createIdentifierAtom(name.str()), expr->getType(), NULL);
+        IHqlExpression * field = createField(createIdAtom(name.str()), expr->getType(), NULL);
         fields.append(*field);
         values.append(*LINK(expr));
     }
@@ -3403,7 +3403,7 @@ IHqlExpression * ThorHqlTransformer::normalizeTableToAggregate(IHqlExpression *
             {
                 StringBuffer temp;
                 temp.append("_agg_").append(aggregateAssigns.ordinality());
-                IHqlExpression * targetField = createField(createIdentifierAtom(temp.str()), curGroup->getType(), NULL);
+                IHqlExpression * targetField = createField(createIdAtom(temp.str()), curGroup->getType(), NULL);
                 aggregateFields.append(*targetField);
                 aggregateAssigns.append(*createAssign(createSelectExpr(getActiveTableSelector(), LINK(targetField)), LINK(curGroup)));
                 extraSelectNeeded = true;
@@ -6988,7 +6988,7 @@ void ScalarGlobalTransformer::doAnalyseExpr(IHqlExpression * expr)
         return;
     case no_attr_expr:
         {
-            _ATOM name = expr->queryName();
+            IAtom * name = expr->queryName();
             if ((name == _selectors_Atom) || (name == keyedAtom))
                 return;
             analyseChildren(expr);
@@ -10123,8 +10123,6 @@ public:
         default:
             return false;
         }
-        if (expr->queryName() != createIdentifierAtom("ds_raw"))
-            return false;
         return true;
     }
     virtual void doAnalyse(IHqlExpression * expr)
@@ -10170,7 +10168,7 @@ void spotPotentialDuplicateCode(HqlExprArray & exprs)
 
 //---------------------------------------------------------------------------
 
-static bool isUniqueAttributeName(_ATOM name)
+static bool isUniqueAttributeName(IAtom * name)
 {
     const char * nameText = name->str();
     unsigned len = strlen(nameText);
@@ -10182,11 +10180,27 @@ static bool isUniqueAttributeName(_ATOM name)
     return false;
 }
 
-static _ATOM simplifyUniqueAttributeName(_ATOM name)
+static bool containsUpperCase(const char * s)
+{
+    loop
+    {
+        unsigned char next = *s++;
+        if (!next)
+            return false;
+        if (isupper(next))
+            return true;
+    }
+}
+
+static IIdAtom * simplifySymbolName(IIdAtom * name, bool commonUniqueNameAttributes)
 {
+    if (!commonUniqueNameAttributes)
+        return NULL;
+
     //Rename all attributes __x__1234__ to __x__
-    const char * nameText = name->str();
-    unsigned len = strlen(nameText);
+    const char * nameText = name->lower()->str();
+    size_t nameLen = strlen(nameText);
+    size_t len = nameLen;
     if (len > 3)
     {
         if ((nameText[len-2] == '_') && (nameText[len-1] == '_') && isdigit((unsigned char)nameText[len-3]))
@@ -10194,17 +10208,27 @@ static _ATOM simplifyUniqueAttributeName(_ATOM name)
             len -= 3;
             while (len && isdigit((unsigned char)nameText[len-1]))
                 len--;
-            if (len)
-            {
-                StringAttr truncName;
-                truncName.set(nameText, len);
-                return createIdentifierAtom(truncName);
-            }
+            //Shouldn't be possible...
+            if (len == 0)
+                len = nameLen;
         }
     }
+    if (nameLen != len)
+    {
+        StringAttr truncName;
+        truncName.set(nameText, len);
+        return createIdAtom(truncName);
+    }
     return NULL;
 }
 
+static IIdAtom * lowerCaseSymbolName(IIdAtom * name)
+{
+    if (containsUpperCase(name->str()))
+        return createIdAtom(name->lower()->str());
+    return name;
+}
+
 static bool exprIsSelfConstant(IHqlExpression * expr)
 {
     if (expr->isConstant())
@@ -10232,7 +10256,7 @@ static bool exprIsSelfConstant(IHqlExpression * expr)
 }
 
 
-static _ATOM queryPatUseModule(IHqlExpression * expr)
+static IAtom * queryPatUseModule(IHqlExpression * expr)
 {
     IHqlExpression * moduleAttr = expr->queryProperty(moduleAtom);
     if (moduleAttr)
@@ -10240,7 +10264,7 @@ static _ATOM queryPatUseModule(IHqlExpression * expr)
     return NULL;
 }
 
-static _ATOM queryPatUseName(IHqlExpression * expr)
+static IAtom * queryPatUseName(IHqlExpression * expr)
 {
     IHqlExpression * nameAttr = expr->queryProperty(nameAtom);
     return nameAttr->queryChild(0)->queryBody()->queryName();
@@ -10535,7 +10559,7 @@ void HqlTreeNormalizer::analyseExpr(IHqlExpression * expr)
 }
 
 
-IHqlExpression * HqlTreeNormalizer::makeRecursiveName(_ATOM searchModule, _ATOM searchName)
+IHqlExpression * HqlTreeNormalizer::makeRecursiveName(IAtom * searchModule, IAtom * searchName)
 {
     //If this symbol is already has a user define, use that instead of creating our own,
     //because I don't cope very well with multiple defines on the same pattern instance.
@@ -10543,8 +10567,8 @@ IHqlExpression * HqlTreeNormalizer::makeRecursiveName(_ATOM searchModule, _ATOM
     {
         IHqlExpression & cur = defines.item(i);
         IHqlExpression * moduleExpr = cur.queryChild(2);
-        _ATOM module = moduleExpr ? moduleExpr->queryBody()->queryName() : NULL;
-        _ATOM name = cur.queryChild(1)->queryBody()->queryName();
+        IAtom * module = moduleExpr ? moduleExpr->queryBody()->queryName() : NULL;
+        IAtom * name = cur.queryChild(1)->queryBody()->queryName();
         if (name == searchName && module == searchModule)
             return LINK(cur.queryChild(0)->queryChild(1));
     }
@@ -10559,8 +10583,8 @@ IHqlExpression * HqlTreeNormalizer::queryTransformPatternDefine(IHqlExpression *
         return NULL;
 
     IHqlExpression * moduleExpr = expr->queryChild(2);
-    _ATOM module = moduleExpr ? moduleExpr->queryBody()->queryName() : NULL;
-    _ATOM name = expr->queryChild(1)->queryBody()->queryName();
+    IAtom * module = moduleExpr ? moduleExpr->queryBody()->queryName() : NULL;
+    IAtom * name = expr->queryChild(1)->queryBody()->queryName();
     ForEachItemIn(i, forwardReferences)
     {
         IHqlExpression * cur = &forwardReferences.item(i);
@@ -10710,7 +10734,7 @@ IHqlExpression * HqlTreeNormalizer::transformEvaluate(IHqlExpression * expr)
                 else
                 {
                     //EVALUATE(t[n], e)          -> table(t,{f1 := e})[n].f1;
-                    OwnedHqlExpr field = createField(valueAtom, expr->getType(), NULL);
+                    OwnedHqlExpr field = createField(valueId, expr->getType(), NULL);
                     IHqlExpression * aggregateRecord = createRecord(field);
 
                     IHqlExpression * newAttr = replaceSelector(attr, activeTable, baseDs);
@@ -11337,7 +11361,7 @@ IHqlExpression * HqlTreeNormalizer::createTransformed(IHqlExpression * expr)
                 bool changed = false;
                 for (unsigned i=0; (cur = expr->queryAnnotationParameter(i)) != 0; i++)
                 {
-                    _ATOM name = cur->queryName();
+                    IAtom * name = cur->queryName();
                     bool keep = true;
                     if (name == deprecatedAtom)
                         keep = false;
@@ -11362,13 +11386,10 @@ IHqlExpression * HqlTreeNormalizer::createTransformed(IHqlExpression * expr)
                 if (hasNamedSymbol(transformedBody))
                     return transformedBody.getClear();
 
-                _ATOM name = expr->queryName();
-                if (options.commonUniqueNameAttributes)
-                {
-                    _ATOM simpleName = simplifyUniqueAttributeName(name);
-                    if (simpleName)
-                        return cloneSymbol(expr, simpleName, transformedBody, NULL, NULL);
-                }
+                IIdAtom * id = expr->queryId();
+                IIdAtom * simpleId = simplifySymbolName(id, options.commonUniqueNameAttributes);
+                if (simpleId)
+                    return cloneSymbol(expr, simpleId, transformedBody, NULL, NULL);
                 break;
             }
         } // switch(kind)
@@ -11560,11 +11581,11 @@ IHqlExpression * HqlTreeNormalizer::createTransformedBody(IHqlExpression * expr)
                 IHqlExpression * recordSymbol = queryLocationIndependentExtra(expr)->symbol;
                 if (recordSymbol)
                 {
-                    _ATOM name = recordSymbol->queryName();
-                    _ATOM simpleName = simplifyUniqueAttributeName(name);
-                    if (simpleName)
-                        name = simpleName;
-                    return createSymbol(name, transformed.getClear(), ob_private);
+                    IIdAtom * id = recordSymbol->queryId();
+                    IIdAtom * simpleId = simplifySymbolName(id, options.commonUniqueNameAttributes);
+                    IIdAtom * newid = simpleId ? simpleId : id;
+                    IIdAtom * lowerId = lowerCaseSymbolName(newid);
+                    return createSymbol(lowerId, transformed.getClear(), ob_private);
                 }
             }
             return transformed.getClear();
@@ -11606,8 +11627,10 @@ IHqlExpression * HqlTreeNormalizer::createTransformedBody(IHqlExpression * expr)
 
             ITypeInfo * type = expr->queryType();
             OwnedITypeInfo newType = transformType(type);
-            if (type != newType)
-                return createField(expr->queryName(), newType.getClear(), children);
+            IIdAtom * id = expr->queryId();
+            IIdAtom * newId = lowerCaseSymbolName(id);
+            if ((type != newType) || (newId != id))
+                return createField(newId, newType.getClear(), children);
 
             if (same)
                 return LINK(expr);
@@ -11762,7 +11785,7 @@ IHqlExpression * HqlTreeNormalizer::createTransformedBody(IHqlExpression * expr)
                 //Attributes shouldn't need transforming, but simplest
                 HqlExprArray attrs;
                 transformChildren(expr, attrs);
-                return createParameter(expr->queryName(), (unsigned)expr->querySequenceExtra(), newType.getClear(), attrs);
+                return createParameter(expr->queryId(), (unsigned)expr->querySequenceExtra(), newType.getClear(), attrs);
             }
             break;
         }
@@ -11792,7 +11815,7 @@ IHqlExpression * HqlTreeNormalizer::createTransformedBody(IHqlExpression * expr)
                 }
                 else if (cur->getOperator() == no_purevirtual)
                 {
-                    _ATOM name = cur->queryName();
+                    IAtom * name = cur->queryName();
                     throwError1(HQLERR_LibraryMemberArgNotDefined, name ? name->str() : "");
                 }
                 IHqlExpression * transformed = transform(cur);
@@ -12042,7 +12065,7 @@ IHqlExpression * HqlTreeNormalizer::createTransformedBody(IHqlExpression * expr)
     case no_attr_link:
     case no_attr_expr:
         {
-            _ATOM name = expr->queryName();
+            IAtom * name = expr->queryName();
             if ((name == _uid_Atom) && (expr->numChildren() > 0))
             {
                 //Make sure we ignore any line number information on the parameters mangled with the uid - otherwise
@@ -12126,7 +12149,7 @@ IHqlExpression * HqlTreeNormalizer::createTransformedBody(IHqlExpression * expr)
             bool same = transformChildren(expr, args);
             if (same && (type == newType))
                 return LINK(expr);
-            return createExternalReference(expr->queryName(), newType.getClear(), args);
+            return createExternalReference(expr->queryId(), newType.getClear(), args);
         }
     case no_outputscalar:
         if (options.outputRowsAsDatasets && expr->queryChild(0)->isDatarow())
@@ -12181,7 +12204,7 @@ IHqlExpression * HqlTreeNormalizer::createTransformedBody(IHqlExpression * expr)
             HqlExprArray children;
             if (transformChildren(expr, children))
                 return LINK(expr);
-            return createFunctionDefinition(expr->queryName(), children);
+            return createFunctionDefinition(expr->queryId(), children);
         }
     case no_debug_option_value:
         {

+ 3 - 3
ecl/hqlcpp/hqlttcpp.ipp

@@ -167,7 +167,7 @@ public:
     unsigned getMaxSequence() { return sequence; }
 
 protected:
-    void nextSequence(HqlExprArray & args, IHqlExpression * name, _ATOM overwriteAction, IHqlExpression * value, bool needAttr, bool * duplicate);
+    void nextSequence(HqlExprArray & args, IHqlExpression * name, IAtom * overwriteAction, IHqlExpression * value, bool needAttr, bool * duplicate);
     virtual IHqlExpression * doTransformRootExpr(IHqlExpression * expr);
     IHqlExpression * attachSequenceNumber(IHqlExpression * expr);
 
@@ -206,7 +206,7 @@ protected:
     IHqlExpression * normalizeSelect(IHqlExpression * expr);
     IHqlExpression * normalizeSubSort(IHqlExpression * expr);
     IHqlExpression * normalizeSort(IHqlExpression * expr);
-    IHqlExpression * normalizeSortSteppedIndex(IHqlExpression * expr, _ATOM attrName);
+    IHqlExpression * normalizeSortSteppedIndex(IHqlExpression * expr, IAtom * attrName);
     IHqlExpression * normalizeTempTable(IHqlExpression * expr);
 
     IHqlExpression * skipGroupsWithinGroup(IHqlExpression * expr, bool isLocal);
@@ -1172,7 +1172,7 @@ protected:
 
 protected:
     IHqlExpression * transformChildrenNoAnnotations(IHqlExpression * expr);
-    IHqlExpression * makeRecursiveName(_ATOM searchModule, _ATOM searchName);
+    IHqlExpression * makeRecursiveName(IAtom * searchModule, IAtom * searchName);
     HqlTreeNormalizerInfo * queryLocationIndependentExtra(IHqlExpression * expr);
     IHqlExpression * transformSimpleConst(IHqlExpression * expr)
     {

+ 2 - 2
ecl/hqlcpp/hqlwcpp.cpp

@@ -786,7 +786,7 @@ void HqlCppWriter::generateParamCpp(IHqlExpression * param)
     ITypeInfo *paramType = param->queryType();
     
     //Case is significant if these parameters are use for BEGINC++ sections
-    _ATOM paramName = param->queryName();
+    IAtom * paramName = param->queryName();
     StringBuffer paramNameText;
     paramNameText.append(paramName).toLowerCase();
 
@@ -2094,7 +2094,7 @@ void HqlCppWriter::setOutput(IFile * _targetFile, IIOStream * _target)
     out.ensureCapacity(FILE_CHUNK_SIZE + 2 * REASONABLE_LINE_LIMIT);
 }
 
-void HqlCppSectionWriter::generateSection(unsigned delta, _ATOM section, unsigned pass)
+void HqlCppSectionWriter::generateSection(unsigned delta, IAtom * section, unsigned pass)
 {
     HqlStmts * match = instance.querySection(section);
     if (match)

+ 1 - 1
ecl/hqlcpp/hqlwcpp.hpp

@@ -27,7 +27,7 @@ interface IHqlCppInstance;
 interface HQLCPP_API ISectionWriter : public IInterface
 {
 public:
-    virtual void generateSection(unsigned indent, _ATOM section, unsigned pass) = 0;
+    virtual void generateSection(unsigned indent, IAtom * section, unsigned pass) = 0;
     virtual void noteLines(size32_t count) = 0;
     virtual void setOutput(IFile * out, IIOStream * outStream) = 0; 
 };

+ 2 - 2
ecl/hqlcpp/hqlwcpp.ipp

@@ -49,7 +49,7 @@ private:
     struct CppTemplateSection : public CInterface
     {
         TplSectionType  type;
-        _ATOM                       id;
+        IAtom *                       id;
         const char *        position;
         unsigned                len;
         unsigned                indent;
@@ -134,7 +134,7 @@ public:
     }
     IMPLEMENT_IINTERFACE
 
-    virtual void generateSection(unsigned indent, _ATOM section, unsigned pass);
+    virtual void generateSection(unsigned indent, IAtom * section, unsigned pass);
     virtual void noteLines(size32_t count) { writer.noteLines(count); }
     virtual void setOutput(IFile * out, IIOStream * outStream) { writer.setOutput(out, outStream); }
 

+ 3 - 3
plugins/parselib/parselib.cpp

@@ -25,7 +25,7 @@
 
 #define PARSELIB_VERSION "PARSELIB 1.0.1"
 
-_ATOM separatorTagAtom;
+IAtom * separatorTagAtom;
 MODULE_INIT(INIT_PRIORITY_STANDARD)
 {
     separatorTagAtom = createAtom("<separator>");
@@ -94,7 +94,7 @@ static void expandElementText(StringBuffer & s, IMatchWalker * walker)
 
 static void getDefaultParseTree(StringBuffer & s, IMatchWalker * cur)
 {
-    _ATOM name = cur->queryName();
+    IAtom * name = cur->queryName();
     if (name != separatorTagAtom)
     {
         if (name)
@@ -128,7 +128,7 @@ static void getDefaultParseTree(StringBuffer & s, IMatchWalker * cur)
 
 static void getXmlParseTree(StringBuffer & s, IMatchWalker * walker, unsigned indent)
 {
-    _ATOM name = walker->queryName();
+    IAtom * name = walker->queryName();
     if (name != separatorTagAtom)
     {
         unsigned max = walker->numChildren();

+ 0 - 0
system/jlib/jhash.cpp


部分文件因文件數量過多而無法顯示