| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
| 8 #include "src/interpreter/bytecode-array-iterator.h" | 8 #include "src/interpreter/bytecode-array-iterator.h" |
| 9 #include "src/interpreter/bytecode-generator.h" | 9 #include "src/interpreter/bytecode-generator.h" |
| 10 #include "src/interpreter/interpreter.h" | 10 #include "src/interpreter/interpreter.h" |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 | 425 |
| 426 Handle<i::TypeFeedbackVector> vector = | 426 Handle<i::TypeFeedbackVector> vector = |
| 427 i::TypeFeedbackVector::New(helper.isolate(), &feedback_spec); | 427 i::TypeFeedbackVector::New(helper.isolate(), &feedback_spec); |
| 428 | 428 |
| 429 ExpectedSnippet<const char*> snippets[] = { | 429 ExpectedSnippet<const char*> snippets[] = { |
| 430 {"function f(a) { return a.name; }\nf({name : \"test\"})", | 430 {"function f(a) { return a.name; }\nf({name : \"test\"})", |
| 431 1 * kPointerSize, | 431 1 * kPointerSize, |
| 432 2, | 432 2, |
| 433 10, | 433 10, |
| 434 { | 434 { |
| 435 B(Ldar), R(helper.kLastParamIndex), // | 435 B(Ldar), R(helper.kLastParamIndex), // |
| 436 B(Star), R(0), // | 436 B(Star), R(0), // |
| 437 B(LdaConstant), U8(0), // | 437 B(LdaConstant), U8(0), // |
| 438 B(LoadIC), R(0), U8(vector->GetIndex(slot1)), // | 438 B(LoadICSloppy), R(0), U8(vector->GetIndex(slot1)), // |
| 439 B(Return) // | 439 B(Return) // |
| 440 }, | 440 }, |
| 441 1, | 441 1, |
| 442 {"name"}}, | 442 {"name"}}, |
| 443 {"function f(a) { return a[\"key\"]; }\nf({key : \"test\"})", | 443 {"function f(a) { return a[\"key\"]; }\nf({key : \"test\"})", |
| 444 1 * kPointerSize, | 444 1 * kPointerSize, |
| 445 2, | 445 2, |
| 446 10, | 446 10, |
| 447 { | 447 { |
| 448 B(Ldar), R(helper.kLastParamIndex), // | 448 B(Ldar), R(helper.kLastParamIndex), // |
| 449 B(Star), R(0), // | 449 B(Star), R(0), // |
| 450 B(LdaConstant), U8(0), // | 450 B(LdaConstant), U8(0), // |
| 451 B(LoadIC), R(0), U8(vector->GetIndex(slot1)), // | 451 B(LoadICSloppy), R(0), U8(vector->GetIndex(slot1)), // |
| 452 B(Return) // | 452 B(Return) // |
| 453 }, | 453 }, |
| 454 1, | 454 1, |
| 455 {"key"}}, | 455 {"key"}}, |
| 456 {"function f(a) { return a[100]; }\nf({100 : \"test\"})", | 456 {"function f(a) { return a[100]; }\nf({100 : \"test\"})", |
| 457 1 * kPointerSize, | 457 1 * kPointerSize, |
| 458 2, | 458 2, |
| 459 10, | 459 10, |
| 460 { | 460 { |
| 461 B(Ldar), R(helper.kLastParamIndex), // | 461 B(Ldar), R(helper.kLastParamIndex), // |
| 462 B(Star), R(0), // | 462 B(Star), R(0), // |
| 463 B(LdaSmi8), U8(100), // | 463 B(LdaSmi8), U8(100), // |
| 464 B(KeyedLoadIC), R(0), U8(vector->GetIndex(slot1)), // | 464 B(KeyedLoadICSloppy), R(0), U8(vector->GetIndex(slot1)), // |
| 465 B(Return) // | 465 B(Return) // |
| 466 }, | 466 }, |
| 467 0}, | 467 0}, |
| 468 {"function f(a, b) { return a[b]; }\nf({arg : \"test\"}, \"arg\")", | 468 {"function f(a, b) { return a[b]; }\nf({arg : \"test\"}, \"arg\")", |
| 469 1 * kPointerSize, | 469 1 * kPointerSize, |
| 470 3, | 470 3, |
| 471 10, | 471 10, |
| 472 { | 472 { |
| 473 B(Ldar), R(helper.kLastParamIndex - 1), // | 473 B(Ldar), R(helper.kLastParamIndex - 1), // |
| 474 B(Star), R(0), // | 474 B(Star), R(0), // |
| 475 B(Ldar), R(helper.kLastParamIndex), // | 475 B(Ldar), R(helper.kLastParamIndex), // |
| 476 B(KeyedLoadIC), R(0), U8(vector->GetIndex(slot1)), // | 476 B(KeyedLoadICSloppy), R(0), U8(vector->GetIndex(slot1)), // |
| 477 B(Return) // | 477 B(Return) // |
| 478 }, | 478 }, |
| 479 0}, | 479 0}, |
| 480 {"function f(a) { var b = a.name; return a[-124]; }\n" | 480 {"function f(a) { var b = a.name; return a[-124]; }\n" |
| 481 "f({\"-124\" : \"test\", name : 123 })", | 481 "f({\"-124\" : \"test\", name : 123 })", |
| 482 2 * kPointerSize, | 482 2 * kPointerSize, |
| 483 2, | 483 2, |
| 484 21, | 484 21, |
| 485 { | 485 { |
| 486 B(Ldar), R(helper.kLastParamIndex), // | 486 B(Ldar), R(helper.kLastParamIndex), // |
| 487 B(Star), R(1), // | 487 B(Star), R(1), // |
| 488 B(LdaConstant), U8(0), // | 488 B(LdaConstant), U8(0), // |
| 489 B(LoadIC), R(1), U8(vector->GetIndex(slot1)), // | 489 B(LoadICSloppy), R(1), U8(vector->GetIndex(slot1)), // |
| 490 B(Star), R(0), // | 490 B(Star), R(0), // |
| 491 B(Ldar), R(helper.kLastParamIndex), // | 491 B(Ldar), R(helper.kLastParamIndex), // |
| 492 B(Star), R(1), // | 492 B(Star), R(1), // |
| 493 B(LdaSmi8), U8(-124), // | 493 B(LdaSmi8), U8(-124), // |
| 494 B(KeyedLoadIC), R(1), U8(vector->GetIndex(slot2)), // | 494 B(KeyedLoadICSloppy), R(1), U8(vector->GetIndex(slot2)), // |
| 495 B(Return) // | 495 B(Return) // |
| 496 }, | 496 }, |
| 497 1, | 497 1, |
| 498 {"name"}}}; | 498 {"name"}}, |
| 499 {"function f(a) { \"use strict\"; return a.name; }\nf({name : \"test\"})", |
| 500 1 * kPointerSize, |
| 501 2, |
| 502 12, |
| 503 { |
| 504 // TODO(rmcilroy) Avoid unnecessary LdaConstant for "use strict" |
| 505 // expression, or any other unused literal expression. |
| 506 B(LdaConstant), U8(0), // |
| 507 B(Ldar), R(helper.kLastParamIndex), // |
| 508 B(Star), R(0), // |
| 509 B(LdaConstant), U8(1), // |
| 510 B(LoadICStrict), R(0), U8(vector->GetIndex(slot1)), // |
| 511 B(Return) // |
| 512 }, |
| 513 2, |
| 514 {"use strict", "name"}}, |
| 515 {"function f(a, b) { \"use strict\"; return a[b]; }\n" |
| 516 "f({arg : \"test\"}, \"arg\")", |
| 517 1 * kPointerSize, |
| 518 3, |
| 519 12, |
| 520 { |
| 521 // TODO(rmcilroy) Avoid unnecessary LdaConstant for "use strict" |
| 522 // expression, or any other unused literal expression. |
| 523 B(LdaConstant), U8(0), // |
| 524 B(Ldar), R(helper.kLastParamIndex - 1), // |
| 525 B(Star), R(0), // |
| 526 B(Ldar), R(helper.kLastParamIndex), // |
| 527 B(KeyedLoadICStrict), R(0), U8(vector->GetIndex(slot1)), // |
| 528 B(Return) // |
| 529 }, |
| 530 1, |
| 531 {"use strict"}}}; |
| 499 for (size_t i = 0; i < arraysize(snippets); i++) { | 532 for (size_t i = 0; i < arraysize(snippets); i++) { |
| 500 Handle<BytecodeArray> bytecode_array = | 533 Handle<BytecodeArray> bytecode_array = |
| 501 helper.MakeBytecode(snippets[i].code_snippet, helper.kFunctionName); | 534 helper.MakeBytecode(snippets[i].code_snippet, helper.kFunctionName); |
| 502 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 535 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
| 503 } | 536 } |
| 504 } | 537 } |
| 505 | 538 |
| 506 | 539 |
| 507 TEST(PropertyStores) { | 540 TEST(PropertyStores) { |
| 508 InitializedHandleScope handle_scope; | 541 InitializedHandleScope handle_scope; |
| 509 BytecodeGeneratorHelper helper; | 542 BytecodeGeneratorHelper helper; |
| 510 Zone zone; | 543 Zone zone; |
| 511 | 544 |
| 512 FeedbackVectorSpec feedback_spec(&zone); | 545 FeedbackVectorSpec feedback_spec(&zone); |
| 513 FeedbackVectorSlot slot1 = feedback_spec.AddStoreICSlot(); | 546 FeedbackVectorSlot slot1 = feedback_spec.AddStoreICSlot(); |
| 514 FeedbackVectorSlot slot2 = feedback_spec.AddStoreICSlot(); | 547 FeedbackVectorSlot slot2 = feedback_spec.AddStoreICSlot(); |
| 515 | 548 |
| 516 Handle<i::TypeFeedbackVector> vector = | 549 Handle<i::TypeFeedbackVector> vector = |
| 517 i::TypeFeedbackVector::New(helper.isolate(), &feedback_spec); | 550 i::TypeFeedbackVector::New(helper.isolate(), &feedback_spec); |
| 518 | 551 |
| 519 ExpectedSnippet<const char*> snippets[] = { | 552 ExpectedSnippet<const char*> snippets[] = { |
| 520 {"function f(a) { a.name = \"val\"; }\nf({name : \"test\"})", | 553 {"function f(a) { a.name = \"val\"; }\nf({name : \"test\"})", |
| 521 2 * kPointerSize, | 554 2 * kPointerSize, |
| 522 2, | 555 2, |
| 523 16, | 556 16, |
| 524 { | 557 { |
| 525 B(Ldar), R(helper.kLastParamIndex), // | 558 B(Ldar), R(helper.kLastParamIndex), // |
| 526 B(Star), R(0), // | 559 B(Star), R(0), // |
| 527 B(LdaConstant), U8(0), // | 560 B(LdaConstant), U8(0), // |
| 528 B(Star), R(1), // | 561 B(Star), R(1), // |
| 529 B(LdaConstant), U8(1), // | 562 B(LdaConstant), U8(1), // |
| 530 B(StoreIC), R(0), R(1), U8(vector->GetIndex(slot1)), // | 563 B(StoreICSloppy), R(0), R(1), U8(vector->GetIndex(slot1)), // |
| 531 B(LdaUndefined), // | 564 B(LdaUndefined), // |
| 532 B(Return) // | 565 B(Return) // |
| 533 }, | 566 }, |
| 534 2, | 567 2, |
| 535 {"name", "val"}}, | 568 {"name", "val"}}, |
| 536 {"function f(a) { a[\"key\"] = \"val\"; }\nf({key : \"test\"})", | 569 {"function f(a) { a[\"key\"] = \"val\"; }\nf({key : \"test\"})", |
| 537 2 * kPointerSize, | 570 2 * kPointerSize, |
| 538 2, | 571 2, |
| 539 16, | 572 16, |
| 540 { | 573 { |
| 541 B(Ldar), R(helper.kLastParamIndex), // | 574 B(Ldar), R(helper.kLastParamIndex), // |
| 542 B(Star), R(0), // | 575 B(Star), R(0), // |
| 543 B(LdaConstant), U8(0), // | 576 B(LdaConstant), U8(0), // |
| 544 B(Star), R(1), // | 577 B(Star), R(1), // |
| 545 B(LdaConstant), U8(1), // | 578 B(LdaConstant), U8(1), // |
| 546 B(StoreIC), R(0), R(1), U8(vector->GetIndex(slot1)), // | 579 B(StoreICSloppy), R(0), R(1), U8(vector->GetIndex(slot1)), // |
| 547 B(LdaUndefined), // | 580 B(LdaUndefined), // |
| 548 B(Return) // | 581 B(Return) // |
| 549 }, | 582 }, |
| 550 2, | 583 2, |
| 551 {"key", "val"}}, | 584 {"key", "val"}}, |
| 552 {"function f(a) { a[100] = \"val\"; }\nf({100 : \"test\"})", | 585 {"function f(a) { a[100] = \"val\"; }\nf({100 : \"test\"})", |
| 553 2 * kPointerSize, | 586 2 * kPointerSize, |
| 554 2, | 587 2, |
| 555 16, | 588 16, |
| 556 { | 589 { |
| 557 B(Ldar), R(helper.kLastParamIndex), // | 590 B(Ldar), R(helper.kLastParamIndex), // |
| 558 B(Star), R(0), // | 591 B(Star), R(0), // |
| 559 B(LdaSmi8), U8(100), // | 592 B(LdaSmi8), U8(100), // |
| 560 B(Star), R(1), // | 593 B(Star), R(1), // |
| 561 B(LdaConstant), U8(0), // | 594 B(LdaConstant), U8(0), // |
| 562 B(KeyedStoreIC), R(0), R(1), U8(vector->GetIndex(slot1)), // | 595 B(KeyedStoreICSloppy), R(0), R(1), U8(vector->GetIndex(slot1)), // |
| 563 B(LdaUndefined), // | 596 B(LdaUndefined), // |
| 564 B(Return) // | 597 B(Return) // |
| 565 }, | 598 }, |
| 566 1, | 599 1, |
| 567 {"val"}}, | 600 {"val"}}, |
| 568 {"function f(a, b) { a[b] = \"val\"; }\nf({arg : \"test\"}, \"arg\")", | 601 {"function f(a, b) { a[b] = \"val\"; }\nf({arg : \"test\"}, \"arg\")", |
| 569 2 * kPointerSize, | 602 2 * kPointerSize, |
| 570 3, | 603 3, |
| 571 16, | 604 16, |
| 572 { | 605 { |
| 573 B(Ldar), R(helper.kLastParamIndex - 1), // | 606 B(Ldar), R(helper.kLastParamIndex - 1), // |
| 574 B(Star), R(0), // | 607 B(Star), R(0), // |
| 575 B(Ldar), R(helper.kLastParamIndex), // | 608 B(Ldar), R(helper.kLastParamIndex), // |
| 576 B(Star), R(1), // | 609 B(Star), R(1), // |
| 577 B(LdaConstant), U8(0), // | 610 B(LdaConstant), U8(0), // |
| 578 B(KeyedStoreIC), R(0), R(1), U8(vector->GetIndex(slot1)), // | 611 B(KeyedStoreICSloppy), R(0), R(1), U8(vector->GetIndex(slot1)), // |
| 579 B(LdaUndefined), // | 612 B(LdaUndefined), // |
| 580 B(Return) // | 613 B(Return) // |
| 581 }, | 614 }, |
| 582 1, | 615 1, |
| 583 {"val"}}, | 616 {"val"}}, |
| 584 {"function f(a) { a.name = a[-124]; }\n" | 617 {"function f(a) { a.name = a[-124]; }\n" |
| 585 "f({\"-124\" : \"test\", name : 123 })", | 618 "f({\"-124\" : \"test\", name : 123 })", |
| 586 3 * kPointerSize, | 619 3 * kPointerSize, |
| 587 2, | 620 2, |
| 588 23, | 621 23, |
| 589 { | 622 { |
| 590 B(Ldar), R(helper.kLastParamIndex), // | 623 B(Ldar), R(helper.kLastParamIndex), // |
| 591 B(Star), R(0), // | 624 B(Star), R(0), // |
| 592 B(LdaConstant), U8(0), // | 625 B(LdaConstant), U8(0), // |
| 593 B(Star), R(1), // | 626 B(Star), R(1), // |
| 594 B(Ldar), R(helper.kLastParamIndex), // | 627 B(Ldar), R(helper.kLastParamIndex), // |
| 595 B(Star), R(2), // | 628 B(Star), R(2), // |
| 596 B(LdaSmi8), U8(-124), // | 629 B(LdaSmi8), U8(-124), // |
| 597 B(KeyedLoadIC), R(2), U8(vector->GetIndex(slot1)), // | 630 B(KeyedLoadICSloppy), R(2), U8(vector->GetIndex(slot1)), // |
| 598 B(StoreIC), R(0), R(1), U8(vector->GetIndex(slot2)), // | 631 B(StoreICSloppy), R(0), R(1), U8(vector->GetIndex(slot2)), // |
| 599 B(LdaUndefined), // | 632 B(LdaUndefined), // |
| 600 B(Return) // | 633 B(Return) // |
| 601 }, | 634 }, |
| 602 1, | 635 1, |
| 603 {"name"}}}; | 636 {"name"}}, |
| 637 {"function f(a) { \"use strict\"; a.name = \"val\"; }\n" |
| 638 "f({name : \"test\"})", |
| 639 2 * kPointerSize, |
| 640 2, |
| 641 18, |
| 642 { |
| 643 // TODO(rmcilroy) Avoid unnecessary LdaConstant for "use strict" |
| 644 // expression, or any other unused literal expression. |
| 645 B(LdaConstant), U8(0), // |
| 646 B(Ldar), R(helper.kLastParamIndex), // |
| 647 B(Star), R(0), // |
| 648 B(LdaConstant), U8(1), // |
| 649 B(Star), R(1), // |
| 650 B(LdaConstant), U8(2), // |
| 651 B(StoreICStrict), R(0), R(1), U8(vector->GetIndex(slot1)), // |
| 652 B(LdaUndefined), // |
| 653 B(Return) // |
| 654 }, |
| 655 3, |
| 656 {"use strict", "name", "val"}}, |
| 657 {"function f(a, b) { \"use strict\"; a[b] = \"val\"; }\n" |
| 658 "f({arg : \"test\"}, \"arg\")", |
| 659 2 * kPointerSize, |
| 660 3, |
| 661 18, |
| 662 { |
| 663 // TODO(rmcilroy) Avoid unnecessary LdaConstant for "use strict" |
| 664 // expression, or any other unused literal expression. |
| 665 B(LdaConstant), U8(0), // |
| 666 B(Ldar), R(helper.kLastParamIndex - 1), // |
| 667 B(Star), R(0), // |
| 668 B(Ldar), R(helper.kLastParamIndex), // |
| 669 B(Star), R(1), // |
| 670 B(LdaConstant), U8(1), // |
| 671 B(KeyedStoreICStrict), R(0), R(1), U8(vector->GetIndex(slot1)), // |
| 672 B(LdaUndefined), // |
| 673 B(Return) // |
| 674 }, |
| 675 2, |
| 676 {"use strict", "val"}}}; |
| 604 for (size_t i = 0; i < arraysize(snippets); i++) { | 677 for (size_t i = 0; i < arraysize(snippets); i++) { |
| 605 Handle<BytecodeArray> bytecode_array = | 678 Handle<BytecodeArray> bytecode_array = |
| 606 helper.MakeBytecode(snippets[i].code_snippet, helper.kFunctionName); | 679 helper.MakeBytecode(snippets[i].code_snippet, helper.kFunctionName); |
| 607 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 680 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
| 608 } | 681 } |
| 609 } | 682 } |
| 610 | 683 |
| 611 | 684 |
| 612 #define FUNC_ARG "new (function Obj() { this.func = function() { return; }})()" | 685 #define FUNC_ARG "new (function Obj() { this.func = function() { return; }})()" |
| 613 | 686 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 624 | 697 |
| 625 Handle<i::TypeFeedbackVector> vector = | 698 Handle<i::TypeFeedbackVector> vector = |
| 626 i::TypeFeedbackVector::New(helper.isolate(), &feedback_spec); | 699 i::TypeFeedbackVector::New(helper.isolate(), &feedback_spec); |
| 627 | 700 |
| 628 ExpectedSnippet<const char*> snippets[] = { | 701 ExpectedSnippet<const char*> snippets[] = { |
| 629 {"function f(a) { return a.func(); }\nf(" FUNC_ARG ")", | 702 {"function f(a) { return a.func(); }\nf(" FUNC_ARG ")", |
| 630 2 * kPointerSize, | 703 2 * kPointerSize, |
| 631 2, | 704 2, |
| 632 16, | 705 16, |
| 633 { | 706 { |
| 634 B(Ldar), R(helper.kLastParamIndex), // | 707 B(Ldar), R(helper.kLastParamIndex), // |
| 635 B(Star), R(1), // | 708 B(Star), R(1), // |
| 636 B(LdaConstant), U8(0), // | 709 B(LdaConstant), U8(0), // |
| 637 B(LoadIC), R(1), U8(vector->GetIndex(slot2)), // | 710 B(LoadICSloppy), R(1), U8(vector->GetIndex(slot2)), // |
| 638 B(Star), R(0), // | 711 B(Star), R(0), // |
| 639 B(Call), R(0), R(1), U8(0), // | 712 B(Call), R(0), R(1), U8(0), // |
| 640 B(Return) // | 713 B(Return) // |
| 641 }, | 714 }, |
| 642 1, | 715 1, |
| 643 {"func"}}, | 716 {"func"}}, |
| 644 {"function f(a, b, c) { return a.func(b, c); }\nf(" FUNC_ARG ", 1, 2)", | 717 {"function f(a, b, c) { return a.func(b, c); }\nf(" FUNC_ARG ", 1, 2)", |
| 645 4 * kPointerSize, | 718 4 * kPointerSize, |
| 646 4, | 719 4, |
| 647 24, | 720 24, |
| 648 { | 721 { |
| 649 B(Ldar), R(helper.kLastParamIndex - 2), // | 722 B(Ldar), R(helper.kLastParamIndex - 2), // |
| 650 B(Star), R(1), // | 723 B(Star), R(1), // |
| 651 B(LdaConstant), U8(0), // | 724 B(LdaConstant), U8(0), // |
| 652 B(LoadIC), R(1), U8(vector->GetIndex(slot2)), // | 725 B(LoadICSloppy), R(1), U8(vector->GetIndex(slot2)), // |
| 653 B(Star), R(0), // | 726 B(Star), R(0), // |
| 654 B(Ldar), R(helper.kLastParamIndex - 1), // | 727 B(Ldar), R(helper.kLastParamIndex - 1), // |
| 655 B(Star), R(2), // | 728 B(Star), R(2), // |
| 656 B(Ldar), R(helper.kLastParamIndex), // | 729 B(Ldar), R(helper.kLastParamIndex), // |
| 657 B(Star), R(3), // | 730 B(Star), R(3), // |
| 658 B(Call), R(0), R(1), U8(2), // | 731 B(Call), R(0), R(1), U8(2), // |
| 659 B(Return) // | 732 B(Return) // |
| 660 }, | 733 }, |
| 661 1, | 734 1, |
| 662 {"func"}}, | 735 {"func"}}, |
| 663 {"function f(a, b) { return a.func(b + b, b); }\nf(" FUNC_ARG ", 1)", | 736 {"function f(a, b) { return a.func(b + b, b); }\nf(" FUNC_ARG ", 1)", |
| 664 4 * kPointerSize, | 737 4 * kPointerSize, |
| 665 3, | 738 3, |
| 666 30, | 739 30, |
| 667 { | 740 { |
| 668 B(Ldar), R(helper.kLastParamIndex - 1), // | 741 B(Ldar), R(helper.kLastParamIndex - 1), // |
| 669 B(Star), R(1), // | 742 B(Star), R(1), // |
| 670 B(LdaConstant), U8(0), // | 743 B(LdaConstant), U8(0), // |
| 671 B(LoadIC), R(1), U8(vector->GetIndex(slot2)), // | 744 B(LoadICSloppy), R(1), U8(vector->GetIndex(slot2)), // |
| 672 B(Star), R(0), // | 745 B(Star), R(0), // |
| 673 B(Ldar), R(helper.kLastParamIndex), // | 746 B(Ldar), R(helper.kLastParamIndex), // |
| 674 B(Star), R(2), // | 747 B(Star), R(2), // |
| 675 B(Ldar), R(helper.kLastParamIndex), // | 748 B(Ldar), R(helper.kLastParamIndex), // |
| 676 B(Add), R(2), // | 749 B(Add), R(2), // |
| 677 B(Star), R(2), // | 750 B(Star), R(2), // |
| 678 B(Ldar), R(helper.kLastParamIndex), // | 751 B(Ldar), R(helper.kLastParamIndex), // |
| 679 B(Star), R(3), // | 752 B(Star), R(3), // |
| 680 B(Call), R(0), R(1), U8(2), // | 753 B(Call), R(0), R(1), U8(2), // |
| 681 B(Return) // | 754 B(Return) // |
| 682 }, | 755 }, |
| 683 1, | 756 1, |
| 684 {"func"}}}; | 757 {"func"}}}; |
| 685 for (size_t i = 0; i < arraysize(snippets); i++) { | 758 for (size_t i = 0; i < arraysize(snippets); i++) { |
| 686 Handle<BytecodeArray> bytecode_array = | 759 Handle<BytecodeArray> bytecode_array = |
| 687 helper.MakeBytecode(snippets[i].code_snippet, helper.kFunctionName); | 760 helper.MakeBytecode(snippets[i].code_snippet, helper.kFunctionName); |
| 688 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 761 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
| 689 } | 762 } |
| 690 } | 763 } |
| 691 | 764 |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 Handle<BytecodeArray> bytecode_array = | 1447 Handle<BytecodeArray> bytecode_array = |
| 1375 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); | 1448 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); |
| 1376 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 1449 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
| 1377 } | 1450 } |
| 1378 } | 1451 } |
| 1379 | 1452 |
| 1380 | 1453 |
| 1381 } // namespace interpreter | 1454 } // namespace interpreter |
| 1382 } // namespace internal | 1455 } // namespace internal |
| 1383 } // namespace v8 | 1456 } // namespace v8 |
| OLD | NEW |