Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: test/cctest/cctest.h

Issue 23661004: add isolate parameter for Execution::Call (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
84 const char* dependency() { return dependency_; } 84 const char* dependency() { return dependency_; }
85 bool enabled() { return enabled_; } 85 bool enabled() { return enabled_; }
86 static v8::Isolate* default_isolate() { return default_isolate_; } 86 static v8::Isolate* default_isolate() { return default_isolate_; }
87 87
88 static v8::Handle<v8::Context> env() { 88 static v8::Handle<v8::Context> env() {
89 return v8::Local<v8::Context>::New(default_isolate_, context_); 89 return v8::Local<v8::Context>::New(default_isolate_, context_);
90 } 90 }
91 91
92 static v8::Isolate* isolate() { return default_isolate_; } 92 static v8::Isolate* isolate() { return default_isolate_; }
93 93
94 static i::Isolate* i_isolate() {
95 return reinterpret_cast<i::Isolate*>(default_isolate_);
96 }
97
94 // Helper function to initialize the VM. 98 // Helper function to initialize the VM.
95 static void InitializeVM(CcTestExtensionFlags extensions = NO_EXTENSIONS); 99 static void InitializeVM(CcTestExtensionFlags extensions = NO_EXTENSIONS);
96 100
97 private: 101 private:
98 friend int main(int argc, char** argv); 102 friend int main(int argc, char** argv);
99 static void set_default_isolate(v8::Isolate* default_isolate) { 103 static void set_default_isolate(v8::Isolate* default_isolate) {
100 default_isolate_ = default_isolate; 104 default_isolate_ = default_isolate;
101 } 105 }
102 TestFunction* callback_; 106 TestFunction* callback_;
103 const char* file_; 107 const char* file_;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 static inline void SimulateFullSpace(v8::internal::PagedSpace* space) { 298 static inline void SimulateFullSpace(v8::internal::PagedSpace* space) {
295 int old_linear_size = static_cast<int>(space->limit() - space->top()); 299 int old_linear_size = static_cast<int>(space->limit() - space->top());
296 space->Free(space->top(), old_linear_size); 300 space->Free(space->top(), old_linear_size);
297 space->SetTop(space->limit(), space->limit()); 301 space->SetTop(space->limit(), space->limit());
298 space->ResetFreeList(); 302 space->ResetFreeList();
299 space->ClearStats(); 303 space->ClearStats();
300 } 304 }
301 305
302 306
303 #endif // ifndef CCTEST_H_ 307 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698