| 83 | return "" |
| 84 | |
| 85 | def map_to_client(self, runtime_source_filename, lineno): |
| 86 | key = (lineno, "client", runtime_source_filename) |
| 87 | try: |
| 88 | return self._cache[key] |
| 89 | except KeyError: |
| 90 | for _, mapping in list(self._mappings_to_server.items()): |
| 91 | for map_entry in mapping: |
| 92 | if map_entry.runtime_source == runtime_source_filename: # <cell1> |
| 93 | if map_entry.contains_runtime_line(lineno): # matches line range |
| 94 | self._cache[key] = (map_entry.source_filename, map_entry.line + (lineno - map_entry.runtime_line), True) |
| 95 | return self._cache[key] |
| 96 | |
| 97 | self._cache[key] = (runtime_source_filename, lineno, False) # Mark that no translation happened in the cache. |
| 98 | return self._cache[key] |
| 99 | |
| 100 | def has_mapping_entry(self, runtime_source_filename): |
| 101 | """ |