Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: runtime/vm/intrinsifier_ia32.cc

Issue 12377082: Recognize more list factories. Recognizing list factories (Array, Bytearrays, etc) allows the type … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // The intrinsic code below is executed before a method has built its frame. 5 // The intrinsic code below is executed before a method has built its frame.
6 // The return address is on the stack and the arguments below it. 6 // The return address is on the stack and the arguments below it.
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved.
8 // Each intrinsification method returns true if the corresponding 8 // Each intrinsification method returns true if the corresponding
9 // Dart method was intrinsified. 9 // Dart method was intrinsified.
10 10
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 __ ret(); \ 553 __ ret(); \
554 __ Bind(&fall_through); \ 554 __ Bind(&fall_through); \
555 555
556 556
557 bool Intrinsifier::Int8Array_new(Assembler* assembler) { 557 bool Intrinsifier::Int8Array_new(Assembler* assembler) {
558 TYPED_ARRAY_ALLOCATION(Int8Array, TIMES_1); 558 TYPED_ARRAY_ALLOCATION(Int8Array, TIMES_1);
559 return false; 559 return false;
560 } 560 }
561 561
562 562
563 bool Intrinsifier::Int8Array_factory(Assembler* assembler) {
564 TYPED_ARRAY_ALLOCATION(Int8Array, TIMES_1);
565 return false;
566 }
567
568
563 bool Intrinsifier::Uint8Array_new(Assembler* assembler) { 569 bool Intrinsifier::Uint8Array_new(Assembler* assembler) {
564 TYPED_ARRAY_ALLOCATION(Uint8Array, TIMES_1); 570 TYPED_ARRAY_ALLOCATION(Uint8Array, TIMES_1);
565 return false; 571 return false;
566 } 572 }
567 573
568 574
575 bool Intrinsifier::Uint8Array_factory(Assembler* assembler) {
576 TYPED_ARRAY_ALLOCATION(Uint8Array, TIMES_1);
577 return false;
578 }
579
580
569 bool Intrinsifier::Uint8ClampedArray_new(Assembler* assembler) { 581 bool Intrinsifier::Uint8ClampedArray_new(Assembler* assembler) {
570 TYPED_ARRAY_ALLOCATION(Uint8ClampedArray, TIMES_1); 582 TYPED_ARRAY_ALLOCATION(Uint8ClampedArray, TIMES_1);
571 return false; 583 return false;
572 } 584 }
573 585
574 586
587 bool Intrinsifier::Uint8ClampedArray_factory(Assembler* assembler) {
588 TYPED_ARRAY_ALLOCATION(Uint8ClampedArray, TIMES_1);
589 return false;
590 }
591
592
575 bool Intrinsifier::Int16Array_new(Assembler* assembler) { 593 bool Intrinsifier::Int16Array_new(Assembler* assembler) {
576 TYPED_ARRAY_ALLOCATION(Int16Array, TIMES_2); 594 TYPED_ARRAY_ALLOCATION(Int16Array, TIMES_2);
577 return false; 595 return false;
578 } 596 }
579 597
580 598
599 bool Intrinsifier::Int16Array_factory(Assembler* assembler) {
600 TYPED_ARRAY_ALLOCATION(Int16Array, TIMES_2);
601 return false;
602 }
603
604
581 bool Intrinsifier::Uint16Array_new(Assembler* assembler) { 605 bool Intrinsifier::Uint16Array_new(Assembler* assembler) {
582 TYPED_ARRAY_ALLOCATION(Uint16Array, TIMES_2); 606 TYPED_ARRAY_ALLOCATION(Uint16Array, TIMES_2);
583 return false; 607 return false;
584 } 608 }
585 609
586 610
611 bool Intrinsifier::Uint16Array_factory(Assembler* assembler) {
612 TYPED_ARRAY_ALLOCATION(Uint16Array, TIMES_2);
613 return false;
614 }
615
616
587 bool Intrinsifier::Int32Array_new(Assembler* assembler) { 617 bool Intrinsifier::Int32Array_new(Assembler* assembler) {
588 TYPED_ARRAY_ALLOCATION(Int32Array, TIMES_4); 618 TYPED_ARRAY_ALLOCATION(Int32Array, TIMES_4);
589 return false; 619 return false;
590 } 620 }
591 621
592 622
623 bool Intrinsifier::Int32Array_factory(Assembler* assembler) {
624 TYPED_ARRAY_ALLOCATION(Int32Array, TIMES_4);
625 return false;
626 }
627
628
593 bool Intrinsifier::Uint32Array_new(Assembler* assembler) { 629 bool Intrinsifier::Uint32Array_new(Assembler* assembler) {
594 TYPED_ARRAY_ALLOCATION(Uint32Array, TIMES_4); 630 TYPED_ARRAY_ALLOCATION(Uint32Array, TIMES_4);
595 return false; 631 return false;
596 } 632 }
597 633
598 634
635 bool Intrinsifier::Uint32Array_factory(Assembler* assembler) {
636 TYPED_ARRAY_ALLOCATION(Uint32Array, TIMES_4);
637 return false;
638 }
639
640
599 bool Intrinsifier::Int64Array_getIndexed(Assembler* assembler) { 641 bool Intrinsifier::Int64Array_getIndexed(Assembler* assembler) {
600 return false; 642 return false;
601 } 643 }
602 644
603 645
604 bool Intrinsifier::Int64Array_new(Assembler* assembler) { 646 bool Intrinsifier::Int64Array_new(Assembler* assembler) {
605 TYPED_ARRAY_ALLOCATION(Int64Array, TIMES_8); 647 TYPED_ARRAY_ALLOCATION(Int64Array, TIMES_8);
606 return false; 648 return false;
607 } 649 }
608 650
609 651
652 bool Intrinsifier::Int64Array_factory(Assembler* assembler) {
653 TYPED_ARRAY_ALLOCATION(Int64Array, TIMES_8);
654 return false;
655 }
656
657
610 bool Intrinsifier::Uint64Array_getIndexed(Assembler* assembler) { 658 bool Intrinsifier::Uint64Array_getIndexed(Assembler* assembler) {
611 return false; 659 return false;
612 } 660 }
613 661
614 662
615 bool Intrinsifier::Uint64Array_new(Assembler* assembler) { 663 bool Intrinsifier::Uint64Array_new(Assembler* assembler) {
616 TYPED_ARRAY_ALLOCATION(Uint64Array, TIMES_8); 664 TYPED_ARRAY_ALLOCATION(Uint64Array, TIMES_8);
617 return false; 665 return false;
618 } 666 }
619 667
620 668
669 bool Intrinsifier::Uint64Array_factory(Assembler* assembler) {
670 TYPED_ARRAY_ALLOCATION(Uint64Array, TIMES_8);
671 return false;
672 }
673
674
621 bool Intrinsifier::Float32Array_new(Assembler* assembler) { 675 bool Intrinsifier::Float32Array_new(Assembler* assembler) {
622 TYPED_ARRAY_ALLOCATION(Float32Array, TIMES_4); 676 TYPED_ARRAY_ALLOCATION(Float32Array, TIMES_4);
623 return false; 677 return false;
624 } 678 }
625 679
626 680
681 bool Intrinsifier::Float32Array_factory(Assembler* assembler) {
682 TYPED_ARRAY_ALLOCATION(Float32Array, TIMES_4);
683 return false;
684 }
685
686
627 bool Intrinsifier::Float64Array_new(Assembler* assembler) { 687 bool Intrinsifier::Float64Array_new(Assembler* assembler) {
628 TYPED_ARRAY_ALLOCATION(Float64Array, TIMES_8); 688 TYPED_ARRAY_ALLOCATION(Float64Array, TIMES_8);
629 return false; 689 return false;
630 } 690 }
631 691
632 692
693 bool Intrinsifier::Float64Array_factory(Assembler* assembler) {
694 TYPED_ARRAY_ALLOCATION(Float64Array, TIMES_8);
695 return false;
696 }
697
698
633 // Tests if two top most arguments are smis, jumps to label not_smi if not. 699 // Tests if two top most arguments are smis, jumps to label not_smi if not.
634 // Topmost argument is in EAX. 700 // Topmost argument is in EAX.
635 static void TestBothArgumentsSmis(Assembler* assembler, Label* not_smi) { 701 static void TestBothArgumentsSmis(Assembler* assembler, Label* not_smi) {
636 __ movl(EAX, Address(ESP, + 1 * kWordSize)); 702 __ movl(EAX, Address(ESP, + 1 * kWordSize));
637 __ movl(EBX, Address(ESP, + 2 * kWordSize)); 703 __ movl(EBX, Address(ESP, + 2 * kWordSize));
638 __ orl(EBX, EAX); 704 __ orl(EBX, EAX);
639 __ testl(EBX, Immediate(kSmiTagMask)); 705 __ testl(EBX, Immediate(kSmiTagMask));
640 __ j(NOT_ZERO, not_smi, Assembler::kNearJump); 706 __ j(NOT_ZERO, not_smi, Assembler::kNearJump);
641 } 707 }
642 708
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 __ SmiTag(EAX); 1604 __ SmiTag(EAX);
1539 __ movl(FieldAddress(EBX, String::hash_offset()), EAX); 1605 __ movl(FieldAddress(EBX, String::hash_offset()), EAX);
1540 __ ret(); 1606 __ ret();
1541 return true; 1607 return true;
1542 } 1608 }
1543 1609
1544 #undef __ 1610 #undef __
1545 } // namespace dart 1611 } // namespace dart
1546 1612
1547 #endif // defined TARGET_ARCH_IA32 1613 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698