Przeglądaj źródła

LibJS: Remove expensive dead code in get_source_range

This was forgotten when cleaning up debug prints but has a huge
performance impact (around 1s / 15% on test-js).
Simon Wanner 1 rok temu
rodzic
commit
969d9e1fd3
1 zmienionych plików z 1 dodań i 3 usunięć
  1. 1 3
      Userland/Libraries/LibJS/Runtime/VM.cpp

+ 1 - 3
Userland/Libraries/LibJS/Runtime/VM.cpp

@@ -1174,10 +1174,8 @@ static Optional<UnrealizedSourceRange> get_source_range(ExecutionContext const*
     // JIT frame
     for (auto address : native_stack) {
         auto range = native_executable->get_source_range(*context->executable, address);
-        if (range.has_value()) {
-            auto realized = range->realize();
+        if (range.has_value())
             return range;
-        }
     }
 
     return {};