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

Side by Side Diff: src/hydrogen.cc

Issue 864803002: Remove deprecated v8::base::OS::nan_value(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix invalid test expectation. Created 5 years, 11 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/hydrogen-instructions.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 <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 10263 matching lines...) Expand 10 before | Expand all | Expand 10 after
10274 HInstruction* HOptimizedGraphBuilder::BuildStringCharCodeAt( 10274 HInstruction* HOptimizedGraphBuilder::BuildStringCharCodeAt(
10275 HValue* string, 10275 HValue* string,
10276 HValue* index) { 10276 HValue* index) {
10277 if (string->IsConstant() && index->IsConstant()) { 10277 if (string->IsConstant() && index->IsConstant()) {
10278 HConstant* c_string = HConstant::cast(string); 10278 HConstant* c_string = HConstant::cast(string);
10279 HConstant* c_index = HConstant::cast(index); 10279 HConstant* c_index = HConstant::cast(index);
10280 if (c_string->HasStringValue() && c_index->HasNumberValue()) { 10280 if (c_string->HasStringValue() && c_index->HasNumberValue()) {
10281 int32_t i = c_index->NumberValueAsInteger32(); 10281 int32_t i = c_index->NumberValueAsInteger32();
10282 Handle<String> s = c_string->StringValue(); 10282 Handle<String> s = c_string->StringValue();
10283 if (i < 0 || i >= s->length()) { 10283 if (i < 0 || i >= s->length()) {
10284 return New<HConstant>(base::OS::nan_value()); 10284 return New<HConstant>(std::numeric_limits<double>::quiet_NaN());
10285 } 10285 }
10286 return New<HConstant>(s->Get(i)); 10286 return New<HConstant>(s->Get(i));
10287 } 10287 }
10288 } 10288 }
10289 string = BuildCheckString(string); 10289 string = BuildCheckString(string);
10290 index = Add<HBoundsCheck>(index, AddLoadStringLength(string)); 10290 index = Add<HBoundsCheck>(index, AddLoadStringLength(string));
10291 return New<HStringCharCodeAt>(string, index); 10291 return New<HStringCharCodeAt>(string, index);
10292 } 10292 }
10293 10293
10294 10294
(...skipping 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after
13463 if (ShouldProduceTraceOutput()) { 13463 if (ShouldProduceTraceOutput()) {
13464 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13464 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13465 } 13465 }
13466 13466
13467 #ifdef DEBUG 13467 #ifdef DEBUG
13468 graph_->Verify(false); // No full verify. 13468 graph_->Verify(false); // No full verify.
13469 #endif 13469 #endif
13470 } 13470 }
13471 13471
13472 } } // namespace v8::internal 13472 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698