OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 Smi::FromInt(-delta)); | 303 Smi::FromInt(-delta)); |
304 } | 304 } |
305 | 305 |
306 | 306 |
307 void FullCodeGenerator::EmitProfilingCounterReset() { | 307 void FullCodeGenerator::EmitProfilingCounterReset() { |
308 int reset_value = FLAG_interrupt_budget; | 308 int reset_value = FLAG_interrupt_budget; |
309 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { | 309 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { |
310 // Self-optimization is a one-off thing; if it fails, don't try again. | 310 // Self-optimization is a one-off thing; if it fails, don't try again. |
311 reset_value = Smi::kMaxValue; | 311 reset_value = Smi::kMaxValue; |
312 } | 312 } |
313 if (isolate()->IsDebuggerActive()) { | |
314 // Detect debug break requests as soon as possible. | |
315 reset_value = 10; | |
316 } | |
317 __ movq(rbx, profiling_counter_, RelocInfo::EMBEDDED_OBJECT); | 313 __ movq(rbx, profiling_counter_, RelocInfo::EMBEDDED_OBJECT); |
318 __ movq(kScratchRegister, | 314 __ movq(kScratchRegister, |
319 reinterpret_cast<uint64_t>(Smi::FromInt(reset_value)), | 315 reinterpret_cast<uint64_t>(Smi::FromInt(reset_value)), |
320 RelocInfo::NONE); | 316 RelocInfo::NONE); |
321 __ movq(FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset), | 317 __ movq(FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset), |
322 kScratchRegister); | 318 kScratchRegister); |
323 } | 319 } |
324 | 320 |
325 | 321 |
326 static const int kMaxBackEdgeWeight = 127; | 322 static const int kMaxBackEdgeWeight = 127; |
(...skipping 4212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4539 *context_length = 0; | 4535 *context_length = 0; |
4540 return previous_; | 4536 return previous_; |
4541 } | 4537 } |
4542 | 4538 |
4543 | 4539 |
4544 #undef __ | 4540 #undef __ |
4545 | 4541 |
4546 } } // namespace v8::internal | 4542 } } // namespace v8::internal |
4547 | 4543 |
4548 #endif // V8_TARGET_ARCH_X64 | 4544 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |