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

Side by Side Diff: src/serialize.cc

Issue 77035: Add ENABLE_DEBUGGER_SUPPORT macro.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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
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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 "IC::" #name }, 541 "IC::" #name },
542 542
543 IC_UTIL_LIST(IC_ENTRY) 543 IC_UTIL_LIST(IC_ENTRY)
544 #undef IC_ENTRY 544 #undef IC_ENTRY
545 }; // end of ref_table[]. 545 }; // end of ref_table[].
546 546
547 for (size_t i = 0; i < ARRAY_SIZE(ref_table); ++i) { 547 for (size_t i = 0; i < ARRAY_SIZE(ref_table); ++i) {
548 AddFromId(ref_table[i].type, ref_table[i].id, ref_table[i].name); 548 AddFromId(ref_table[i].type, ref_table[i].id, ref_table[i].name);
549 } 549 }
550 550
551 #ifdef ENABLE_DEBUGGER_SUPPORT
551 // Debug addresses 552 // Debug addresses
552 Add(Debug_Address(Debug::k_after_break_target_address).address(), 553 Add(Debug_Address(Debug::k_after_break_target_address).address(),
553 DEBUG_ADDRESS, 554 DEBUG_ADDRESS,
554 Debug::k_after_break_target_address << kDebugIdShift, 555 Debug::k_after_break_target_address << kDebugIdShift,
555 "Debug::after_break_target_address()"); 556 "Debug::after_break_target_address()");
556 Add(Debug_Address(Debug::k_debug_break_return_address).address(), 557 Add(Debug_Address(Debug::k_debug_break_return_address).address(),
557 DEBUG_ADDRESS, 558 DEBUG_ADDRESS,
558 Debug::k_debug_break_return_address << kDebugIdShift, 559 Debug::k_debug_break_return_address << kDebugIdShift,
559 "Debug::debug_break_return_address()"); 560 "Debug::debug_break_return_address()");
560 const char* debug_register_format = "Debug::register_address(%i)"; 561 const char* debug_register_format = "Debug::register_address(%i)";
561 size_t dr_format_length = strlen(debug_register_format); 562 size_t dr_format_length = strlen(debug_register_format);
562 for (int i = 0; i < kNumJSCallerSaved; ++i) { 563 for (int i = 0; i < kNumJSCallerSaved; ++i) {
563 Vector<char> name = Vector<char>::New(dr_format_length + 1); 564 Vector<char> name = Vector<char>::New(dr_format_length + 1);
564 OS::SNPrintF(name, debug_register_format, i); 565 OS::SNPrintF(name, debug_register_format, i);
565 Add(Debug_Address(Debug::k_register_address, i).address(), 566 Add(Debug_Address(Debug::k_register_address, i).address(),
566 DEBUG_ADDRESS, 567 DEBUG_ADDRESS,
567 Debug::k_register_address << kDebugIdShift | i, 568 Debug::k_register_address << kDebugIdShift | i,
568 name.start()); 569 name.start());
569 } 570 }
571 #endif
570 572
571 // Stat counters 573 // Stat counters
572 struct StatsRefTableEntry { 574 struct StatsRefTableEntry {
573 StatsCounter* counter; 575 StatsCounter* counter;
574 uint16_t id; 576 uint16_t id;
575 const char* name; 577 const char* name;
576 }; 578 };
577 579
578 static const StatsRefTableEntry stats_ref_table[] = { 580 static const StatsRefTableEntry stats_ref_table[] = {
579 #define COUNTER_ENTRY(name, caption) \ 581 #define COUNTER_ENTRY(name, caption) \
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 2, 654 2,
653 "Factory::the_hole_value().location()"); 655 "Factory::the_hole_value().location()");
654 Add(ExternalReference::address_of_stack_guard_limit().address(), 656 Add(ExternalReference::address_of_stack_guard_limit().address(),
655 UNCLASSIFIED, 657 UNCLASSIFIED,
656 3, 658 3,
657 "StackGuard::address_of_jslimit()"); 659 "StackGuard::address_of_jslimit()");
658 Add(ExternalReference::address_of_regexp_stack_limit().address(), 660 Add(ExternalReference::address_of_regexp_stack_limit().address(),
659 UNCLASSIFIED, 661 UNCLASSIFIED,
660 4, 662 4,
661 "RegExpStack::limit_address()"); 663 "RegExpStack::limit_address()");
662 Add(ExternalReference::debug_break().address(),
663 UNCLASSIFIED,
664 5,
665 "Debug::Break()");
666 Add(ExternalReference::new_space_start().address(), 664 Add(ExternalReference::new_space_start().address(),
667 UNCLASSIFIED, 665 UNCLASSIFIED,
668 6, 666 6,
669 "Heap::NewSpaceStart()"); 667 "Heap::NewSpaceStart()");
670 Add(ExternalReference::heap_always_allocate_scope_depth().address(), 668 Add(ExternalReference::heap_always_allocate_scope_depth().address(),
671 UNCLASSIFIED, 669 UNCLASSIFIED,
672 7, 670 7,
673 "Heap::always_allocate_scope_depth()"); 671 "Heap::always_allocate_scope_depth()");
674 Add(ExternalReference::new_space_allocation_limit_address().address(), 672 Add(ExternalReference::new_space_allocation_limit_address().address(),
675 UNCLASSIFIED, 673 UNCLASSIFIED,
676 8, 674 8,
677 "Heap::NewSpaceAllocationLimitAddress()"); 675 "Heap::NewSpaceAllocationLimitAddress()");
678 Add(ExternalReference::new_space_allocation_top_address().address(), 676 Add(ExternalReference::new_space_allocation_top_address().address(),
679 UNCLASSIFIED, 677 UNCLASSIFIED,
680 9, 678 9,
681 "Heap::NewSpaceAllocationTopAddress()"); 679 "Heap::NewSpaceAllocationTopAddress()");
680 #ifdef ENABLE_DEBUGGER_SUPPORT
681 Add(ExternalReference::debug_break().address(),
682 UNCLASSIFIED,
683 5,
Søren Thygesen Gjesse 2009/04/17 23:46:17 Why not re-number these?
684 "Debug::Break()");
682 Add(ExternalReference::debug_step_in_fp_address().address(), 685 Add(ExternalReference::debug_step_in_fp_address().address(),
683 UNCLASSIFIED, 686 UNCLASSIFIED,
684 10, 687 10,
685 "Debug::step_in_fp_addr()"); 688 "Debug::step_in_fp_addr()");
686 Add(ExternalReference::double_fp_operation(Token::ADD).address(), 689 Add(ExternalReference::double_fp_operation(Token::ADD).address(),
687 UNCLASSIFIED, 690 UNCLASSIFIED,
688 11, 691 11,
689 "add_two_doubles"); 692 "add_two_doubles");
690 Add(ExternalReference::double_fp_operation(Token::SUB).address(), 693 Add(ExternalReference::double_fp_operation(Token::SUB).address(),
691 UNCLASSIFIED, 694 UNCLASSIFIED,
692 12, 695 12,
693 "sub_two_doubles"); 696 "sub_two_doubles");
694 Add(ExternalReference::double_fp_operation(Token::MUL).address(), 697 Add(ExternalReference::double_fp_operation(Token::MUL).address(),
695 UNCLASSIFIED, 698 UNCLASSIFIED,
696 13, 699 13,
697 "mul_two_doubles"); 700 "mul_two_doubles");
701 #endif
698 } 702 }
699 703
700 704
701 ExternalReferenceEncoder::ExternalReferenceEncoder() 705 ExternalReferenceEncoder::ExternalReferenceEncoder()
702 : encodings_(Match) { 706 : encodings_(Match) {
703 ExternalReferenceTable* external_references = 707 ExternalReferenceTable* external_references =
704 ExternalReferenceTable::instance(); 708 ExternalReferenceTable::instance();
705 for (int i = 0; i < external_references->size(); ++i) { 709 for (int i = 0; i < external_references->size(); ++i) {
706 Put(external_references->address(i), i); 710 Put(external_references->address(i), i);
707 } 711 }
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 ASSERT(index < large_objects_.length()); 1603 ASSERT(index < large_objects_.length());
1600 } 1604 }
1601 return large_objects_[index]; // s.page_offset() is ignored. 1605 return large_objects_[index]; // s.page_offset() is ignored.
1602 } 1606 }
1603 UNREACHABLE(); 1607 UNREACHABLE();
1604 return NULL; 1608 return NULL;
1605 } 1609 }
1606 1610
1607 1611
1608 } } // namespace v8::internal 1612 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/stub-cache.h » ('j') | src/stub-cache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698