OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2710 #endif | 2710 #endif |
2711 if (!Serializer::enabled() && !emit_debug_code()) { | 2711 if (!Serializer::enabled() && !emit_debug_code()) { |
2712 return; | 2712 return; |
2713 } | 2713 } |
2714 } | 2714 } |
2715 RelocInfo rinfo(pc_, rmode, data, NULL); | 2715 RelocInfo rinfo(pc_, rmode, data, NULL); |
2716 reloc_info_writer.Write(&rinfo); | 2716 reloc_info_writer.Write(&rinfo); |
2717 } | 2717 } |
2718 | 2718 |
2719 | 2719 |
| 2720 MaybeObject* Assembler::AllocateConstantPool(Heap* heap) { |
| 2721 // No out-of-line constant pool support. |
| 2722 UNREACHABLE(); |
| 2723 return NULL; |
| 2724 } |
| 2725 |
| 2726 |
| 2727 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { |
| 2728 // No out-of-line constant pool support. |
| 2729 UNREACHABLE(); |
| 2730 } |
| 2731 |
| 2732 |
2720 #ifdef GENERATED_CODE_COVERAGE | 2733 #ifdef GENERATED_CODE_COVERAGE |
2721 static FILE* coverage_log = NULL; | 2734 static FILE* coverage_log = NULL; |
2722 | 2735 |
2723 | 2736 |
2724 static void InitCoverageLog() { | 2737 static void InitCoverageLog() { |
2725 char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG"); | 2738 char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG"); |
2726 if (file_name != NULL) { | 2739 if (file_name != NULL) { |
2727 coverage_log = fopen(file_name, "aw+"); | 2740 coverage_log = fopen(file_name, "aw+"); |
2728 } | 2741 } |
2729 } | 2742 } |
2730 | 2743 |
2731 | 2744 |
2732 void LogGeneratedCodeCoverage(const char* file_line) { | 2745 void LogGeneratedCodeCoverage(const char* file_line) { |
2733 const char* return_address = (&file_line)[-1]; | 2746 const char* return_address = (&file_line)[-1]; |
2734 char* push_insn = const_cast<char*>(return_address - 12); | 2747 char* push_insn = const_cast<char*>(return_address - 12); |
2735 push_insn[0] = 0xeb; // Relative branch insn. | 2748 push_insn[0] = 0xeb; // Relative branch insn. |
2736 push_insn[1] = 13; // Skip over coverage insns. | 2749 push_insn[1] = 13; // Skip over coverage insns. |
2737 if (coverage_log != NULL) { | 2750 if (coverage_log != NULL) { |
2738 fprintf(coverage_log, "%s\n", file_line); | 2751 fprintf(coverage_log, "%s\n", file_line); |
2739 fflush(coverage_log); | 2752 fflush(coverage_log); |
2740 } | 2753 } |
2741 } | 2754 } |
2742 | 2755 |
2743 #endif | 2756 #endif |
2744 | 2757 |
2745 } } // namespace v8::internal | 2758 } } // namespace v8::internal |
2746 | 2759 |
2747 #endif // V8_TARGET_ARCH_IA32 | 2760 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |