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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 | 326 |
327 void FullCodeGenerator::EmitProfilingCounterReset() { | 327 void FullCodeGenerator::EmitProfilingCounterReset() { |
328 int reset_value = FLAG_interrupt_budget; | 328 int reset_value = FLAG_interrupt_budget; |
329 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { | 329 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { |
330 // Self-optimization is a one-off thing: if it fails, don't try again. | 330 // Self-optimization is a one-off thing: if it fails, don't try again. |
331 reset_value = Smi::kMaxValue; | 331 reset_value = Smi::kMaxValue; |
332 } | 332 } |
333 if (isolate()->IsDebuggerActive()) { | 333 if (isolate()->IsDebuggerActive()) { |
334 // Detect debug break requests as soon as possible. | 334 // Detect debug break requests as soon as possible. |
335 reset_value = 10; | 335 reset_value = FLAG_interrupt_budget >> 4; |
336 } | 336 } |
337 __ li(a2, Operand(profiling_counter_)); | 337 __ li(a2, Operand(profiling_counter_)); |
338 __ li(a3, Operand(Smi::FromInt(reset_value))); | 338 __ li(a3, Operand(Smi::FromInt(reset_value))); |
339 __ sw(a3, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); | 339 __ sw(a3, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); |
340 } | 340 } |
341 | 341 |
342 | 342 |
343 static const int kMaxBackEdgeWeight = 127; | 343 static const int kMaxBackEdgeWeight = 127; |
344 static const int kBackEdgeDistanceDivisor = 142; | 344 static const int kBackEdgeDistanceDivisor = 142; |
345 | 345 |
(...skipping 4268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4614 *context_length = 0; | 4614 *context_length = 0; |
4615 return previous_; | 4615 return previous_; |
4616 } | 4616 } |
4617 | 4617 |
4618 | 4618 |
4619 #undef __ | 4619 #undef __ |
4620 | 4620 |
4621 } } // namespace v8::internal | 4621 } } // namespace v8::internal |
4622 | 4622 |
4623 #endif // V8_TARGET_ARCH_MIPS | 4623 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |