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

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

Issue 279743002: Improve Array.shift() performance for small arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cosmetic fix Created 6 years, 7 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/hydrogen-instructions.h ('k') | src/ia32/code-stubs-ia32.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 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 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 810
811 bool HInstruction::CanDeoptimize() { 811 bool HInstruction::CanDeoptimize() {
812 // TODO(titzer): make this a virtual method? 812 // TODO(titzer): make this a virtual method?
813 switch (opcode()) { 813 switch (opcode()) {
814 case HValue::kAbnormalExit: 814 case HValue::kAbnormalExit:
815 case HValue::kAccessArgumentsAt: 815 case HValue::kAccessArgumentsAt:
816 case HValue::kAllocate: 816 case HValue::kAllocate:
817 case HValue::kArgumentsElements: 817 case HValue::kArgumentsElements:
818 case HValue::kArgumentsLength: 818 case HValue::kArgumentsLength:
819 case HValue::kArgumentsObject: 819 case HValue::kArgumentsObject:
820 case HValue::kArrayShift:
820 case HValue::kBlockEntry: 821 case HValue::kBlockEntry:
821 case HValue::kBoundsCheckBaseIndexInformation: 822 case HValue::kBoundsCheckBaseIndexInformation:
822 case HValue::kCallFunction: 823 case HValue::kCallFunction:
823 case HValue::kCallJSFunction: 824 case HValue::kCallJSFunction:
824 case HValue::kCallNew: 825 case HValue::kCallNew:
825 case HValue::kCallNewArray: 826 case HValue::kCallNewArray:
826 case HValue::kCallStub: 827 case HValue::kCallStub:
827 case HValue::kCallWithDescriptor: 828 case HValue::kCallWithDescriptor:
828 case HValue::kCapturedObject: 829 case HValue::kCapturedObject:
829 case HValue::kClassOfTestAndBranch: 830 case HValue::kClassOfTestAndBranch:
(...skipping 2800 matching lines...) Expand 10 before | Expand all | Expand 10 after
3630 ElementsKind to_kind = transitioned_map().handle()->elements_kind(); 3631 ElementsKind to_kind = transitioned_map().handle()->elements_kind();
3631 stream->Add(" %p [%s] -> %p [%s]", 3632 stream->Add(" %p [%s] -> %p [%s]",
3632 *original_map().handle(), 3633 *original_map().handle(),
3633 ElementsAccessor::ForKind(from_kind)->name(), 3634 ElementsAccessor::ForKind(from_kind)->name(),
3634 *transitioned_map().handle(), 3635 *transitioned_map().handle(),
3635 ElementsAccessor::ForKind(to_kind)->name()); 3636 ElementsAccessor::ForKind(to_kind)->name());
3636 if (IsSimpleMapChangeTransition(from_kind, to_kind)) stream->Add(" (simple)"); 3637 if (IsSimpleMapChangeTransition(from_kind, to_kind)) stream->Add(" (simple)");
3637 } 3638 }
3638 3639
3639 3640
3641 void HArrayShift::PrintDataTo(StringStream* stream) {
3642 object()->PrintNameTo(stream);
3643 stream->Add(" [%s]", ElementsAccessor::ForKind(kind())->name());
3644 }
3645
3646
3640 void HLoadGlobalCell::PrintDataTo(StringStream* stream) { 3647 void HLoadGlobalCell::PrintDataTo(StringStream* stream) {
3641 stream->Add("[%p]", *cell().handle()); 3648 stream->Add("[%p]", *cell().handle());
3642 if (!details_.IsDontDelete()) stream->Add(" (deleteable)"); 3649 if (!details_.IsDontDelete()) stream->Add(" (deleteable)");
3643 if (details_.IsReadOnly()) stream->Add(" (read-only)"); 3650 if (details_.IsReadOnly()) stream->Add(" (read-only)");
3644 } 3651 }
3645 3652
3646 3653
3647 bool HLoadGlobalCell::RequiresHoleCheck() const { 3654 bool HLoadGlobalCell::RequiresHoleCheck() const {
3648 if (details_.IsDontDelete() && !details_.IsReadOnly()) return false; 3655 if (details_.IsDontDelete() && !details_.IsReadOnly()) return false;
3649 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { 3656 for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
4776 break; 4783 break;
4777 case kExternalMemory: 4784 case kExternalMemory:
4778 stream->Add("[external-memory]"); 4785 stream->Add("[external-memory]");
4779 break; 4786 break;
4780 } 4787 }
4781 4788
4782 stream->Add("@%d", offset()); 4789 stream->Add("@%d", offset());
4783 } 4790 }
4784 4791
4785 } } // namespace v8::internal 4792 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « 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