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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 Immediate(Smi::FromInt(delta))); | 310 Immediate(Smi::FromInt(delta))); |
311 } | 311 } |
312 | 312 |
313 | 313 |
314 void FullCodeGenerator::EmitProfilingCounterReset() { | 314 void FullCodeGenerator::EmitProfilingCounterReset() { |
315 int reset_value = FLAG_interrupt_budget; | 315 int reset_value = FLAG_interrupt_budget; |
316 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { | 316 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { |
317 // Self-optimization is a one-off thing: if it fails, don't try again. | 317 // Self-optimization is a one-off thing: if it fails, don't try again. |
318 reset_value = Smi::kMaxValue; | 318 reset_value = Smi::kMaxValue; |
319 } | 319 } |
320 if (isolate()->IsDebuggerActive()) { | |
321 // Detect debug break requests as soon as possible. | |
322 reset_value = 10; | |
323 } | |
324 __ mov(ebx, Immediate(profiling_counter_)); | 320 __ mov(ebx, Immediate(profiling_counter_)); |
325 __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), | 321 __ mov(FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset), |
326 Immediate(Smi::FromInt(reset_value))); | 322 Immediate(Smi::FromInt(reset_value))); |
327 } | 323 } |
328 | 324 |
329 | 325 |
330 static const int kMaxBackEdgeWeight = 127; | 326 static const int kMaxBackEdgeWeight = 127; |
331 static const int kBackEdgeDistanceDivisor = 100; | 327 static const int kBackEdgeDistanceDivisor = 100; |
332 | 328 |
333 | 329 |
(...skipping 4219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4553 *context_length = 0; | 4549 *context_length = 0; |
4554 return previous_; | 4550 return previous_; |
4555 } | 4551 } |
4556 | 4552 |
4557 | 4553 |
4558 #undef __ | 4554 #undef __ |
4559 | 4555 |
4560 } } // namespace v8::internal | 4556 } } // namespace v8::internal |
4561 | 4557 |
4562 #endif // V8_TARGET_ARCH_IA32 | 4558 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |