diff --git a/es2panda/aot/emitFiles.cpp b/es2panda/aot/emitFiles.cpp index d599c6ea15b4e6a0a1773c1244ffde09d5b53408..4ba9646a554f0cbf1ce70631a2376bab92a26327 100644 --- a/es2panda/aot/emitFiles.cpp +++ b/es2panda/aot/emitFiles.cpp @@ -33,7 +33,7 @@ void EmitFileQueue::ScheduleEmitCacheJobs(EmitMergedAbcJob *emitMergedAbcJob) auto outputCacheIter = options_->CompilerOptions().cacheFiles.find(info.first); if (outputCacheIter != options_->CompilerOptions().cacheFiles.end()) { auto emitProtoJob = new EmitCacheJob(outputCacheIter->second, info.second); - emitProtoJob->DependsOn(emitMergedAbcJob); + emitMergedAbcJob->DependsOn(emitProtoJob); jobs_.push_back(emitProtoJob); jobsCount_++; } @@ -46,6 +46,12 @@ void EmitFileQueue::Schedule() std::unique_lock lock(m_); auto targetApi = options_->CompilerOptions().targetApiVersion; auto targetSubApi = options_->CompilerOptions().targetApiSubVersion; + for (auto &[name, progCache] : progsInfo_) { + panda::pandasm::MakeSlotNumberRecord(&(progCache->program)); + panda::pandasm::MakeSlotNumberAnnotation(&(progCache->program)); + panda::pandasm::MakeConcurrentModuleRequestsRecord(&(progCache->program)); + panda::pandasm::MakeConcurrentModuleRequestsAnnotation(&(progCache->program)); + } if (mergeAbc_) { // generate merged abc @@ -93,6 +99,8 @@ void EmitSingleAbcJob::Run() void EmitMergedAbcJob::Run() { + std::unique_lock lock(m_); + cond_.wait(lock, [this] { return dependencies_ == 0; }); std::vector progs; progs.reserve(progsInfo_.size()); for (const auto &info: progsInfo_) { @@ -103,10 +111,6 @@ void EmitMergedAbcJob::Run() panda::os::file::File::GetExtendedFilePath(outputFileName_), progs, true, targetApiVersion_, targetApiSubVersion_); - for (auto *dependant : dependants_) { - dependant->Signal(); - } - if (!success) { throw Error(ErrorType::GENERIC, "Failed to emit " + outputFileName_ + ", error: " + panda::pandasm::AsmEmitter::GetLastError() + @@ -121,9 +125,10 @@ void EmitMergedAbcJob::Run() void EmitCacheJob::Run() { - std::unique_lock lock(m_); - cond_.wait(lock, [this] { return dependencies_ == 0; }); panda::proto::ProtobufSnapshotGenerator::UpdateCacheFile(progCache_, outputProtoName_); + for (auto *dependant : dependants_) { + dependant->Signal(); + } } } // namespace panda::es2panda::util diff --git a/es2panda/aot/main.cpp b/es2panda/aot/main.cpp index 534b50ef72b907b28e729648e03c2f5bb9effb50..50c32f707abd1d7541901c9f8cb60502c0a3a462 100644 --- a/es2panda/aot/main.cpp +++ b/es2panda/aot/main.cpp @@ -172,6 +172,8 @@ static bool GenerateProgram(std::mapsecond->program); + panda::pandasm::MakeSlotNumberRecord(prog); + panda::pandasm::MakeSlotNumberAnnotation(prog); if (options->OutputFiles().empty() && options->CompilerOutput().empty()) { GenerateBase64Output(prog, options); return true; diff --git a/es2panda/compiler/debugger/debuginfoDumper.cpp b/es2panda/compiler/debugger/debuginfoDumper.cpp index a707a32ee0ce3d08a2bdb06f4138a642767f3e94..cc15388e75634943c1efca169b6cf43c4de604b7 100644 --- a/es2panda/compiler/debugger/debuginfoDumper.cpp +++ b/es2panda/compiler/debugger/debuginfoDumper.cpp @@ -136,8 +136,7 @@ void DebugInfoDumper::WritePosInfo(const pandasm::debuginfo::Ins &posInfo) ss_ << "\"debug_pos_info\": {"; WriteProperty("boundLeft", posInfo.bound_left); WriteProperty("boundRight", posInfo.bound_right); - WriteProperty("sourceLineNum", static_cast(posInfo.line_number)); - WriteProperty("wholeLine", posInfo.whole_line, false); + WriteProperty("sourceLineNum", static_cast(posInfo.line_number), false); Indent(); ss_ << "}" << std::endl; } diff --git a/es2panda/parser/program/program.cpp b/es2panda/parser/program/program.cpp index 39960fbb8c8542aef027acd5a45c1ab09b40bc1d..36b9f5e87e11a30599d559e6a965ad8a51b8fc95 100644 --- a/es2panda/parser/program/program.cpp +++ b/es2panda/parser/program/program.cpp @@ -39,7 +39,7 @@ Program::Program(Program &&other) formatedRecordName_(other.formatedRecordName_), kind_(other.kind_), extension_(other.extension_), - lineIndex_(other.lineIndex_), + lineIndex_(std::move(other.lineIndex_)), moduleRecord_(other.moduleRecord_), typeModuleRecord_(other.typeModuleRecord_), patchFixHelper_(other.patchFixHelper_), diff --git a/es2panda/test/compiler/debugInfo/test-for-loop-expected.txt b/es2panda/test/compiler/debugInfo/test-for-loop-expected.txt index 9bf634b4569a15df1630ffec8aef9e7d94beeda2..e3d0b1467f2c9ccbcecbdd095b78481acd185e64 100644 --- a/es2panda/test/compiler/debugInfo/test-for-loop-expected.txt +++ b/es2panda/test/compiler/debugInfo/test-for-loop-expected.txt @@ -23,8 +23,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 1, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } }, { @@ -39,8 +38,7 @@ "debug_pos_info": { "boundLeft": 1, "boundRight": 2, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } }, { @@ -55,8 +53,7 @@ "debug_pos_info": { "boundLeft": 2, "boundRight": 3, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } }, { @@ -70,8 +67,7 @@ "debug_pos_info": { "boundLeft": 3, "boundRight": 8, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -85,8 +81,7 @@ "debug_pos_info": { "boundLeft": 8, "boundRight": 10, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -98,8 +93,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -113,8 +107,7 @@ "debug_pos_info": { "boundLeft": 10, "boundRight": 12, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -128,8 +121,7 @@ "debug_pos_info": { "boundLeft": 12, "boundRight": 14, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -143,8 +135,7 @@ "debug_pos_info": { "boundLeft": 14, "boundRight": 19, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -160,8 +151,7 @@ "debug_pos_info": { "boundLeft": 19, "boundRight": 22, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -175,8 +165,7 @@ "debug_pos_info": { "boundLeft": 22, "boundRight": 24, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -190,8 +179,7 @@ "debug_pos_info": { "boundLeft": 24, "boundRight": 29, - "sourceLineNum": 16, - "wholeLine": "" + "sourceLineNum": 16 } }, { @@ -205,8 +193,7 @@ "debug_pos_info": { "boundLeft": 29, "boundRight": 31, - "sourceLineNum": 16, - "wholeLine": "" + "sourceLineNum": 16 } }, { @@ -220,8 +207,7 @@ "debug_pos_info": { "boundLeft": 31, "boundRight": 34, - "sourceLineNum": 17, - "wholeLine": "" + "sourceLineNum": 17 } }, { @@ -233,8 +219,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -248,8 +233,7 @@ "debug_pos_info": { "boundLeft": 34, "boundRight": 36, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -263,8 +247,7 @@ "debug_pos_info": { "boundLeft": 36, "boundRight": 38, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -278,8 +261,7 @@ "debug_pos_info": { "boundLeft": 38, "boundRight": 40, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -293,8 +275,7 @@ "debug_pos_info": { "boundLeft": 40, "boundRight": 42, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -308,8 +289,7 @@ "debug_pos_info": { "boundLeft": 42, "boundRight": 44, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -323,8 +303,7 @@ "debug_pos_info": { "boundLeft": 44, "boundRight": 46, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -338,8 +317,7 @@ "debug_pos_info": { "boundLeft": 46, "boundRight": 48, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -353,8 +331,7 @@ "debug_pos_info": { "boundLeft": 48, "boundRight": 50, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -368,8 +345,7 @@ "debug_pos_info": { "boundLeft": 50, "boundRight": 52, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -383,8 +359,7 @@ "debug_pos_info": { "boundLeft": 52, "boundRight": 54, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -396,8 +371,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -411,8 +385,7 @@ "debug_pos_info": { "boundLeft": 54, "boundRight": 59, - "sourceLineNum": 19, - "wholeLine": "" + "sourceLineNum": 19 } }, { @@ -428,8 +401,7 @@ "debug_pos_info": { "boundLeft": 59, "boundRight": 64, - "sourceLineNum": 19, - "wholeLine": "" + "sourceLineNum": 19 } }, { @@ -443,8 +415,7 @@ "debug_pos_info": { "boundLeft": 64, "boundRight": 69, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -458,8 +429,7 @@ "debug_pos_info": { "boundLeft": 69, "boundRight": 71, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -471,8 +441,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -486,8 +455,7 @@ "debug_pos_info": { "boundLeft": 71, "boundRight": 73, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -501,8 +469,7 @@ "debug_pos_info": { "boundLeft": 73, "boundRight": 75, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -516,8 +483,7 @@ "debug_pos_info": { "boundLeft": 75, "boundRight": 80, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -533,8 +499,7 @@ "debug_pos_info": { "boundLeft": 80, "boundRight": 83, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -548,8 +513,7 @@ "debug_pos_info": { "boundLeft": 83, "boundRight": 85, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -563,8 +527,7 @@ "debug_pos_info": { "boundLeft": 85, "boundRight": 90, - "sourceLineNum": 21, - "wholeLine": "" + "sourceLineNum": 21 } }, { @@ -578,8 +541,7 @@ "debug_pos_info": { "boundLeft": 90, "boundRight": 92, - "sourceLineNum": 21, - "wholeLine": "" + "sourceLineNum": 21 } }, { @@ -595,8 +557,7 @@ "debug_pos_info": { "boundLeft": 92, "boundRight": 96, - "sourceLineNum": 22, - "wholeLine": "" + "sourceLineNum": 22 } }, { @@ -610,8 +571,7 @@ "debug_pos_info": { "boundLeft": 96, "boundRight": 98, - "sourceLineNum": 22, - "wholeLine": "" + "sourceLineNum": 22 } }, { @@ -625,8 +585,7 @@ "debug_pos_info": { "boundLeft": 98, "boundRight": 100, - "sourceLineNum": 22, - "wholeLine": "" + "sourceLineNum": 22 } }, { @@ -640,8 +599,7 @@ "debug_pos_info": { "boundLeft": 100, "boundRight": 102, - "sourceLineNum": 22, - "wholeLine": "" + "sourceLineNum": 22 } }, { @@ -655,8 +613,7 @@ "debug_pos_info": { "boundLeft": 102, "boundRight": 104, - "sourceLineNum": 22, - "wholeLine": "" + "sourceLineNum": 22 } }, { @@ -672,8 +629,7 @@ "debug_pos_info": { "boundLeft": 104, "boundRight": 107, - "sourceLineNum": 22, - "wholeLine": "" + "sourceLineNum": 22 } }, { @@ -685,8 +641,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 19, - "wholeLine": "" + "sourceLineNum": 19 } }, { @@ -700,8 +655,7 @@ "debug_pos_info": { "boundLeft": 107, "boundRight": 109, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -715,8 +669,7 @@ "debug_pos_info": { "boundLeft": 109, "boundRight": 111, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -730,8 +683,7 @@ "debug_pos_info": { "boundLeft": 111, "boundRight": 113, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -745,8 +697,7 @@ "debug_pos_info": { "boundLeft": 113, "boundRight": 115, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -760,8 +711,7 @@ "debug_pos_info": { "boundLeft": 115, "boundRight": 117, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -775,8 +725,7 @@ "debug_pos_info": { "boundLeft": 117, "boundRight": 119, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -790,8 +739,7 @@ "debug_pos_info": { "boundLeft": 119, "boundRight": 121, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -805,8 +753,7 @@ "debug_pos_info": { "boundLeft": 121, "boundRight": 123, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -820,8 +767,7 @@ "debug_pos_info": { "boundLeft": 123, "boundRight": 125, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -835,8 +781,7 @@ "debug_pos_info": { "boundLeft": 125, "boundRight": 127, - "sourceLineNum": 20, - "wholeLine": "" + "sourceLineNum": 20 } }, { @@ -848,8 +793,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 19, - "wholeLine": "" + "sourceLineNum": 19 } }, { @@ -863,8 +807,7 @@ "debug_pos_info": { "boundLeft": 127, "boundRight": 132, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -878,8 +821,7 @@ "debug_pos_info": { "boundLeft": 132, "boundRight": 134, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -891,8 +833,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -906,8 +847,7 @@ "debug_pos_info": { "boundLeft": 134, "boundRight": 136, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -921,8 +861,7 @@ "debug_pos_info": { "boundLeft": 136, "boundRight": 138, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -936,8 +875,7 @@ "debug_pos_info": { "boundLeft": 138, "boundRight": 143, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -953,8 +891,7 @@ "debug_pos_info": { "boundLeft": 143, "boundRight": 146, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -968,8 +905,7 @@ "debug_pos_info": { "boundLeft": 146, "boundRight": 148, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -983,8 +919,7 @@ "debug_pos_info": { "boundLeft": 148, "boundRight": 153, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -998,8 +933,7 @@ "debug_pos_info": { "boundLeft": 153, "boundRight": 155, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1011,8 +945,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1026,8 +959,7 @@ "debug_pos_info": { "boundLeft": 155, "boundRight": 157, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1041,8 +973,7 @@ "debug_pos_info": { "boundLeft": 157, "boundRight": 159, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1056,8 +987,7 @@ "debug_pos_info": { "boundLeft": 159, "boundRight": 164, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1073,8 +1003,7 @@ "debug_pos_info": { "boundLeft": 164, "boundRight": 167, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1088,8 +1017,7 @@ "debug_pos_info": { "boundLeft": 167, "boundRight": 169, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1103,8 +1031,7 @@ "debug_pos_info": { "boundLeft": 169, "boundRight": 174, - "sourceLineNum": 26, - "wholeLine": "" + "sourceLineNum": 26 } }, { @@ -1118,8 +1045,7 @@ "debug_pos_info": { "boundLeft": 174, "boundRight": 176, - "sourceLineNum": 26, - "wholeLine": "" + "sourceLineNum": 26 } }, { @@ -1131,8 +1057,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1146,8 +1071,7 @@ "debug_pos_info": { "boundLeft": 176, "boundRight": 178, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1161,8 +1085,7 @@ "debug_pos_info": { "boundLeft": 178, "boundRight": 180, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1176,8 +1099,7 @@ "debug_pos_info": { "boundLeft": 180, "boundRight": 182, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1191,8 +1113,7 @@ "debug_pos_info": { "boundLeft": 182, "boundRight": 184, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1206,8 +1127,7 @@ "debug_pos_info": { "boundLeft": 184, "boundRight": 186, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1221,8 +1141,7 @@ "debug_pos_info": { "boundLeft": 186, "boundRight": 188, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1236,8 +1155,7 @@ "debug_pos_info": { "boundLeft": 188, "boundRight": 190, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1251,8 +1169,7 @@ "debug_pos_info": { "boundLeft": 190, "boundRight": 192, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1266,8 +1183,7 @@ "debug_pos_info": { "boundLeft": 192, "boundRight": 194, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1281,8 +1197,7 @@ "debug_pos_info": { "boundLeft": 194, "boundRight": 196, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -1294,8 +1209,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1307,8 +1221,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 19, - "wholeLine": "" + "sourceLineNum": 19 } }, { @@ -1322,8 +1235,7 @@ "debug_pos_info": { "boundLeft": 196, "boundRight": 198, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1337,8 +1249,7 @@ "debug_pos_info": { "boundLeft": 198, "boundRight": 200, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1352,8 +1263,7 @@ "debug_pos_info": { "boundLeft": 200, "boundRight": 202, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1367,8 +1277,7 @@ "debug_pos_info": { "boundLeft": 202, "boundRight": 204, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1382,8 +1291,7 @@ "debug_pos_info": { "boundLeft": 204, "boundRight": 206, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1397,8 +1305,7 @@ "debug_pos_info": { "boundLeft": 206, "boundRight": 208, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1412,8 +1319,7 @@ "debug_pos_info": { "boundLeft": 208, "boundRight": 210, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1427,8 +1333,7 @@ "debug_pos_info": { "boundLeft": 210, "boundRight": 212, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1442,8 +1347,7 @@ "debug_pos_info": { "boundLeft": 212, "boundRight": 214, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1457,8 +1361,7 @@ "debug_pos_info": { "boundLeft": 214, "boundRight": 216, - "sourceLineNum": 24, - "wholeLine": "" + "sourceLineNum": 24 } }, { @@ -1470,8 +1373,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": 19, - "wholeLine": "" + "sourceLineNum": 19 } }, { @@ -1483,8 +1385,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } }, { @@ -1496,8 +1397,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } } ], diff --git a/es2panda/test/compiler/debugInfo/test-local-variable-expected.txt b/es2panda/test/compiler/debugInfo/test-local-variable-expected.txt index 84d0cabc59e2ff4217e1fa14a4aa7c14fa2562f1..45bf848613691c2bb6e027ea953ed5190a5ae952 100644 --- a/es2panda/test/compiler/debugInfo/test-local-variable-expected.txt +++ b/es2panda/test/compiler/debugInfo/test-local-variable-expected.txt @@ -23,8 +23,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 1, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } }, { @@ -39,8 +38,7 @@ "debug_pos_info": { "boundLeft": 1, "boundRight": 2, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } }, { @@ -55,8 +53,7 @@ "debug_pos_info": { "boundLeft": 2, "boundRight": 3, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } }, { @@ -70,8 +67,7 @@ "debug_pos_info": { "boundLeft": 3, "boundRight": 8, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -87,8 +83,7 @@ "debug_pos_info": { "boundLeft": 8, "boundRight": 13, - "sourceLineNum": 15, - "wholeLine": "" + "sourceLineNum": 15 } }, { @@ -102,8 +97,7 @@ "debug_pos_info": { "boundLeft": 13, "boundRight": 18, - "sourceLineNum": 17, - "wholeLine": "" + "sourceLineNum": 17 } }, { @@ -117,8 +111,7 @@ "debug_pos_info": { "boundLeft": 18, "boundRight": 20, - "sourceLineNum": 17, - "wholeLine": "" + "sourceLineNum": 17 } }, { @@ -132,8 +125,7 @@ "debug_pos_info": { "boundLeft": 20, "boundRight": 23, - "sourceLineNum": 18, - "wholeLine": "" + "sourceLineNum": 18 } }, { @@ -147,8 +139,7 @@ "debug_pos_info": { "boundLeft": 23, "boundRight": 28, - "sourceLineNum": 22, - "wholeLine": "" + "sourceLineNum": 22 } }, { @@ -162,8 +153,7 @@ "debug_pos_info": { "boundLeft": 28, "boundRight": 30, - "sourceLineNum": 22, - "wholeLine": "" + "sourceLineNum": 22 } }, { @@ -177,8 +167,7 @@ "debug_pos_info": { "boundLeft": 30, "boundRight": 33, - "sourceLineNum": 23, - "wholeLine": "" + "sourceLineNum": 23 } }, { @@ -192,8 +181,7 @@ "debug_pos_info": { "boundLeft": 33, "boundRight": 38, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -207,8 +195,7 @@ "debug_pos_info": { "boundLeft": 38, "boundRight": 40, - "sourceLineNum": 25, - "wholeLine": "" + "sourceLineNum": 25 } }, { @@ -222,8 +209,7 @@ "debug_pos_info": { "boundLeft": 40, "boundRight": 45, - "sourceLineNum": 27, - "wholeLine": "" + "sourceLineNum": 27 } }, { @@ -237,8 +223,7 @@ "debug_pos_info": { "boundLeft": 45, "boundRight": 47, - "sourceLineNum": 27, - "wholeLine": "" + "sourceLineNum": 27 } }, { @@ -250,8 +235,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } }, { @@ -263,8 +247,7 @@ "debug_pos_info": { "boundLeft": 0, "boundRight": 0, - "sourceLineNum": -1, - "wholeLine": "" + "sourceLineNum": -1 } } ], diff --git a/merge_abc/src/assemblyDebugProto.cpp b/merge_abc/src/assemblyDebugProto.cpp index 443d4a2d8011967dc935a91f70f7d21aaa7b8800..5fad0e562a1545a848a4130a518b9e0f23a7c32d 100644 --- a/merge_abc/src/assemblyDebugProto.cpp +++ b/merge_abc/src/assemblyDebugProto.cpp @@ -20,7 +20,6 @@ void DebuginfoIns::Serialize(const panda::pandasm::debuginfo::Ins &debug, protoP { protoDebug.set_linenumber(debug.line_number); protoDebug.set_columnnumber(debug.column_number); - protoDebug.set_wholeline(debug.whole_line); protoDebug.set_boundleft(debug.bound_left); protoDebug.set_boundright(debug.bound_right); } @@ -29,7 +28,6 @@ void DebuginfoIns::Deserialize(const protoPanda::DebuginfoIns &protoDebug, panda { debug.line_number = protoDebug.linenumber(); debug.column_number = protoDebug.columnnumber(); - debug.whole_line = protoDebug.wholeline(); debug.bound_left = protoDebug.boundleft(); debug.bound_right = protoDebug.boundright(); } diff --git a/merge_abc/src/assemblyFunctionProto.cpp b/merge_abc/src/assemblyFunctionProto.cpp index 18d4ec726e7efe5e063cbe54921f178bd662ca3b..6e489737e5762ca9a75367cd15c3d509e918e38c 100644 --- a/merge_abc/src/assemblyFunctionProto.cpp +++ b/merge_abc/src/assemblyFunctionProto.cpp @@ -41,14 +41,6 @@ void Parameter::Serialize(const panda::pandasm::Function::Parameter ¶m, prot { auto *type = protoParam.mutable_type(); Type::Serialize(param.type, *type); - auto *metadata = protoParam.mutable_metadata(); - ParamMetadata::Serialize(*(param.metadata), *metadata); -} - -void Parameter::Deserialize(const protoPanda::Parameter &protoParam, panda::pandasm::Function::Parameter ¶m, - panda::ArenaAllocator *allocator) -{ - ParamMetadata::Deserialize(protoParam.metadata(), param.metadata, allocator); } void Function::Serialize(const panda::pandasm::Function &function, protoPanda::Function &protoFunction) @@ -175,7 +167,6 @@ void Function::Deserialize(const protoPanda::Function &protoFunction, panda::pan for (const auto &protoParam : protoFunction.params()) { auto ¶mType = Type::Deserialize(protoParam.type(), allocator); panda::pandasm::Function::Parameter param(paramType, panda::panda_file::SourceLang::ECMASCRIPT); - Parameter::Deserialize(protoParam, param, allocator); function.params.emplace_back(std::move(param)); } diff --git a/merge_abc/src/assemblyFunctionProto.h b/merge_abc/src/assemblyFunctionProto.h index 9c3c62681679928d64bca729f4db8fc4c51b2692..d07563930a7a50b6d465f1151ea5125e04719dcc 100644 --- a/merge_abc/src/assemblyFunctionProto.h +++ b/merge_abc/src/assemblyFunctionProto.h @@ -37,8 +37,6 @@ public: class Parameter { public: static void Serialize(const panda::pandasm::Function::Parameter ¶m, protoPanda::Parameter &protoParam); - static void Deserialize(const protoPanda::Parameter &protoParam, panda::pandasm::Function::Parameter ¶m, - panda::ArenaAllocator *allocator); }; class Function {