Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.0 KiB

  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"
  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();
  35. };
  36. } // namespace v8
  37. #endif // V8_V8_TEST_H_