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

Side by Side Diff: src/log-utils.cc

Issue 646007: Kill some unused code. (Closed)
Patch Set: some more Created 10 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
« no previous file with comments | « src/log-utils.h ('k') | src/utils.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 void LogMessageBuilder::WriteToLogFile() { 345 void LogMessageBuilder::WriteToLogFile() {
346 ASSERT(pos_ <= Log::kMessageBufferSize); 346 ASSERT(pos_ <= Log::kMessageBufferSize);
347 const int written = Log::Write(Log::message_buffer_, pos_); 347 const int written = Log::Write(Log::message_buffer_, pos_);
348 if (written != pos_ && write_failure_handler != NULL) { 348 if (written != pos_ && write_failure_handler != NULL) {
349 write_failure_handler(); 349 write_failure_handler();
350 } 350 }
351 } 351 }
352 352
353 353
354 void LogMessageBuilder::WriteCStringToLogFile(const char* str) {
355 const int len = StrLength(str);
356 const int written = Log::Write(str, len);
357 if (written != len && write_failure_handler != NULL) {
358 write_failure_handler();
359 }
360 }
361
362
363 // Formatting string for back references to the whole line. E.g. "#2" means 354 // Formatting string for back references to the whole line. E.g. "#2" means
364 // "the second line above". 355 // "the second line above".
365 const char* LogRecordCompressor::kLineBackwardReferenceFormat = "#%d"; 356 const char* LogRecordCompressor::kLineBackwardReferenceFormat = "#%d";
366 357
367 // Formatting string for back references. E.g. "#2:10" means 358 // Formatting string for back references. E.g. "#2:10" means
368 // "the second line above, start from char 10 (0-based)". 359 // "the second line above, start from char 10 (0-based)".
369 const char* LogRecordCompressor::kBackwardReferenceFormat = "#%d:%d"; 360 const char* LogRecordCompressor::kBackwardReferenceFormat = "#%d:%d";
370 361
371 362
372 LogRecordCompressor::~LogRecordCompressor() { 363 LogRecordCompressor::~LogRecordCompressor() {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 PrintBackwardReference(backref, best.distance, best.copy_from_pos); 485 PrintBackwardReference(backref, best.distance, best.copy_from_pos);
495 ASSERT(strlen(backref.start()) - best.backref_size == 0); 486 ASSERT(strlen(backref.start()) - best.backref_size == 0);
496 prev_record->Truncate(static_cast<int>(unchanged_len + best.backref_size)); 487 prev_record->Truncate(static_cast<int>(unchanged_len + best.backref_size));
497 } 488 }
498 return true; 489 return true;
499 } 490 }
500 491
501 #endif // ENABLE_LOGGING_AND_PROFILING 492 #endif // ENABLE_LOGGING_AND_PROFILING
502 493
503 } } // namespace v8::internal 494 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log-utils.h ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698