Bug 1498320 - Create syntax and full parsers in bytecode compilation passing |SourceText::units()|, so that Utf8Unit appearing here will continue to require individualized treatment. r=tcampbell
authorJeff Walden <jwalden@mit.edu>
Fri, 26 Oct 2018 21:54:25 -0700
changeset 446434 ba4bdabbdd529c9d29357073b66b36ccf23caf74
parent 446433 ecf813f9f9ea656b973f79c25352e7f2727f6c0f
child 446435 774a0684f72479571a325c28442cb87bd1858c8a
push id109874
push userjwalden@mit.edu
push dateWed, 14 Nov 2018 23:38:56 +0000
treeherdermozilla-inbound@5b0d24759be6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1498320
milestone65.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 1498320 - Create syntax and full parsers in bytecode compilation passing |SourceText::units()|, so that Utf8Unit appearing here will continue to require individualized treatment. r=tcampbell
js/src/frontend/BytecodeCompiler.cpp
--- a/js/src/frontend/BytecodeCompiler.cpp
+++ b/js/src/frontend/BytecodeCompiler.cpp
@@ -557,28 +557,27 @@ SourceAwareCompiler<Unit>::createSourceA
     if (!info.assignSource(sourceBuffer_)) {
         return false;
     }
 
     info.createUsedNames();
 
     if (info.canLazilyParse()) {
         syntaxParser.emplace(info.cx, info.cx->tempLifoAlloc(), info.options,
-                             sourceBuffer_.get(), sourceBuffer_.length(),
+                             sourceBuffer_.units(), sourceBuffer_.length(),
                              /* foldConstants = */ false, *info.usedNames, nullptr, nullptr,
                              info.sourceObject, goal);
         if (!syntaxParser->checkOptions()) {
             return false;
         }
     }
 
     parser.emplace(info.cx, info.cx->tempLifoAlloc(), info.options,
-                   sourceBuffer_.get(), sourceBuffer_.length(),
-                   /* foldConstants = */ true, *info.usedNames, syntaxParser.ptrOr(nullptr),
-                   nullptr, info.sourceObject, goal);
+                   sourceBuffer_.units(), sourceBuffer_.length(), /* foldConstants = */ true,
+                   *info.usedNames, syntaxParser.ptrOr(nullptr), nullptr, info.sourceObject, goal);
     parser->ss = info.scriptSource;
     return parser->checkOptions();
 }
 
 bool
 BytecodeCompiler::internalCreateScript(uint32_t toStringStart, uint32_t toStringEnd,
                                        uint32_t sourceBufferLength)
 {