From 8033b3a789ae28f68e8cb75e18aafa02db20d435 Mon Sep 17 00:00:00 2001 From: Matthew Gaudet Date: Mon, 2 Dec 2019 16:53:23 +0000 Subject: [PATCH] Bug 1600160 - Rename buf{End,Start} to source{End,start} in FunctionBox to match BaseScript r=tcampbell Differential Revision: https://phabricator.services.mozilla.com/D55197 --HG-- extra : moz-landing-system : lando --- js/src/frontend/BytecodeEmitter.cpp | 6 +++--- js/src/frontend/Parser.cpp | 2 +- js/src/frontend/SharedContext.cpp | 4 ++-- js/src/frontend/SharedContext.h | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index edeb7adbb1bf..df47ba225db7 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -5736,9 +5736,9 @@ MOZ_NEVER_INLINE bool BytecodeEmitter::emitFunction( Rooted sourceObject(cx, script->sourceObject()); RootedFunction fun(cx, funbox->function()); RootedScript innerScript( - cx, JSScript::Create(cx, fun, options, sourceObject, funbox->bufStart, - funbox->bufEnd, funbox->toStringStart, - funbox->toStringEnd)); + cx, JSScript::Create(cx, fun, options, sourceObject, + funbox->sourceStart, funbox->sourceEnd, + funbox->toStringStart, funbox->toStringEnd)); if (!innerScript) { return false; } diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index e00236535d29..a43391fd01ad 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -1840,7 +1840,7 @@ static bool EmitLazyScript(JSContext* cx, FunctionBox* funbox, MOZ_ASSERT(function); LazyScript* lazy = LazyScript::Create( cx, function, sourceObject, data.closedOverBindings, - data.innerFunctionBoxes, funbox->bufStart, funbox->bufEnd, + data.innerFunctionBoxes, funbox->sourceStart, funbox->sourceEnd, funbox->toStringStart, funbox->toStringEnd, funbox->startLine, funbox->startColumn, parseGoal); if (!lazy) { diff --git a/js/src/frontend/SharedContext.cpp b/js/src/frontend/SharedContext.cpp index ede1a228f4e7..698008df5d84 100644 --- a/js/src/frontend/SharedContext.cpp +++ b/js/src/frontend/SharedContext.cpp @@ -129,8 +129,8 @@ FunctionBox::FunctionBox(JSContext* cx, TraceListNode* traceListHead, functionScopeBindings_(nullptr), extraVarScopeBindings_(nullptr), functionNode(nullptr), - bufStart(0), - bufEnd(0), + sourceStart(0), + sourceEnd(0), startLine(1), startColumn(0), toStringStart(toStringStart), diff --git a/js/src/frontend/SharedContext.h b/js/src/frontend/SharedContext.h index 953d3fe521fb..9e0bc2db6393 100644 --- a/js/src/frontend/SharedContext.h +++ b/js/src/frontend/SharedContext.h @@ -342,8 +342,8 @@ class FunctionBox : public ObjectBox, public SharedContext { // Back pointer used by asm.js for error messages. FunctionNode* functionNode; - uint32_t bufStart; - uint32_t bufEnd; + uint32_t sourceStart; + uint32_t sourceEnd; uint32_t startLine; uint32_t startColumn; uint32_t toStringStart; @@ -702,7 +702,7 @@ class FunctionBox : public ObjectBox, public SharedContext { bool useAsmOrInsideUseAsm() const { return useAsm; } void setStart(uint32_t offset, uint32_t line, uint32_t column) { - bufStart = offset; + sourceStart = offset; startLine = line; startColumn = column; } @@ -711,7 +711,7 @@ class FunctionBox : public ObjectBox, public SharedContext { // For all functions except class constructors, the buffer and // toString ending positions are the same. Class constructors override // the toString ending position with the end of the class definition. - bufEnd = toStringEnd = end; + sourceEnd = toStringEnd = end; } void setArgCount(uint16_t args) { nargs_ = args; }