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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 internal::Object** block_start = blocks_.last(); | 565 internal::Object** block_start = blocks_.last(); |
566 internal::Object** block_limit = block_start + kHandleBlockSize; | 566 internal::Object** block_limit = block_start + kHandleBlockSize; |
567 #ifdef DEBUG | 567 #ifdef DEBUG |
568 // NoHandleAllocation may make the prev_limit to point inside the block. | 568 // NoHandleAllocation may make the prev_limit to point inside the block. |
569 if (block_start <= prev_limit && prev_limit <= block_limit) break; | 569 if (block_start <= prev_limit && prev_limit <= block_limit) break; |
570 #else | 570 #else |
571 if (prev_limit == block_limit) break; | 571 if (prev_limit == block_limit) break; |
572 #endif | 572 #endif |
573 | 573 |
574 blocks_.RemoveLast(); | 574 blocks_.RemoveLast(); |
575 #ifdef DEBUG | 575 #ifdef ENABLE_EXTRA_CHECKS |
576 v8::ImplementationUtilities::ZapHandleRange(block_start, block_limit); | 576 internal::HandleScope::ZapRange(block_start, block_limit); |
577 #endif | 577 #endif |
578 if (spare_ != NULL) { | 578 if (spare_ != NULL) { |
579 DeleteArray(spare_); | 579 DeleteArray(spare_); |
580 } | 580 } |
581 spare_ = block_start; | 581 spare_ = block_start; |
582 } | 582 } |
583 ASSERT((blocks_.is_empty() && prev_limit == NULL) || | 583 ASSERT((blocks_.is_empty() && prev_limit == NULL) || |
584 (!blocks_.is_empty() && prev_limit != NULL)); | 584 (!blocks_.is_empty() && prev_limit != NULL)); |
585 } | 585 } |
586 | 586 |
587 | 587 |
588 class Testing { | 588 class Testing { |
589 public: | 589 public: |
590 static v8::Testing::StressType stress_type() { return stress_type_; } | 590 static v8::Testing::StressType stress_type() { return stress_type_; } |
591 static void set_stress_type(v8::Testing::StressType stress_type) { | 591 static void set_stress_type(v8::Testing::StressType stress_type) { |
592 stress_type_ = stress_type; | 592 stress_type_ = stress_type; |
593 } | 593 } |
594 | 594 |
595 private: | 595 private: |
596 static v8::Testing::StressType stress_type_; | 596 static v8::Testing::StressType stress_type_; |
597 }; | 597 }; |
598 | 598 |
599 } } // namespace v8::internal | 599 } } // namespace v8::internal |
600 | 600 |
601 #endif // V8_API_H_ | 601 #endif // V8_API_H_ |
OLD | NEW |