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

Side by Side Diff: src/hydrogen.cc

Issue 553373002: Version 3.28.71.9 (merged r23691) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.28
Patch Set: Created 6 years, 3 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 | « no previous file | src/version.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 8782 matching lines...) Expand 10 before | Expand all | Expand 10 after
8793 } else { 8793 } else {
8794 DCHECK_EQ(kLastIndexOf, mode); 8794 DCHECK_EQ(kLastIndexOf, mode);
8795 initial = length; 8795 initial = length;
8796 terminating = graph()->GetConstant0(); 8796 terminating = graph()->GetConstant0();
8797 token = Token::GT; 8797 token = Token::GT;
8798 direction = LoopBuilder::kPreDecrement; 8798 direction = LoopBuilder::kPreDecrement;
8799 } 8799 }
8800 8800
8801 Push(graph()->GetConstantMinus1()); 8801 Push(graph()->GetConstantMinus1());
8802 if (IsFastDoubleElementsKind(kind) || IsFastSmiElementsKind(kind)) { 8802 if (IsFastDoubleElementsKind(kind) || IsFastSmiElementsKind(kind)) {
8803 // Make sure that we can actually compare numbers correctly below, see
8804 // https://code.google.com/p/chromium/issues/detail?id=407946 for details.
8805 search_element = AddUncasted<HForceRepresentation>(
8806 search_element, IsFastSmiElementsKind(kind) ? Representation::Smi()
8807 : Representation::Double());
8808
8803 LoopBuilder loop(this, context(), direction); 8809 LoopBuilder loop(this, context(), direction);
8804 { 8810 {
8805 HValue* index = loop.BeginBody(initial, terminating, token); 8811 HValue* index = loop.BeginBody(initial, terminating, token);
8806 HValue* element = AddUncasted<HLoadKeyed>( 8812 HValue* element = AddUncasted<HLoadKeyed>(
8807 elements, index, static_cast<HValue*>(NULL), 8813 elements, index, static_cast<HValue*>(NULL),
8808 kind, ALLOW_RETURN_HOLE); 8814 kind, ALLOW_RETURN_HOLE);
8809 IfBuilder if_issame(this); 8815 IfBuilder if_issame(this);
8810 if (IsFastDoubleElementsKind(kind)) { 8816 if_issame.If<HCompareNumericAndBranch>(element, search_element,
8811 if_issame.If<HCompareNumericAndBranch>( 8817 Token::EQ_STRICT);
8812 element, search_element, Token::EQ_STRICT);
8813 } else {
8814 if_issame.If<HCompareObjectEqAndBranch>(element, search_element);
8815 }
8816 if_issame.Then(); 8818 if_issame.Then();
8817 { 8819 {
8818 Drop(1); 8820 Drop(1);
8819 Push(index); 8821 Push(index);
8820 loop.Break(); 8822 loop.Break();
8821 } 8823 }
8822 if_issame.End(); 8824 if_issame.End();
8823 } 8825 }
8824 loop.EndBody(); 8826 loop.EndBody();
8825 } else { 8827 } else {
(...skipping 3655 matching lines...) Expand 10 before | Expand all | Expand 10 after
12481 if (ShouldProduceTraceOutput()) { 12483 if (ShouldProduceTraceOutput()) {
12482 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12484 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12483 } 12485 }
12484 12486
12485 #ifdef DEBUG 12487 #ifdef DEBUG
12486 graph_->Verify(false); // No full verify. 12488 graph_->Verify(false); // No full verify.
12487 #endif 12489 #endif
12488 } 12490 }
12489 12491
12490 } } // namespace v8::internal 12492 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698