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

Side by Side Diff: src/x64/ic-x64.cc

Issue 6287030: Create specialized code stubs for PixelArray loads. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: review feedback Created 9 years, 10 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 | « src/x64/code-stubs-x64.cc ('k') | src/x64/stub-cache-x64.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 rax, 573 rax,
574 rcx, 574 rcx,
575 rbx, 575 rbx,
576 rax, 576 rax,
577 NULL, 577 NULL,
578 &slow); 578 &slow);
579 __ IncrementCounter(&Counters::keyed_load_generic_smi, 1); 579 __ IncrementCounter(&Counters::keyed_load_generic_smi, 1);
580 __ ret(0); 580 __ ret(0);
581 581
582 __ bind(&check_pixel_array); 582 __ bind(&check_pixel_array);
583 // Check whether the elements object is a pixel array. 583 GenerateFastPixelArrayLoad(masm,
584 // rdx: receiver 584 rdx,
585 // rax: key 585 rax,
586 __ movq(rcx, FieldOperand(rdx, JSObject::kElementsOffset)); 586 rcx,
587 __ SmiToInteger32(rbx, rax); // Used on both directions of next branch. 587 rbx,
588 __ CompareRoot(FieldOperand(rcx, HeapObject::kMapOffset), 588 rax,
589 Heap::kPixelArrayMapRootIndex); 589 &check_number_dictionary,
590 __ j(not_equal, &check_number_dictionary); 590 NULL,
591 __ cmpl(rbx, FieldOperand(rcx, PixelArray::kLengthOffset)); 591 &slow);
592 __ j(above_equal, &slow);
593 __ movq(rax, FieldOperand(rcx, PixelArray::kExternalPointerOffset));
594 __ movzxbq(rax, Operand(rax, rbx, times_1, 0));
595 __ Integer32ToSmi(rax, rax);
596 __ ret(0);
597 592
598 __ bind(&check_number_dictionary); 593 __ bind(&check_number_dictionary);
599 // Check whether the elements is a number dictionary. 594 // Check whether the elements is a number dictionary.
600 // rdx: receiver 595 // rdx: receiver
601 // rax: key 596 // rax: key
602 // rbx: key as untagged int32 597 // rbx: key as untagged int32
603 // rcx: elements 598 // rcx: elements
604 __ CompareRoot(FieldOperand(rcx, HeapObject::kMapOffset), 599 __ CompareRoot(FieldOperand(rcx, HeapObject::kMapOffset),
605 Heap::kHashTableMapRootIndex); 600 Heap::kHashTableMapRootIndex);
606 __ j(not_equal, &slow); 601 __ j(not_equal, &slow);
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 } 1698 }
1704 1699
1705 void PatchInlinedSmiCode(Address address) { 1700 void PatchInlinedSmiCode(Address address) {
1706 UNIMPLEMENTED(); 1701 UNIMPLEMENTED();
1707 } 1702 }
1708 1703
1709 1704
1710 } } // namespace v8::internal 1705 } } // namespace v8::internal
1711 1706
1712 #endif // V8_TARGET_ARCH_X64 1707 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698