@@ -538,8 +538,8 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> {
538
538
Function* currFunction = nullptr ;
539
539
bool debug;
540
540
bool debugInfo = true ;
541
- std::ostream* binaryMap = nullptr ;
542
- std::string binaryMapUrl ;
541
+ std::ostream* sourceMap = nullptr ;
542
+ std::string sourceMapUrl ;
543
543
std::string symbolMap;
544
544
545
545
MixedArena allocator;
@@ -551,9 +551,9 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> {
551
551
}
552
552
553
553
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;
557
557
}
558
558
void setSymbolMap (std::string set) { symbolMap = set; }
559
559
@@ -593,8 +593,8 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> {
593
593
void writeSourceMapUrl ();
594
594
void writeSymbolMap ();
595
595
596
- void writeBinaryMapProlog ();
597
- void writeBinaryMapEpilog ();
596
+ void writeSourceMapProlog ();
597
+ void writeSourceMapEpilog ();
598
598
void writeDebugLocation (size_t offset, const Function::DebugLocation& loc);
599
599
600
600
// helpers
@@ -623,8 +623,8 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> {
623
623
size_t lastBytecodeOffset;
624
624
625
625
void visit (Expression* curr) {
626
- if (binaryMap && currFunction) {
627
- // Dump the binaryMap debug info
626
+ if (sourceMap && currFunction) {
627
+ // Dump the sourceMap debug info
628
628
auto & debugLocations = currFunction->debugLocations ;
629
629
auto iter = debugLocations.find (curr);
630
630
if (iter != debugLocations.end () && iter->second != lastDebugLocation) {
@@ -668,7 +668,7 @@ class WasmBinaryBuilder {
668
668
MixedArena& allocator;
669
669
std::vector<char >& input;
670
670
bool debug;
671
- std::istream* binaryMap ;
671
+ std::istream* sourceMap ;
672
672
std::pair<uint32_t , Function::DebugLocation> nextDebugLocation;
673
673
674
674
size_t pos = 0 ;
@@ -678,7 +678,7 @@ class WasmBinaryBuilder {
678
678
std::set<BinaryConsts::Section> seenSections;
679
679
680
680
public:
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 ) {}
682
682
683
683
void read ();
684
684
void readUserSection (size_t payloadLen);
@@ -768,13 +768,13 @@ class WasmBinaryBuilder {
768
768
void readNames (size_t );
769
769
770
770
// Debug information reading helpers
771
- void setDebugLocations (std::istream* binaryMap_ ) {
772
- binaryMap = binaryMap_ ;
771
+ void setDebugLocations (std::istream* sourceMap_ ) {
772
+ sourceMap = sourceMap_ ;
773
773
}
774
774
Function::DebugLocation debugLocation;
775
775
std::unordered_map<std::string, Index> debugInfoFileIndices;
776
776
void readNextDebugLocation ();
777
- void readBinaryMapHeader ();
777
+ void readSourceMapHeader ();
778
778
779
779
// AST reading
780
780
int depth = 0 ; // only for debugging
0 commit comments