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

Side by Side Diff: src/deoptimizer.cc

Issue 6677044: Use a class field instead of global FLAG_debug_code in assember and (Closed)
Patch Set: Created 9 years, 9 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/arm/macro-assembler-arm.cc ('k') | src/ia32/assembler-ia32.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 double_values_[frame_index].Add(value_desc); 916 double_values_[frame_index].Add(value_desc);
917 } 917 }
918 918
919 919
920 LargeObjectChunk* Deoptimizer::CreateCode(BailoutType type) { 920 LargeObjectChunk* Deoptimizer::CreateCode(BailoutType type) {
921 // We cannot run this if the serializer is enabled because this will 921 // We cannot run this if the serializer is enabled because this will
922 // cause us to emit relocation information for the external 922 // cause us to emit relocation information for the external
923 // references. This is fine because the deoptimizer's code section 923 // references. This is fine because the deoptimizer's code section
924 // isn't meant to be serialized at all. 924 // isn't meant to be serialized at all.
925 ASSERT(!Serializer::enabled()); 925 ASSERT(!Serializer::enabled());
926 bool old_debug_code = FLAG_debug_code;
927 FLAG_debug_code = false;
928 926
929 MacroAssembler masm(NULL, 16 * KB); 927 MacroAssembler masm(NULL, 16 * KB);
928 masm.set_emit_debug_code(false);
930 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type); 929 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type);
931 CodeDesc desc; 930 CodeDesc desc;
932 masm.GetCode(&desc); 931 masm.GetCode(&desc);
933 ASSERT(desc.reloc_size == 0); 932 ASSERT(desc.reloc_size == 0);
934 933
935 LargeObjectChunk* chunk = LargeObjectChunk::New(desc.instr_size, EXECUTABLE); 934 LargeObjectChunk* chunk = LargeObjectChunk::New(desc.instr_size, EXECUTABLE);
936 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); 935 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
937 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); 936 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
938 FLAG_debug_code = old_debug_code;
939 return chunk; 937 return chunk;
940 } 938 }
941 939
942 940
943 Code* Deoptimizer::FindDeoptimizingCodeFromAddress(Address addr) { 941 Code* Deoptimizer::FindDeoptimizingCodeFromAddress(Address addr) {
944 DeoptimizingCodeListNode* node = Deoptimizer::deoptimizing_code_list_; 942 DeoptimizingCodeListNode* node = Deoptimizer::deoptimizing_code_list_;
945 while (node != NULL) { 943 while (node != NULL) {
946 if (node->code()->contains(addr)) return *node->code(); 944 if (node->code()->contains(addr)) return *node->code();
947 node = node->next(); 945 node = node->next();
948 } 946 }
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 Deoptimizer::HandleWeakDeoptimizedCode); 1174 Deoptimizer::HandleWeakDeoptimizedCode);
1177 } 1175 }
1178 1176
1179 1177
1180 DeoptimizingCodeListNode::~DeoptimizingCodeListNode() { 1178 DeoptimizingCodeListNode::~DeoptimizingCodeListNode() {
1181 GlobalHandles::Destroy(reinterpret_cast<Object**>(code_.location())); 1179 GlobalHandles::Destroy(reinterpret_cast<Object**>(code_.location()));
1182 } 1180 }
1183 1181
1184 1182
1185 } } // namespace v8::internal 1183 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698