From 72cccd08c7a3462072b8ae5aea1576f010bf12c0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 29 Apr 2015 23:55:51 -0700 Subject: 1225 Finally start tracing the actual instructions as they run. --- .../string-equal-common-lengths-but-distinct | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'cpp/.traces/string-equal-common-lengths-but-distinct') diff --git a/cpp/.traces/string-equal-common-lengths-but-distinct b/cpp/.traces/string-equal-common-lengths-but-distinct index 3decd91b..c74e78bf 100644 --- a/cpp/.traces/string-equal-common-lengths-but-distinct +++ b/cpp/.traces/string-equal-common-lengths-but-distinct @@ -25,33 +25,44 @@ after-brace/0: string-equal ... new/0: routine allocated memory from 1000 to 101000 schedule/0: test-string-equal-common-lengths-but-distinct run/0: instruction test-string-equal-common-lengths-but-distinct/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]} mem/0: array size is 30 mem/0: new alloc: 1000 run/0: instruction test-string-equal-common-lengths-but-distinct/1 +run/0: {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]} <- new {name: "abc", value: 0, type: 0, properties: ["abc": "literal-string"]} mem/0: storing 1030 in location 1002 run/0: instruction test-string-equal-common-lengths-but-distinct/2 +run/0: {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} <- new {name: "abd", value: 0, type: 0, properties: ["abd": "literal-string"]} mem/0: storing 1034 in location 1003 run/0: instruction test-string-equal-common-lengths-but-distinct/3 +run/0: {name: "3", value: 3, type: 3, properties: ["3": "boolean", "raw": ]} <- string-equal {name: "x", value: 1, type: 2-5-4, properties: ["x": "address":"array":"character"]}, {name: "y", value: 2, type: 2-5-4, properties: ["y": "address":"array":"character"]} mem/0: location 1002 is 1030 mem/0: location 1003 is 1034 run/0: instruction string-equal/0 +run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]} mem/0: array size is 30 mem/0: new alloc: 1038 run/0: instruction string-equal/1 +run/0: {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1030 mem/0: storing 1030 in location 1040 run/0: instruction string-equal/2 +run/0: {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} <- length {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 mem/0: storing 3 in location 1041 run/0: instruction string-equal/3 +run/0: {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character"]} <- next-ingredient run/0: product 0 is 1034 mem/0: storing 1034 in location 1042 run/0: instruction string-equal/4 +run/0: {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} <- length {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 mem/0: storing 3 in location 1043 run/0: instruction string-equal/6 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing lengths", value: 0, type: 0, properties: ["comparing lengths": "literal-string"]} string-equal/0: comparing lengths run/0: instruction string-equal/7 +run/0: {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]} <- equal {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]}, {name: "b-len", value: 4, type: 1, properties: ["b-len": "integer"]} run/0: ingredient 0 is a-len mem/0: location 1041 is 3 run/0: ingredient 1 is b-len @@ -59,16 +70,20 @@ mem/0: location 1043 is 3 run/0: product 0 is 1 mem/0: storing 1 in location 1044 run/0: instruction string-equal/8 +run/0: break-if {name: "length-equal?", value: 5, type: 3, properties: ["length-equal?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1044 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 10 run/0: instruction string-equal/11 +run/0: trace {name: "string-equal", value: 0, type: 0, properties: ["string-equal": "literal-string"]}, {name: "comparing characters", value: 0, type: 0, properties: ["comparing characters": "literal-string"]} string-equal/0: comparing characters run/0: instruction string-equal/12 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- copy {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: ingredient 0 is 0 mem/0: storing 0 in location 1045 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 0 run/0: ingredient 1 is a-len @@ -76,10 +91,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -90,6 +107,7 @@ mem/0: location 1031 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1047 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -100,6 +118,7 @@ mem/0: location 1035 is 97 run/0: product 0 is 97 mem/0: storing 97 in location 1048 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1047 is 97 run/0: ingredient 1 is b2 @@ -107,20 +126,24 @@ mem/0: location 1048 is 97 run/0: product 0 is 1 mem/0: storing 1 in location 1049 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1049 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1045 is 0 run/0: ingredient 1 is 1 run/0: product 0 is 1 mem/0: storing 1 in location 1045 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 1 run/0: ingredient 1 is a-len @@ -128,10 +151,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -142,6 +167,7 @@ mem/0: location 1032 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1047 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -152,6 +178,7 @@ mem/0: location 1036 is 98 run/0: product 0 is 98 mem/0: storing 98 in location 1048 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1047 is 98 run/0: ingredient 1 is b2 @@ -159,20 +186,24 @@ mem/0: location 1048 is 98 run/0: product 0 is 1 mem/0: storing 1 in location 1049 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1049 is 1 run/0: ingredient 0 is 1 run/0: ingredient 1 is run/0: jumping to instruction 22 run/0: instruction string-equal/23 +run/0: {name: "i", value: 6, type: 1, properties: ["i": "integer"]} <- add {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]} run/0: ingredient 0 is i mem/0: location 1045 is 1 run/0: ingredient 1 is 1 run/0: product 0 is 2 mem/0: storing 2 in location 1045 run/0: instruction string-equal/24 +run/0: loop {name: "", value: -11, type: , properties: ["": ]} run/0: ingredient 0 is -11 run/0: jumping to instruction 14 run/0: instruction string-equal/14 +run/0: {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]} <- greater-or-equal {name: "i", value: 6, type: 1, properties: ["i": "integer"]}, {name: "a-len", value: 2, type: 1, properties: ["a-len": "integer"]} run/0: ingredient 0 is i mem/0: location 1045 is 2 run/0: ingredient 1 is a-len @@ -180,10 +211,12 @@ mem/0: location 1041 is 3 run/0: product 0 is 0 mem/0: storing 0 in location 1046 run/0: instruction string-equal/15 +run/0: break-if {name: "done?", value: 7, type: 3, properties: ["done?": "boolean"]}, {name: "", value: 9, type: , properties: ["": ]} mem/0: location 1046 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/16 +run/0: {name: "a2", value: 8, type: 4, properties: ["a2": "character"]} <- index {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "a", value: 1, type: 2-5-4, properties: ["a": "address":"array":"character", "deref": ]} mem/0: location 1040 is 1030 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -194,6 +227,7 @@ mem/0: location 1033 is 99 run/0: product 0 is 99 mem/0: storing 99 in location 1047 run/0: instruction string-equal/17 +run/0: {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} <- index {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]}, {name: "i", value: 6, type: 1, properties: ["i": "integer"]} run/0: ingredient 0 is {name: "b", value: 3, type: 2-5-4, properties: ["b": "address":"array":"character", "deref": ]} mem/0: location 1042 is 1034 run/0: ingredient 1 is {name: "i", value: 6, type: 1, properties: ["i": "integer"]} @@ -204,6 +238,7 @@ mem/0: location 1037 is 100 run/0: product 0 is 100 mem/0: storing 100 in location 1048 run/0: instruction string-equal/19 +run/0: {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]} <- equal {name: "a2", value: 8, type: 4, properties: ["a2": "character"]}, {name: "b2", value: 9, type: 4, properties: ["b2": "character"]} run/0: ingredient 0 is a2 mem/0: location 1047 is 99 run/0: ingredient 1 is b2 @@ -211,9 +246,11 @@ mem/0: location 1048 is 100 run/0: product 0 is 0 mem/0: storing 0 in location 1049 run/0: instruction string-equal/20 +run/0: break-if {name: "chars-match?", value: 10, type: 3, properties: ["chars-match?": "boolean"]}, {name: "", value: 1, type: , properties: ["": ]} mem/0: location 1049 is 0 run/0: ingredient 0 is 0 run/0: jump-if fell through run/0: instruction string-equal/21 +run/0: reply {name: "0", value: 0, type: 0, properties: ["0": "literal"]} run/0: result 0 is 0 mem/0: storing 0 in location 3 -- cgit 1.4.1-2-gfad0 ref='#n347'>347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606