Turn audio into a shareable video. forked from nypublicradio/audiogram

v8-testing.h 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 StressType {
  14. kStressTypeOpt,
  15. kStressTypeDeopt
  16. };
  17. /**
  18. * Set the type of stressing to do. The default if not set is kStressTypeOpt.
  19. */
  20. static void SetStressRunType(StressType type);
  21. /**
  22. * Get the number of runs of a given test that is required to get the full
  23. * stress coverage.
  24. */
  25. static int GetStressRuns();
  26. /**
  27. * Indicate the number of the run which is about to start. The value of run
  28. * should be between 0 and one less than the result from GetStressRuns()
  29. */
  30. static void PrepareStressRun(int run);
  31. /**
  32. * Force deoptimization of all functions.
  33. */
  34. static void DeoptimizeAll(Isolate* isolate);
  35. };
  36. } // namespace v8
  37. #endif // V8_V8_TEST_H_