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

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

Issue 240193002: Serializer enable/disable flags need thread safety. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comment response. 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 | « src/arm/assembler-arm.cc ('k') | src/flags.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following 10 // copyright notice, this list of conditions and the following
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } else { 266 } else {
267 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t)); 267 STATIC_ASSERT(sizeof(intptr_t) == sizeof(int64_t));
268 immediate_ = reinterpret_cast<intptr_t>(obj); 268 immediate_ = reinterpret_cast<intptr_t>(obj);
269 rmode_ = RelocInfo::NONE64; 269 rmode_ = RelocInfo::NONE64;
270 } 270 }
271 } 271 }
272 272
273 273
274 bool Operand::NeedsRelocation() const { 274 bool Operand::NeedsRelocation() const {
275 if (rmode_ == RelocInfo::EXTERNAL_REFERENCE) { 275 if (rmode_ == RelocInfo::EXTERNAL_REFERENCE) {
276 #ifdef DEBUG
277 if (!Serializer::enabled()) {
278 Serializer::TooLateToEnableNow();
279 }
280 #endif
281 return Serializer::enabled(); 276 return Serializer::enabled();
282 } 277 }
283 278
284 return !RelocInfo::IsNone(rmode_); 279 return !RelocInfo::IsNone(rmode_);
285 } 280 }
286 281
287 282
288 // Assembler 283 // Assembler
289 284
290 Assembler::Assembler(Isolate* isolate, void* buffer, int buffer_size) 285 Assembler::Assembler(Isolate* isolate, void* buffer, int buffer_size)
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 ASSERT(is_uint16(code)); 1958 ASSERT(is_uint16(code));
1964 Emit(BRK | ImmException(code)); 1959 Emit(BRK | ImmException(code));
1965 } 1960 }
1966 1961
1967 1962
1968 void Assembler::debug(const char* message, uint32_t code, Instr params) { 1963 void Assembler::debug(const char* message, uint32_t code, Instr params) {
1969 #ifdef USE_SIMULATOR 1964 #ifdef USE_SIMULATOR
1970 // Don't generate simulator specific code if we are building a snapshot, which 1965 // Don't generate simulator specific code if we are building a snapshot, which
1971 // might be run on real hardware. 1966 // might be run on real hardware.
1972 if (!Serializer::enabled()) { 1967 if (!Serializer::enabled()) {
1973 #ifdef DEBUG
1974 Serializer::TooLateToEnableNow();
1975 #endif
1976 // The arguments to the debug marker need to be contiguous in memory, so 1968 // The arguments to the debug marker need to be contiguous in memory, so
1977 // make sure we don't try to emit pools. 1969 // make sure we don't try to emit pools.
1978 BlockPoolsScope scope(this); 1970 BlockPoolsScope scope(this);
1979 1971
1980 Label start; 1972 Label start;
1981 bind(&start); 1973 bind(&start);
1982 1974
1983 // Refer to instructions-arm64.h for a description of the marker and its 1975 // Refer to instructions-arm64.h for a description of the marker and its
1984 // arguments. 1976 // arguments.
1985 hlt(kImmExceptionIsDebug); 1977 hlt(kImmExceptionIsDebug);
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2518 } 2510 }
2519 pending_reloc_info_[num_pending_reloc_info_++] = rinfo; 2511 pending_reloc_info_[num_pending_reloc_info_++] = rinfo;
2520 // Make sure the constant pool is not emitted in place of the next 2512 // Make sure the constant pool is not emitted in place of the next
2521 // instruction for which we just recorded relocation info. 2513 // instruction for which we just recorded relocation info.
2522 BlockConstPoolFor(1); 2514 BlockConstPoolFor(1);
2523 } 2515 }
2524 2516
2525 if (!RelocInfo::IsNone(rmode)) { 2517 if (!RelocInfo::IsNone(rmode)) {
2526 // Don't record external references unless the heap will be serialized. 2518 // Don't record external references unless the heap will be serialized.
2527 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { 2519 if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
2528 #ifdef DEBUG
2529 if (!Serializer::enabled()) {
2530 Serializer::TooLateToEnableNow();
2531 }
2532 #endif
2533 if (!Serializer::enabled() && !emit_debug_code()) { 2520 if (!Serializer::enabled() && !emit_debug_code()) {
2534 return; 2521 return;
2535 } 2522 }
2536 } 2523 }
2537 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here 2524 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here
2538 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { 2525 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) {
2539 RelocInfo reloc_info_with_ast_id( 2526 RelocInfo reloc_info_with_ast_id(
2540 reinterpret_cast<byte*>(pc_), rmode, RecordedAstId().ToInt(), NULL); 2527 reinterpret_cast<byte*>(pc_), rmode, RecordedAstId().ToInt(), NULL);
2541 ClearRecordedAstId(); 2528 ClearRecordedAstId();
2542 reloc_info_writer.Write(&reloc_info_with_ast_id); 2529 reloc_info_writer.Write(&reloc_info_with_ast_id);
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 adr(rd, 0); 2898 adr(rd, 0);
2912 MovInt64(scratch, target_offset); 2899 MovInt64(scratch, target_offset);
2913 add(rd, rd, scratch); 2900 add(rd, rd, scratch);
2914 } 2901 }
2915 } 2902 }
2916 2903
2917 2904
2918 } } // namespace v8::internal 2905 } } // namespace v8::internal
2919 2906
2920 #endif // V8_TARGET_ARCH_ARM64 2907 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698