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

Side by Side Diff: src/dateparser.cc

Issue 18509003: Keep two empty lines between declarations for cpp files (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/d8.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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if (!IsHour(hour) || !IsMinute(minute) || 105 if (!IsHour(hour) || !IsMinute(minute) ||
106 !IsSecond(second) || !IsMillisecond(millisecond)) return false; 106 !IsSecond(second) || !IsMillisecond(millisecond)) return false;
107 107
108 output->set(HOUR, Smi::FromInt(hour)); 108 output->set(HOUR, Smi::FromInt(hour));
109 output->set(MINUTE, Smi::FromInt(minute)); 109 output->set(MINUTE, Smi::FromInt(minute));
110 output->set(SECOND, Smi::FromInt(second)); 110 output->set(SECOND, Smi::FromInt(second));
111 output->set(MILLISECOND, Smi::FromInt(millisecond)); 111 output->set(MILLISECOND, Smi::FromInt(millisecond));
112 return true; 112 return true;
113 } 113 }
114 114
115
115 bool DateParser::TimeZoneComposer::Write(FixedArray* output) { 116 bool DateParser::TimeZoneComposer::Write(FixedArray* output) {
116 if (sign_ != kNone) { 117 if (sign_ != kNone) {
117 if (hour_ == kNone) hour_ = 0; 118 if (hour_ == kNone) hour_ = 0;
118 if (minute_ == kNone) minute_ = 0; 119 if (minute_ == kNone) minute_ = 0;
119 int total_seconds = sign_ * (hour_ * 3600 + minute_ * 60); 120 int total_seconds = sign_ * (hour_ * 3600 + minute_ * 60);
120 if (!Smi::IsValid(total_seconds)) return false; 121 if (!Smi::IsValid(total_seconds)) return false;
121 output->set(UTC_OFFSET, Smi::FromInt(total_seconds)); 122 output->set(UTC_OFFSET, Smi::FromInt(total_seconds));
122 } else { 123 } else {
123 output->set_null(UTC_OFFSET); 124 output->set_null(UTC_OFFSET);
124 } 125 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 factor *= 10; 204 factor *= 10;
204 length--; 205 length--;
205 } while (length > 3); 206 } while (length > 3);
206 number /= factor; 207 number /= factor;
207 } 208 }
208 return number; 209 return number;
209 } 210 }
210 211
211 212
212 } } // namespace v8::internal 213 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698