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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 308793010: Inline Array.shift() fast path instead of using a code stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 "v8.h" 5 #include "v8.h"
6 6
7 #include "double.h" 7 #include "double.h"
8 #include "factory.h" 8 #include "factory.h"
9 #include "hydrogen-infer-representation.h" 9 #include "hydrogen-infer-representation.h"
10 #include "property-details-inl.h" 10 #include "property-details-inl.h"
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 772
773 bool HInstruction::CanDeoptimize() { 773 bool HInstruction::CanDeoptimize() {
774 // TODO(titzer): make this a virtual method? 774 // TODO(titzer): make this a virtual method?
775 switch (opcode()) { 775 switch (opcode()) {
776 case HValue::kAbnormalExit: 776 case HValue::kAbnormalExit:
777 case HValue::kAccessArgumentsAt: 777 case HValue::kAccessArgumentsAt:
778 case HValue::kAllocate: 778 case HValue::kAllocate:
779 case HValue::kArgumentsElements: 779 case HValue::kArgumentsElements:
780 case HValue::kArgumentsLength: 780 case HValue::kArgumentsLength:
781 case HValue::kArgumentsObject: 781 case HValue::kArgumentsObject:
782 case HValue::kArrayShift:
783 case HValue::kBlockEntry: 782 case HValue::kBlockEntry:
784 case HValue::kBoundsCheckBaseIndexInformation: 783 case HValue::kBoundsCheckBaseIndexInformation:
785 case HValue::kCallFunction: 784 case HValue::kCallFunction:
786 case HValue::kCallJSFunction:
787 case HValue::kCallNew: 785 case HValue::kCallNew:
788 case HValue::kCallNewArray: 786 case HValue::kCallNewArray:
789 case HValue::kCallStub: 787 case HValue::kCallStub:
790 case HValue::kCallWithDescriptor: 788 case HValue::kCallWithDescriptor:
791 case HValue::kCapturedObject: 789 case HValue::kCapturedObject:
792 case HValue::kClassOfTestAndBranch: 790 case HValue::kClassOfTestAndBranch:
793 case HValue::kCompareGeneric: 791 case HValue::kCompareGeneric:
794 case HValue::kCompareHoleAndBranch: 792 case HValue::kCompareHoleAndBranch:
795 case HValue::kCompareMap: 793 case HValue::kCompareMap:
796 case HValue::kCompareMinusZeroAndBranch: 794 case HValue::kCompareMinusZeroAndBranch:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 case HValue::kTypeofIsAndBranch: 840 case HValue::kTypeofIsAndBranch:
843 case HValue::kUnknownOSRValue: 841 case HValue::kUnknownOSRValue:
844 case HValue::kUseConst: 842 case HValue::kUseConst:
845 return false; 843 return false;
846 844
847 case HValue::kAdd: 845 case HValue::kAdd:
848 case HValue::kApplyArguments: 846 case HValue::kApplyArguments:
849 case HValue::kBitwise: 847 case HValue::kBitwise:
850 case HValue::kBoundsCheck: 848 case HValue::kBoundsCheck:
851 case HValue::kBranch: 849 case HValue::kBranch:
850 case HValue::kCallJSFunction:
852 case HValue::kCallRuntime: 851 case HValue::kCallRuntime:
853 case HValue::kChange: 852 case HValue::kChange:
854 case HValue::kCheckHeapObject: 853 case HValue::kCheckHeapObject:
855 case HValue::kCheckInstanceType: 854 case HValue::kCheckInstanceType:
856 case HValue::kCheckMapValue: 855 case HValue::kCheckMapValue:
857 case HValue::kCheckMaps: 856 case HValue::kCheckMaps:
858 case HValue::kCheckSmi: 857 case HValue::kCheckSmi:
859 case HValue::kCheckValue: 858 case HValue::kCheckValue:
860 case HValue::kClampToUint8: 859 case HValue::kClampToUint8:
861 case HValue::kDateField: 860 case HValue::kDateField:
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after
3602 ElementsKind to_kind = transitioned_map().handle()->elements_kind(); 3601 ElementsKind to_kind = transitioned_map().handle()->elements_kind();
3603 stream->Add(" %p [%s] -> %p [%s]", 3602 stream->Add(" %p [%s] -> %p [%s]",
3604 *original_map().handle(), 3603 *original_map().handle(),
3605 ElementsAccessor::ForKind(from_kind)->name(), 3604 ElementsAccessor::ForKind(from_kind)->name(),
3606 *transitioned_map().handle(), 3605 *transitioned_map().handle(),
3607 ElementsAccessor::ForKind(to_kind)->name()); 3606 ElementsAccessor::ForKind(to_kind)->name());
3608 if (IsSimpleMapChangeTransition(from_kind, to_kind)) stream->Add(" (simple)"); 3607 if (IsSimpleMapChangeTransition(from_kind, to_kind)) stream->Add(" (simple)");
3609 } 3608 }
3610 3609
3611 3610
3612 void HArrayShift::PrintDataTo(StringStream* stream) {
3613 object()->PrintNameTo(stream);
3614 stream->Add(" [%s]", ElementsAccessor::ForKind(kind())->name());
3615 }
3616
3617
3618 void HLoadGlobalCell::PrintDataTo(StringStream* stream) { 3611 void HLoadGlobalCell::PrintDataTo(StringStream* stream) {
3619 stream->Add("[%p]", *cell().handle()); 3612 stream->Add("[%p]", *cell().handle());
3620 if (!details_.IsDontDelete()) stream->Add(" (deleteable)"); 3613 if (!details_.IsDontDelete()) stream->Add(" (deleteable)");
3621 if (details_.IsReadOnly()) stream->Add(" (read-only)"); 3614 if (details_.IsReadOnly()) stream->Add(" (read-only)");
3622 } 3615 }
3623 3616
3624 3617
3625 bool HLoadGlobalCell::RequiresHoleCheck() const { 3618 bool HLoadGlobalCell::RequiresHoleCheck() const {
3626 if (details_.IsDontDelete() && !details_.IsReadOnly()) return false; 3619 if (details_.IsDontDelete() && !details_.IsReadOnly()) return false;
3627 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { 3620 for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
4753 break; 4746 break;
4754 case kExternalMemory: 4747 case kExternalMemory:
4755 stream->Add("[external-memory]"); 4748 stream->Add("[external-memory]");
4756 break; 4749 break;
4757 } 4750 }
4758 4751
4759 stream->Add("@%d", offset()); 4752 stream->Add("@%d", offset());
4760 } 4753 }
4761 4754
4762 } } // namespace v8::internal 4755 } } // namespace v8::internal
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen-instructions.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698