Unified · Split
| @@ -17,7 +17,7 @@ char: <int> · 16 unmodified lines | ||
| 17 | 17 | |
| 18 | 18 | type-table: <count> '\n' type* |
| 19 | 19 | type: |
| 20 | − '@' type-index '\n' # Type table reference | |
| 20 | + '@' type-index '\n' # Type table reference | |
| 21 | 21 | 'a' adt-item # ADT |
| 22 | 22 | 'p' adt-item tag-table # ADT-Pick |
| 23 | 23 | 't' size '.' id-table # Tuple |
| @@ -243,7 +243,7 @@ namespace · 242 unmodified lines | ||
| 243 | 243 | source_ref_t src; |
| 244 | 244 | |
| 245 | 245 | // Initialize the source with the last state |
| 246 | − src.source_id = fc.last_file; | |
| 246 | + src.begin_source_id = fc.last_file; | |
| 247 | 247 | src.begin_line = fc.last_line; |
| 248 | 248 | src.end_line = fc.last_line; |
| 249 | 249 | for (auto i = std::size_t{ 0 }; i < src_parts.size(); ++i) |
| @@ -274,8 +274,10 @@ namespace · 24 unmodified lines | ||
| 274 | 274 | } |
| 275 | 275 | else if (pos[j] == ':') |
| 276 | 276 | { |
| 277 | − assert((i == 0 || src.source_id == v) && "Source position should not change across statements"); | |
| 278 | − src.source_id = v; | |
| 277 | + if (i == 0) | |
| 278 | + src.begin_source_id = v; | |
| 279 | + | |
| 280 | + src.end_source_id = v; | |
| 279 | 281 | fc.last_file = v; |
| 280 | 282 | } |
| 281 | 283 | } |
| @@ -310,7 +312,7 @@ namespace · 28 unmodified lines | ||
| 310 | 312 | curr_item.debug_statement = std::stoi(pc_item_parts[1]); |
| 311 | 313 | |
| 312 | 314 | // Record the current source and line ID since those are the new default values |
| 313 | − last_source = curr_item.source.source_id; | |
| 315 | + last_source = curr_item.source.end_source_id; | |
| 314 | 316 | last_line = curr_item.source.end_line; |
| 315 | 317 | |
| 316 | 318 | pc_table[i] = std::move(curr_item); |
| @@ -1064,7 +1064,7 @@ std::vector<std::string> debugger::resolve_to_function_source_line( · 1063 unmodified lines | ||
| 1064 | 1064 | ss << function_name << " at "; |
| 1065 | 1065 | |
| 1066 | 1066 | const auto source_loc = d.current_source_location(); |
| 1067 | − ss << d.get_source_by_id(source_loc.source_id) | |
| 1067 | + ss << d.get_source_by_id(source_loc.begin_source_id) | |
| 1068 | 1068 | << ':' |
| 1069 | 1069 | << source_loc.begin_line; |
| 1070 | 1070 | |
| @@ -64,9 +64,10 @@ namespace disvm · 63 unmodified lines | ||
| 64 | 64 | // Reference into source code |
| 65 | 65 | struct source_ref_t |
| 66 | 66 | { |
| 67 | − int32_t source_id; | |
| 67 | + int32_t begin_source_id; | |
| 68 | 68 | int32_t begin_line; |
| 69 | 69 | int32_t begin_column; |
| 70 | + int32_t end_source_id; | |
| 70 | 71 | int32_t end_line; |
| 71 | 72 | int32_t end_column; |
| 72 | 73 | }; |