Bug 1277106 - Part 3: Expand MOZ_UTF16() characters to u'' char16_t literals. r=luke
authorChris Peterson <cpeterson@mozilla.com>
Wed, 20 Jul 2016 22:03:48 -0700
changeset 346072 4e02a5ff49f20286544b1a721b6b37b9e678acb0
parent 346071 282f7afd67657dda8e2e8568e5ac6f609311a03b
child 346073 dfd60b58fa6410b266fd7c87b25e50d1bb36fd8c
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1277106
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1277106 - Part 3: Expand MOZ_UTF16() characters to u'' char16_t literals. r=luke
js/src/asmjs/WasmAST.h
js/src/asmjs/WasmBinaryToAST.cpp
js/src/asmjs/WasmBinaryToExperimentalText.cpp
--- a/js/src/asmjs/WasmAST.h
+++ b/js/src/asmjs/WasmAST.h
@@ -44,17 +44,17 @@ using AstHashMap = HashMap<K, V, HP, Lif
 
 class AstName
 {
     const char16_t* begin_;
     const char16_t* end_;
   public:
     template <size_t Length>
     explicit AstName(const char16_t (&str)[Length]) : begin_(str), end_(str + Length - 1) {
-      MOZ_ASSERT(str[Length - 1] == MOZ_UTF16('\0'));
+      MOZ_ASSERT(str[Length - 1] == u'\0');
     }
 
     AstName(const char16_t* begin, size_t length) : begin_(begin), end_(begin + length) {}
     AstName() : begin_(nullptr), end_(nullptr) {}
     const char16_t* begin() const { return begin_; }
     const char16_t* end() const { return end_; }
     size_t length() const { return end_ - begin_; }
     bool empty() const { return begin_ == nullptr; }
--- a/js/src/asmjs/WasmBinaryToAST.cpp
+++ b/js/src/asmjs/WasmBinaryToAST.cpp
@@ -128,32 +128,32 @@ static bool
 AstDecodeGenerateName(AstDecodeContext& c, const AstName& prefix, uint32_t index, AstName* name)
 {
     if (!c.generateNames) {
         *name = AstName();
         return true;
     }
 
     AstVector<char16_t> result(c.lifo);
-    if (!result.append(MOZ_UTF16('$')))
+    if (!result.append(u'$'))
         return false;
     if (!result.append(prefix.begin(), prefix.length()))
         return false;
 
     uint32_t tmp = index;
     do {
-        if (!result.append(MOZ_UTF16('0')))
+        if (!result.append(u'0'))
             return false;
         tmp /= 10;
     } while (tmp);
 
     if (index) {
         char16_t* p = result.end();
         for (tmp = index; tmp; tmp /= 10)
-            *(--p) = MOZ_UTF16('0' + (tmp % 10));
+            *(--p) = u'0' + (tmp % 10);
     }
 
     size_t length = result.length();
     char16_t* begin = result.extractOrCopyRawBuffer();
     if (!begin)
         return false;
 
     *name = AstName(begin, length);
--- a/js/src/asmjs/WasmBinaryToExperimentalText.cpp
+++ b/js/src/asmjs/WasmBinaryToExperimentalText.cpp
@@ -200,17 +200,17 @@ PrintInt64(WasmPrintContext& c, int64_t 
     while (n) {
         pow *= 10;
         n /= 10;
     }
     pow /= 10;
 
     n = abs;
     while (pow) {
-        if (!c.buffer.append((char16_t)(MOZ_UTF16('0') + n / pow)))
+        if (!c.buffer.append((char16_t)(u'0' + n / pow)))
             return false;
         n -= (n / pow) * pow;
         pow /= 10;
     }
 
     return true;
 }