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

Unified Diff: src/diy-fp.h

Issue 7308004: Extract string->double and double->string conversions for use in the preparser. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git utd Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/conversions-inl.h ('k') | src/diy-fp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/diy-fp.h
diff --git a/src/diy-fp.h b/src/diy-fp.h
index cfe05ef7428b6b130ab4a0e2109f413f7856306f..26ff1a20bfc15fc252b02a718f69258262cc032e 100644
--- a/src/diy-fp.h
+++ b/src/diy-fp.h
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -80,7 +80,7 @@ class DiyFp {
// This method is mainly called for normalizing boundaries. In general
// boundaries need to be shifted by 10 bits. We thus optimize for this case.
- const uint64_t k10MSBits = V8_2PART_UINT64_C(0xFFC00000, 00000000);
+ const uint64_t k10MSBits = static_cast<uint64_t>(0x3FF) << 54;
while ((f & k10MSBits) == 0) {
f <<= 10;
e -= 10;
@@ -106,7 +106,7 @@ class DiyFp {
void set_e(int new_value) { e_ = new_value; }
private:
- static const uint64_t kUint64MSB = V8_2PART_UINT64_C(0x80000000, 00000000);
+ static const uint64_t kUint64MSB = static_cast<uint64_t>(1) << 63;
uint64_t f_;
int e_;
« no previous file with comments | « src/conversions-inl.h ('k') | src/diy-fp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698