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

Side by Side Diff: src/d8.h

Issue 110573004: Merge bleeding_edge 17696:18016. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 private: 212 private:
213 const char* data_; 213 const char* data_;
214 size_t length_; 214 size_t length_;
215 }; 215 };
216 216
217 217
218 class ShellOptions { 218 class ShellOptions {
219 public: 219 public:
220 ShellOptions() : 220 ShellOptions() :
221 #ifndef V8_SHARED 221 #ifndef V8_SHARED
222 use_preemption(true),
223 preemption_interval(10),
224 num_parallel_files(0), 222 num_parallel_files(0),
225 parallel_files(NULL), 223 parallel_files(NULL),
226 #endif // V8_SHARED 224 #endif // V8_SHARED
227 script_executed(false), 225 script_executed(false),
228 last_run(true), 226 last_run(true),
229 send_idle_notification(false), 227 send_idle_notification(false),
230 stress_opt(false), 228 stress_opt(false),
231 stress_deopt(false), 229 stress_deopt(false),
232 interactive_shell(false), 230 interactive_shell(false),
233 test_shell(false), 231 test_shell(false),
234 dump_heap_constants(false), 232 dump_heap_constants(false),
235 expected_to_throw(false), 233 expected_to_throw(false),
234 mock_arraybuffer_allocator(false),
236 num_isolates(1), 235 num_isolates(1),
237 isolate_sources(NULL) { } 236 isolate_sources(NULL) { }
238 237
239 ~ShellOptions() { 238 ~ShellOptions() {
240 #ifndef V8_SHARED 239 #ifndef V8_SHARED
241 delete[] parallel_files; 240 delete[] parallel_files;
242 #endif // V8_SHARED 241 #endif // V8_SHARED
243 delete[] isolate_sources; 242 delete[] isolate_sources;
244 } 243 }
245 244
246 #ifndef V8_SHARED 245 #ifndef V8_SHARED
247 bool use_preemption;
248 int preemption_interval;
249 int num_parallel_files; 246 int num_parallel_files;
250 char** parallel_files; 247 char** parallel_files;
251 #endif // V8_SHARED 248 #endif // V8_SHARED
252 bool script_executed; 249 bool script_executed;
253 bool last_run; 250 bool last_run;
254 bool send_idle_notification; 251 bool send_idle_notification;
255 bool stress_opt; 252 bool stress_opt;
256 bool stress_deopt; 253 bool stress_deopt;
257 bool interactive_shell; 254 bool interactive_shell;
258 bool test_shell; 255 bool test_shell;
259 bool dump_heap_constants; 256 bool dump_heap_constants;
260 bool expected_to_throw; 257 bool expected_to_throw;
258 bool mock_arraybuffer_allocator;
261 int num_isolates; 259 int num_isolates;
262 SourceGroup* isolate_sources; 260 SourceGroup* isolate_sources;
263 }; 261 };
264 262
265 #ifdef V8_SHARED 263 #ifdef V8_SHARED
266 class Shell { 264 class Shell {
267 #else 265 #else
268 class Shell : public i::AllStatic { 266 class Shell : public i::AllStatic {
269 #endif // V8_SHARED 267 #endif // V8_SHARED
270 268
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 // the "mkdir -p" command. 370 // the "mkdir -p" command.
373 static void OSObject(const v8::FunctionCallbackInfo<v8::Value>& args); 371 static void OSObject(const v8::FunctionCallbackInfo<v8::Value>& args);
374 static void System(const v8::FunctionCallbackInfo<v8::Value>& args); 372 static void System(const v8::FunctionCallbackInfo<v8::Value>& args);
375 static void ChangeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args); 373 static void ChangeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args);
376 static void SetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args); 374 static void SetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args);
377 static void UnsetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args); 375 static void UnsetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args);
378 static void SetUMask(const v8::FunctionCallbackInfo<v8::Value>& args); 376 static void SetUMask(const v8::FunctionCallbackInfo<v8::Value>& args);
379 static void MakeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args); 377 static void MakeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args);
380 static void RemoveDirectory(const v8::FunctionCallbackInfo<v8::Value>& args); 378 static void RemoveDirectory(const v8::FunctionCallbackInfo<v8::Value>& args);
381 379
382 static void AddOSMethods(Handle<ObjectTemplate> os_template); 380 static void AddOSMethods(v8::Isolate* isolate,
381 Handle<ObjectTemplate> os_template);
383 382
384 static const char* kPrompt; 383 static const char* kPrompt;
385 static ShellOptions options; 384 static ShellOptions options;
386 385
387 private: 386 private:
388 static Persistent<Context> evaluation_context_; 387 static Persistent<Context> evaluation_context_;
389 #ifndef V8_SHARED 388 #ifndef V8_SHARED
390 static Persistent<Context> utility_context_; 389 static Persistent<Context> utility_context_;
391 static CounterMap* counter_map_; 390 static CounterMap* counter_map_;
392 // We statically allocate a set of local counters to be used if we 391 // We statically allocate a set of local counters to be used if we
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 static void ExternalArrayWeakCallback(Isolate* isolate, 424 static void ExternalArrayWeakCallback(Isolate* isolate,
426 Persistent<Object>* object, 425 Persistent<Object>* object,
427 uint8_t* data); 426 uint8_t* data);
428 }; 427 };
429 428
430 429
431 } // namespace v8 430 } // namespace v8
432 431
433 432
434 #endif // V8_D8_H_ 433 #endif // V8_D8_H_
OLDNEW
« include/v8-platform.h ('K') | « src/contexts.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698