v8-testing.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright 2010 the V8 project authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef V8_V8_TEST_H_
  5. #define V8_V8_TEST_H_
  6. #include "v8.h" // NOLINT(build/include)
  7. /**
  8. * Testing support for the V8 JavaScript engine.
  9. */
  10. namespace v8 {
  11. class V8_EXPORT Testing {
  12. public:
  13. enum V8_DEPRECATED("Don't use this (d8-specific testing logic).") StressType {
  14. kStressTypeOpt,
  15. kStressTypeDeopt
  16. };
  17. /**
  18. * Set the type of stressing to do. The default if not set is kStressTypeOpt.
  19. */
  20. V8_DEPRECATED("Don't use this (d8-specific testing logic).")
  21. static void SetStressRunType(StressType type);
  22. /**
  23. * Get the number of runs of a given test that is required to get the full
  24. * stress coverage.
  25. */
  26. V8_DEPRECATED("Don't use this (d8-specific testing logic).")
  27. static int GetStressRuns();
  28. /**
  29. * Indicate the number of the run which is about to start. The value of run
  30. * should be between 0 and one less than the result from GetStressRuns()
  31. */
  32. V8_DEPRECATED("Don't use this (d8-specific testing logic).")
  33. static void PrepareStressRun(int run);
  34. /**
  35. * Force deoptimization of all functions.
  36. */
  37. V8_DEPRECATED("Don't use this (d8-specific testing logic).")
  38. static void DeoptimizeAll(Isolate* isolate);
  39. };
  40. } // namespace v8
  41. #endif // V8_V8_TEST_H_