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

Side by Side Diff: src/hydrogen.cc

Issue 313233005: Fix missing smi check in inlined indexOf/lastIndexOf. (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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-382513.js » ('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 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 8520 matching lines...) Expand 10 before | Expand all | Expand 10 after
8531 HValue* search_number = Add<HLoadNamedField>( 8531 HValue* search_number = Add<HLoadNamedField>(
8532 search_element, isheapnumber, 8532 search_element, isheapnumber,
8533 HObjectAccess::ForHeapNumberValue()); 8533 HObjectAccess::ForHeapNumberValue());
8534 LoopBuilder loop(this, context(), direction); 8534 LoopBuilder loop(this, context(), direction);
8535 { 8535 {
8536 HValue* index = loop.BeginBody(initial, terminating, token); 8536 HValue* index = loop.BeginBody(initial, terminating, token);
8537 HValue* element = AddUncasted<HLoadKeyed>( 8537 HValue* element = AddUncasted<HLoadKeyed>(
8538 elements, index, static_cast<HValue*>(NULL), 8538 elements, index, static_cast<HValue*>(NULL),
8539 kind, ALLOW_RETURN_HOLE); 8539 kind, ALLOW_RETURN_HOLE);
8540 IfBuilder if_issame(this); 8540 IfBuilder if_issame(this);
8541 HCompareMap* issame = if_issame.If<HCompareMap>( 8541 if_issame.IfNot<HIsSmiAndBranch>(element);
8542 HCompareMap* issame = if_issame.AndIf<HCompareMap>(
8542 element, isolate()->factory()->heap_number_map()); 8543 element, isolate()->factory()->heap_number_map());
8543 if_issame.And(); 8544 if_issame.And();
8544 HValue* number = Add<HLoadNamedField>( 8545 HValue* number = Add<HLoadNamedField>(
8545 element, issame, HObjectAccess::ForHeapNumberValue()); 8546 element, issame, HObjectAccess::ForHeapNumberValue());
8546 if_issame.If<HCompareNumericAndBranch>( 8547 if_issame.If<HCompareNumericAndBranch>(
8547 number, search_number, Token::EQ_STRICT); 8548 number, search_number, Token::EQ_STRICT);
8548 if_issame.Then(); 8549 if_issame.Then();
8549 { 8550 {
8550 Drop(1); 8551 Drop(1);
8551 Push(index); 8552 Push(index);
(...skipping 3587 matching lines...) Expand 10 before | Expand all | Expand 10 after
12139 if (ShouldProduceTraceOutput()) { 12140 if (ShouldProduceTraceOutput()) {
12140 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12141 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12141 } 12142 }
12142 12143
12143 #ifdef DEBUG 12144 #ifdef DEBUG
12144 graph_->Verify(false); // No full verify. 12145 graph_->Verify(false); // No full verify.
12145 #endif 12146 #endif
12146 } 12147 }
12147 12148
12148 } } // namespace v8::internal 12149 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-382513.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698