@@ -538,8 +538,8 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> {
538538 Function* currFunction = nullptr ;
539539 bool debug;
540540 bool debugInfo = true ;
541- std::ostream* binaryMap = nullptr ;
542- std::string binaryMapUrl ;
541+ std::ostream* sourceMap = nullptr ;
542+ std::string sourceMapUrl ;
543543 std::string symbolMap;
544544
545545 MixedArena allocator;
@@ -551,9 +551,9 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> {
551551 }
552552
553553 void setNamesSection (bool set) { debugInfo = set; }
554- void setBinaryMap (std::ostream* set, std::string url) {
555- binaryMap = set;
556- binaryMapUrl = url;
554+ void setSourceMap (std::ostream* set, std::string url) {
555+ sourceMap = set;
556+ sourceMapUrl = url;
557557 }
558558 void setSymbolMap (std::string set) { symbolMap = set; }
559559
@@ -593,8 +593,8 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> {
593593 void writeSourceMapUrl ();
594594 void writeSymbolMap ();
595595
596- void writeBinaryMapProlog ();
597- void writeBinaryMapEpilog ();
596+ void writeSourceMapProlog ();
597+ void writeSourceMapEpilog ();
598598 void writeDebugLocation (size_t offset, const Function::DebugLocation& loc);
599599
600600 // helpers
@@ -623,8 +623,8 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> {
623623 size_t lastBytecodeOffset;
624624
625625 void visit (Expression* curr) {
626- if (binaryMap && currFunction) {
627- // Dump the binaryMap debug info
626+ if (sourceMap && currFunction) {
627+ // Dump the sourceMap debug info
628628 auto & debugLocations = currFunction->debugLocations ;
629629 auto iter = debugLocations.find (curr);
630630 if (iter != debugLocations.end () && iter->second != lastDebugLocation) {
@@ -668,7 +668,7 @@ class WasmBinaryBuilder {
668668 MixedArena& allocator;
669669 std::vector<char >& input;
670670 bool debug;
671- std::istream* binaryMap ;
671+ std::istream* sourceMap ;
672672 std::pair<uint32_t , Function::DebugLocation> nextDebugLocation;
673673
674674 size_t pos = 0 ;
@@ -678,7 +678,7 @@ class WasmBinaryBuilder {
678678 std::set<BinaryConsts::Section> seenSections;
679679
680680public:
681- WasmBinaryBuilder (Module& wasm, std::vector<char >& input, bool debug) : wasm(wasm), allocator(wasm.allocator), input(input), debug(debug), binaryMap (nullptr ), nextDebugLocation(0 , { 0 , 0 , 0 }), useDebugLocation(false ) {}
681+ WasmBinaryBuilder (Module& wasm, std::vector<char >& input, bool debug) : wasm(wasm), allocator(wasm.allocator), input(input), debug(debug), sourceMap (nullptr ), nextDebugLocation(0 , { 0 , 0 , 0 }), useDebugLocation(false ) {}
682682
683683 void read ();
684684 void readUserSection (size_t payloadLen);
@@ -768,13 +768,13 @@ class WasmBinaryBuilder {
768768 void readNames (size_t );
769769
770770 // Debug information reading helpers
771- void setDebugLocations (std::istream* binaryMap_ ) {
772- binaryMap = binaryMap_ ;
771+ void setDebugLocations (std::istream* sourceMap_ ) {
772+ sourceMap = sourceMap_ ;
773773 }
774774 Function::DebugLocation debugLocation;
775775 std::unordered_map<std::string, Index> debugInfoFileIndices;
776776 void readNextDebugLocation ();
777- void readBinaryMapHeader ();
777+ void readSourceMapHeader ();
778778
779779 // AST reading
780780 int depth = 0 ; // only for debugging
0 commit comments