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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 typedef void (TestFunction)(); | 84 typedef void (TestFunction)(); |
85 CcTest(TestFunction* callback, const char* file, const char* name, | 85 CcTest(TestFunction* callback, const char* file, const char* name, |
86 const char* dependency, bool enabled, bool initialize); | 86 const char* dependency, bool enabled, bool initialize); |
87 void Run(); | 87 void Run(); |
88 static CcTest* last() { return last_; } | 88 static CcTest* last() { return last_; } |
89 CcTest* prev() { return prev_; } | 89 CcTest* prev() { return prev_; } |
90 const char* file() { return file_; } | 90 const char* file() { return file_; } |
91 const char* name() { return name_; } | 91 const char* name() { return name_; } |
92 const char* dependency() { return dependency_; } | 92 const char* dependency() { return dependency_; } |
93 bool enabled() { return enabled_; } | 93 bool enabled() { return enabled_; } |
94 static v8::Isolate* default_isolate() { return isolate(); } | |
95 | 94 |
96 static v8::Handle<v8::Context> env() { | 95 static v8::Handle<v8::Context> env() { |
97 return v8::Local<v8::Context>::New(isolate(), context_); | 96 return v8::Local<v8::Context>::New(isolate(), context_); |
98 } | 97 } |
99 | 98 |
100 static v8::Isolate* isolate() { | 99 static v8::Isolate* isolate() { |
101 return default_isolate_; | 100 return default_isolate_; |
102 } | 101 } |
103 | 102 |
104 static i::Isolate* i_isolate() { | 103 static i::Isolate* i_isolate() { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 static inline void SimulateFullSpace(v8::internal::PagedSpace* space) { | 311 static inline void SimulateFullSpace(v8::internal::PagedSpace* space) { |
313 int old_linear_size = static_cast<int>(space->limit() - space->top()); | 312 int old_linear_size = static_cast<int>(space->limit() - space->top()); |
314 space->Free(space->top(), old_linear_size); | 313 space->Free(space->top(), old_linear_size); |
315 space->SetTop(space->limit(), space->limit()); | 314 space->SetTop(space->limit(), space->limit()); |
316 space->ResetFreeList(); | 315 space->ResetFreeList(); |
317 space->ClearStats(); | 316 space->ClearStats(); |
318 } | 317 } |
319 | 318 |
320 | 319 |
321 #endif // ifndef CCTEST_H_ | 320 #endif // ifndef CCTEST_H_ |
OLD | NEW |