| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 64 #undef DEFINE_EXTENSION_ID | 64 #undef DEFINE_EXTENSION_ID | 
| 65 | 65 | 
| 66 typedef v8::internal::EnumSet<CcTestExtensionIds> CcTestExtensionFlags; | 66 typedef v8::internal::EnumSet<CcTestExtensionIds> CcTestExtensionFlags; | 
| 67 #define DEFINE_EXTENSION_FLAG(Name, Ident)                               \ | 67 #define DEFINE_EXTENSION_FLAG(Name, Ident)                               \ | 
| 68   static const CcTestExtensionFlags Name(1 << Name##_ID); | 68   static const CcTestExtensionFlags Name(1 << Name##_ID); | 
| 69   static const CcTestExtensionFlags NO_EXTENSIONS(0); | 69   static const CcTestExtensionFlags NO_EXTENSIONS(0); | 
| 70   static const CcTestExtensionFlags ALL_EXTENSIONS((1 << kMaxExtensions) - 1); | 70   static const CcTestExtensionFlags ALL_EXTENSIONS((1 << kMaxExtensions) - 1); | 
| 71   EXTENSION_LIST(DEFINE_EXTENSION_FLAG) | 71   EXTENSION_LIST(DEFINE_EXTENSION_FLAG) | 
| 72 #undef DEFINE_EXTENSION_FLAG | 72 #undef DEFINE_EXTENSION_FLAG | 
| 73 | 73 | 
|  | 74 // Temporary macros for accessing current isolate and its subobjects. | 
|  | 75 // They provide better readability, especially when used a lot in the code. | 
|  | 76 #define HEAP (v8::internal::Isolate::Current()->heap()) | 
|  | 77 | 
| 74 class CcTest { | 78 class CcTest { | 
| 75  public: | 79  public: | 
| 76   typedef void (TestFunction)(); | 80   typedef void (TestFunction)(); | 
| 77   CcTest(TestFunction* callback, const char* file, const char* name, | 81   CcTest(TestFunction* callback, const char* file, const char* name, | 
| 78          const char* dependency, bool enabled); | 82          const char* dependency, bool enabled); | 
| 79   void Run() { callback_(); } | 83   void Run() { callback_(); } | 
| 80   static CcTest* last() { return last_; } | 84   static CcTest* last() { return last_; } | 
| 81   CcTest* prev() { return prev_; } | 85   CcTest* prev() { return prev_; } | 
| 82   const char* file() { return file_; } | 86   const char* file() { return file_; } | 
| 83   const char* name() { return name_; } | 87   const char* name() { return name_; } | 
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 298 static inline void SimulateFullSpace(v8::internal::PagedSpace* space) { | 302 static inline void SimulateFullSpace(v8::internal::PagedSpace* space) { | 
| 299   int old_linear_size = static_cast<int>(space->limit() - space->top()); | 303   int old_linear_size = static_cast<int>(space->limit() - space->top()); | 
| 300   space->Free(space->top(), old_linear_size); | 304   space->Free(space->top(), old_linear_size); | 
| 301   space->SetTop(space->limit(), space->limit()); | 305   space->SetTop(space->limit(), space->limit()); | 
| 302   space->ResetFreeList(); | 306   space->ResetFreeList(); | 
| 303   space->ClearStats(); | 307   space->ClearStats(); | 
| 304 } | 308 } | 
| 305 | 309 | 
| 306 | 310 | 
| 307 #endif  // ifndef CCTEST_H_ | 311 #endif  // ifndef CCTEST_H_ | 
| OLD | NEW | 
|---|