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

Side by Side Diff: src/arm/assembler-arm.cc

Issue 240193002: Serializer enable/disable flags need thread safety. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 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
« no previous file with comments | « no previous file | src/arm64/assembler-arm64.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 (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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 return false; 1072 return false;
1073 } 1073 }
1074 1074
1075 1075
1076 // We have to use the temporary register for things that can be relocated even 1076 // We have to use the temporary register for things that can be relocated even
1077 // if they can be encoded in the ARM's 12 bits of immediate-offset instruction 1077 // if they can be encoded in the ARM's 12 bits of immediate-offset instruction
1078 // space. There is no guarantee that the relocated location can be similarly 1078 // space. There is no guarantee that the relocated location can be similarly
1079 // encoded. 1079 // encoded.
1080 bool Operand::must_output_reloc_info(const Assembler* assembler) const { 1080 bool Operand::must_output_reloc_info(const Assembler* assembler) const {
1081 if (rmode_ == RelocInfo::EXTERNAL_REFERENCE) { 1081 if (rmode_ == RelocInfo::EXTERNAL_REFERENCE) {
1082 #ifdef DEBUG 1082 #ifdef DEBUG
Sven Panne 2014/04/16 09:18:46 Why do we wrap this into #ifdef DEBUG here plus so
mvstanton 2014/04/16 13:43:30 Thx Sven you got me wondering why we have this cal
1083 if (!Serializer::enabled()) { 1083 Serializer::TrySetPermanentlyDisabled();
1084 Serializer::TooLateToEnableNow();
1085 }
1086 #endif // def DEBUG 1084 #endif // def DEBUG
1087 if (assembler != NULL && assembler->predictable_code_size()) return true; 1085 if (assembler != NULL && assembler->predictable_code_size()) return true;
1088 return Serializer::enabled(); 1086 return Serializer::enabled();
1089 } else if (RelocInfo::IsNone(rmode_)) { 1087 } else if (RelocInfo::IsNone(rmode_)) {
1090 return false; 1088 return false;
1091 } 1089 }
1092 return true; 1090 return true;
1093 } 1091 }
1094 1092
1095 1093
(...skipping 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 RelocInfo rinfo(pc_, rmode, data, NULL); 3259 RelocInfo rinfo(pc_, rmode, data, NULL);
3262 RecordRelocInfo(rinfo); 3260 RecordRelocInfo(rinfo);
3263 } 3261 }
3264 3262
3265 3263
3266 void Assembler::RecordRelocInfo(const RelocInfo& rinfo) { 3264 void Assembler::RecordRelocInfo(const RelocInfo& rinfo) {
3267 if (!RelocInfo::IsNone(rinfo.rmode())) { 3265 if (!RelocInfo::IsNone(rinfo.rmode())) {
3268 // Don't record external references unless the heap will be serialized. 3266 // Don't record external references unless the heap will be serialized.
3269 if (rinfo.rmode() == RelocInfo::EXTERNAL_REFERENCE) { 3267 if (rinfo.rmode() == RelocInfo::EXTERNAL_REFERENCE) {
3270 #ifdef DEBUG 3268 #ifdef DEBUG
3271 if (!Serializer::enabled()) { 3269 Serializer::TrySetPermanentlyDisabled();
3272 Serializer::TooLateToEnableNow();
3273 }
3274 #endif 3270 #endif
3275 if (!Serializer::enabled() && !emit_debug_code()) { 3271 if (!Serializer::enabled() && !emit_debug_code()) {
3276 return; 3272 return;
3277 } 3273 }
3278 } 3274 }
3279 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here 3275 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here
3280 if (rinfo.rmode() == RelocInfo::CODE_TARGET_WITH_ID) { 3276 if (rinfo.rmode() == RelocInfo::CODE_TARGET_WITH_ID) {
3281 RelocInfo reloc_info_with_ast_id(rinfo.pc(), 3277 RelocInfo reloc_info_with_ast_id(rinfo.pc(),
3282 rinfo.rmode(), 3278 rinfo.rmode(),
3283 RecordedAstId().ToInt(), 3279 RecordedAstId().ToInt(),
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
3733 ASSERT((index_64bit == count_of_64bit_) && 3729 ASSERT((index_64bit == count_of_64bit_) &&
3734 (index_code_ptr == (index_64bit + count_of_code_ptr_)) && 3730 (index_code_ptr == (index_64bit + count_of_code_ptr_)) &&
3735 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) && 3731 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) &&
3736 (index_32bit == (index_heap_ptr + count_of_32bit_))); 3732 (index_32bit == (index_heap_ptr + count_of_32bit_)));
3737 } 3733 }
3738 3734
3739 3735
3740 } } // namespace v8::internal 3736 } } // namespace v8::internal
3741 3737
3742 #endif // V8_TARGET_ARCH_ARM 3738 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698