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

Side by Side Diff: src/serialize.cc

Issue 1940: Replaced calls to functions that msvc consider deprecated. Used... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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/prettyprinter.cc ('k') | src/string-stream.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 DEBUG_ADDRESS, 504 DEBUG_ADDRESS,
505 Debug::k_after_break_target_address << kDebugIdShift, 505 Debug::k_after_break_target_address << kDebugIdShift,
506 "Debug::after_break_target_address()"); 506 "Debug::after_break_target_address()");
507 Add(Debug_Address(Debug::k_debug_break_return_address).address(), 507 Add(Debug_Address(Debug::k_debug_break_return_address).address(),
508 DEBUG_ADDRESS, 508 DEBUG_ADDRESS,
509 Debug::k_debug_break_return_address << kDebugIdShift, 509 Debug::k_debug_break_return_address << kDebugIdShift,
510 "Debug::debug_break_return_address()"); 510 "Debug::debug_break_return_address()");
511 const char* debug_register_format = "Debug::register_address(%i)"; 511 const char* debug_register_format = "Debug::register_address(%i)";
512 size_t dr_format_length = strlen(debug_register_format); 512 size_t dr_format_length = strlen(debug_register_format);
513 for (int i = 0; i < kNumJSCallerSaved; ++i) { 513 for (int i = 0; i < kNumJSCallerSaved; ++i) {
514 char* name = NewArray<char>(dr_format_length + 1); 514 Vector<char> name = Vector<char>::New(dr_format_length + 1);
515 OS::SNPrintF(name, dr_format_length, debug_register_format, i); 515 OS::SNPrintF(name, debug_register_format, i);
516 Add(Debug_Address(Debug::k_register_address, i).address(), 516 Add(Debug_Address(Debug::k_register_address, i).address(),
517 DEBUG_ADDRESS, 517 DEBUG_ADDRESS,
518 Debug::k_register_address << kDebugIdShift | i, 518 Debug::k_register_address << kDebugIdShift | i,
519 name); 519 name.start());
520 } 520 }
521 521
522 // Stat counters 522 // Stat counters
523 #define COUNTER_ENTRY(name, caption) \ 523 #define COUNTER_ENTRY(name, caption) \
524 Add(reinterpret_cast<Address>(GetInternalPointer(&Counters::name)), \ 524 Add(reinterpret_cast<Address>(GetInternalPointer(&Counters::name)), \
525 STATS_COUNTER, \ 525 STATS_COUNTER, \
526 Counters::k_##name, \ 526 Counters::k_##name, \
527 "Counters::" #name); 527 "Counters::" #name);
528 528
529 STATS_COUNTER_LIST_1(COUNTER_ENTRY) 529 STATS_COUNTER_LIST_1(COUNTER_ENTRY)
530 STATS_COUNTER_LIST_2(COUNTER_ENTRY) 530 STATS_COUNTER_LIST_2(COUNTER_ENTRY)
531 #undef COUNTER_ENTRY 531 #undef COUNTER_ENTRY
532 532
533 // Top addresses 533 // Top addresses
534 const char* top_address_format = "Top::get_address_from_id(%i)"; 534 const char* top_address_format = "Top::get_address_from_id(%i)";
535 size_t top_format_length = strlen(top_address_format); 535 size_t top_format_length = strlen(top_address_format);
536 for (uint16_t i = 0; i < Top::k_top_address_count; ++i) { 536 for (uint16_t i = 0; i < Top::k_top_address_count; ++i) {
537 char* name = NewArray<char>(top_format_length + 1); 537 Vector<char> name = Vector<char>::New(top_format_length + 1);
538 OS::SNPrintF(name, top_format_length, top_address_format, i); 538 const char* chars = name.start();
539 Add(Top::get_address_from_id((Top::AddressId)i), TOP_ADDRESS, i, name); 539 OS::SNPrintF(name, top_address_format, i);
540 Add(Top::get_address_from_id((Top::AddressId)i), TOP_ADDRESS, i, chars);
540 } 541 }
541 542
542 // Extensions 543 // Extensions
543 Add(FUNCTION_ADDR(GCExtension::GC), EXTENSION, 1, 544 Add(FUNCTION_ADDR(GCExtension::GC), EXTENSION, 1,
544 "GCExtension::GC"); 545 "GCExtension::GC");
545 Add(FUNCTION_ADDR(PrintExtension::Print), EXTENSION, 2, 546 Add(FUNCTION_ADDR(PrintExtension::Print), EXTENSION, 2,
546 "PrintExtension::Print"); 547 "PrintExtension::Print");
547 Add(FUNCTION_ADDR(LoadExtension::Load), EXTENSION, 3, 548 Add(FUNCTION_ADDR(LoadExtension::Load), EXTENSION, 3,
548 "LoadExtension::Load"); 549 "LoadExtension::Load");
549 Add(FUNCTION_ADDR(QuitExtension::Quit), EXTENSION, 4, 550 Add(FUNCTION_ADDR(QuitExtension::Quit), EXTENSION, 4,
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 ASSERT(index < large_objects_.length()); 1547 ASSERT(index < large_objects_.length());
1547 } 1548 }
1548 return large_objects_[index]; // s.page_offset() is ignored. 1549 return large_objects_[index]; // s.page_offset() is ignored.
1549 } 1550 }
1550 UNREACHABLE(); 1551 UNREACHABLE();
1551 return NULL; 1552 return NULL;
1552 } 1553 }
1553 1554
1554 1555
1555 } } // namespace v8::internal 1556 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/prettyprinter.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698