| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 13 matching lines...) Expand all Loading... |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_API_H_ | 28 #ifndef V8_API_H_ |
| 29 #define V8_API_H_ | 29 #define V8_API_H_ |
| 30 | 30 |
| 31 #include "apiutils.h" | 31 #include "apiutils.h" |
| 32 #include "factory.h" | 32 #include "factory.h" |
| 33 | 33 |
| 34 #include "../include/v8-testing.h" |
| 35 |
| 34 namespace v8 { | 36 namespace v8 { |
| 35 | 37 |
| 36 // Constants used in the implementation of the API. The most natural thing | 38 // Constants used in the implementation of the API. The most natural thing |
| 37 // would usually be to place these with the classes that use them, but | 39 // would usually be to place these with the classes that use them, but |
| 38 // we want to keep them out of v8.h because it is an externally | 40 // we want to keep them out of v8.h because it is an externally |
| 39 // visible file. | 41 // visible file. |
| 40 class Consts { | 42 class Consts { |
| 41 public: | 43 public: |
| 42 enum TemplateType { | 44 enum TemplateType { |
| 43 FUNCTION_TEMPLATE = 0, | 45 FUNCTION_TEMPLATE = 0, |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 #endif | 548 #endif |
| 547 if (spare_ != NULL) { | 549 if (spare_ != NULL) { |
| 548 DeleteArray(spare_); | 550 DeleteArray(spare_); |
| 549 } | 551 } |
| 550 spare_ = block_start; | 552 spare_ = block_start; |
| 551 } | 553 } |
| 552 ASSERT((blocks_.is_empty() && prev_limit == NULL) || | 554 ASSERT((blocks_.is_empty() && prev_limit == NULL) || |
| 553 (!blocks_.is_empty() && prev_limit != NULL)); | 555 (!blocks_.is_empty() && prev_limit != NULL)); |
| 554 } | 556 } |
| 555 | 557 |
| 558 |
| 559 class Testing { |
| 560 public: |
| 561 static v8::Testing::StressType stress_type() { return stress_type_; } |
| 562 static void set_stress_type(v8::Testing::StressType stress_type) { |
| 563 stress_type_ = stress_type; |
| 564 } |
| 565 |
| 566 private: |
| 567 static v8::Testing::StressType stress_type_; |
| 568 }; |
| 569 |
| 556 } } // namespace v8::internal | 570 } } // namespace v8::internal |
| 557 | 571 |
| 558 #endif // V8_API_H_ | 572 #endif // V8_API_H_ |
| OLD | NEW |