| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 } | 239 } |
| 240 | 240 |
| 241 ~PostponeInterruptsScope() { | 241 ~PostponeInterruptsScope() { |
| 242 if (--StackGuard::thread_local_.postpone_interrupts_nesting_ == 0) { | 242 if (--StackGuard::thread_local_.postpone_interrupts_nesting_ == 0) { |
| 243 StackGuard::EnableInterrupts(); | 243 StackGuard::EnableInterrupts(); |
| 244 } | 244 } |
| 245 } | 245 } |
| 246 }; | 246 }; |
| 247 | 247 |
| 248 | 248 |
| 249 class PrintExtension : public v8::Extension { | |
| 250 public: | |
| 251 PrintExtension() : v8::Extension("v8/print", kSource) { } | |
| 252 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( | |
| 253 v8::Handle<v8::String> name); | |
| 254 static v8::Handle<v8::Value> Print(const v8::Arguments& args); | |
| 255 private: | |
| 256 static const char* kSource; | |
| 257 }; | |
| 258 | |
| 259 | |
| 260 class LoadExtension : public v8::Extension { | |
| 261 public: | |
| 262 LoadExtension() : v8::Extension("v8/load", kSource) { } | |
| 263 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( | |
| 264 v8::Handle<v8::String> name); | |
| 265 static v8::Handle<v8::Value> Load(const v8::Arguments& args); | |
| 266 private: | |
| 267 static const char* kSource; | |
| 268 }; | |
| 269 | |
| 270 | |
| 271 class QuitExtension : public v8::Extension { | |
| 272 public: | |
| 273 QuitExtension() : v8::Extension("v8/quit", kSource) {} | |
| 274 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( | |
| 275 v8::Handle<v8::String> name); | |
| 276 static v8::Handle<v8::Value> Quit(const v8::Arguments& args); | |
| 277 private: | |
| 278 static const char* kSource; | |
| 279 }; | |
| 280 | |
| 281 | |
| 282 class GCExtension : public v8::Extension { | 249 class GCExtension : public v8::Extension { |
| 283 public: | 250 public: |
| 284 GCExtension() : v8::Extension("v8/gc", kSource) {} | 251 GCExtension() : v8::Extension("v8/gc", kSource) {} |
| 285 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( | 252 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( |
| 286 v8::Handle<v8::String> name); | 253 v8::Handle<v8::String> name); |
| 287 static v8::Handle<v8::Value> GC(const v8::Arguments& args); | 254 static v8::Handle<v8::Value> GC(const v8::Arguments& args); |
| 288 private: | 255 private: |
| 289 static const char* kSource; | 256 static const char* kSource; |
| 290 }; | 257 }; |
| 291 | 258 |
| 292 | 259 |
| 293 } } // namespace v8::internal | 260 } } // namespace v8::internal |
| 294 | 261 |
| 295 #endif // V8_EXECUTION_H_ | 262 #endif // V8_EXECUTION_H_ |
| OLD | NEW |