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

Side by Side Diff: src/conversions-inl.h

Issue 12210083: Renamed "symbols" to "internalized strings" throughout the code base, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Yang's comments Created 7 years, 10 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/code-stubs-hydrogen.cc ('k') | src/debug.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 // Ignore leading sign. 474 // Ignore leading sign.
475 ++current; 475 ++current;
476 if (current == end) return JunkStringValue(); 476 if (current == end) return JunkStringValue();
477 sign = POSITIVE; 477 sign = POSITIVE;
478 } else if (*current == '-') { 478 } else if (*current == '-') {
479 ++current; 479 ++current;
480 if (current == end) return JunkStringValue(); 480 if (current == end) return JunkStringValue();
481 sign = NEGATIVE; 481 sign = NEGATIVE;
482 } 482 }
483 483
484 static const char kInfinitySymbol[] = "Infinity"; 484 static const char kInfinityString[] = "Infinity";
485 if (*current == kInfinitySymbol[0]) { 485 if (*current == kInfinityString[0]) {
486 if (!SubStringEquals(&current, end, kInfinitySymbol)) { 486 if (!SubStringEquals(&current, end, kInfinityString)) {
487 return JunkStringValue(); 487 return JunkStringValue();
488 } 488 }
489 489
490 if (!allow_trailing_junk && 490 if (!allow_trailing_junk &&
491 AdvanceToNonspace(unicode_cache, &current, end)) { 491 AdvanceToNonspace(unicode_cache, &current, end)) {
492 return JunkStringValue(); 492 return JunkStringValue();
493 } 493 }
494 494
495 ASSERT(buffer_pos == 0); 495 ASSERT(buffer_pos == 0);
496 return (sign == NEGATIVE) ? -V8_INFINITY : V8_INFINITY; 496 return (sign == NEGATIVE) ? -V8_INFINITY : V8_INFINITY;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 ASSERT(buffer_pos < kBufferSize); 669 ASSERT(buffer_pos < kBufferSize);
670 buffer[buffer_pos] = '\0'; 670 buffer[buffer_pos] = '\0';
671 671
672 double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent); 672 double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent);
673 return (sign == NEGATIVE) ? -converted : converted; 673 return (sign == NEGATIVE) ? -converted : converted;
674 } 674 }
675 675
676 } } // namespace v8::internal 676 } } // namespace v8::internal
677 677
678 #endif // V8_CONVERSIONS_INL_H_ 678 #endif // V8_CONVERSIONS_INL_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698