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

Side by Side Diff: src/ic.cc

Issue 14362023: Replace math.h with cmath (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 7 years, 8 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.cc ('k') | src/isolate.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 } 1253 }
1254 return Handle<Code>::null(); 1254 return Handle<Code>::null();
1255 } 1255 }
1256 1256
1257 1257
1258 static Handle<Object> TryConvertKey(Handle<Object> key, Isolate* isolate) { 1258 static Handle<Object> TryConvertKey(Handle<Object> key, Isolate* isolate) {
1259 // This helper implements a few common fast cases for converting 1259 // This helper implements a few common fast cases for converting
1260 // non-smi keys of keyed loads/stores to a smi or a string. 1260 // non-smi keys of keyed loads/stores to a smi or a string.
1261 if (key->IsHeapNumber()) { 1261 if (key->IsHeapNumber()) {
1262 double value = Handle<HeapNumber>::cast(key)->value(); 1262 double value = Handle<HeapNumber>::cast(key)->value();
1263 if (isnan(value)) { 1263 if (std::isnan(value)) {
1264 key = isolate->factory()->nan_string(); 1264 key = isolate->factory()->nan_string();
1265 } else { 1265 } else {
1266 int int_value = FastD2I(value); 1266 int int_value = FastD2I(value);
1267 if (value == int_value && Smi::IsValid(int_value)) { 1267 if (value == int_value && Smi::IsValid(int_value)) {
1268 key = Handle<Smi>(Smi::FromInt(int_value), isolate); 1268 key = Handle<Smi>(Smi::FromInt(int_value), isolate);
1269 } 1269 }
1270 } 1270 }
1271 } else if (key->IsUndefined()) { 1271 } else if (key->IsUndefined()) {
1272 key = isolate->factory()->undefined_string(); 1272 key = isolate->factory()->undefined_string();
1273 } 1273 }
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
2805 #undef ADDR 2805 #undef ADDR
2806 }; 2806 };
2807 2807
2808 2808
2809 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2809 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2810 return IC_utilities[id]; 2810 return IC_utilities[id];
2811 } 2811 }
2812 2812
2813 2813
2814 } } // namespace v8::internal 2814 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698