OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 Handle<ObjectTemplate> global_template = ObjectTemplate::New(); | 418 Handle<ObjectTemplate> global_template = ObjectTemplate::New(); |
419 global_template->Set(String::New("print"), FunctionTemplate::New(Print)); | 419 global_template->Set(String::New("print"), FunctionTemplate::New(Print)); |
420 global_template->Set(String::New("write"), FunctionTemplate::New(Write)); | 420 global_template->Set(String::New("write"), FunctionTemplate::New(Write)); |
421 global_template->Set(String::New("read"), FunctionTemplate::New(Read)); | 421 global_template->Set(String::New("read"), FunctionTemplate::New(Read)); |
422 global_template->Set(String::New("readline"), | 422 global_template->Set(String::New("readline"), |
423 FunctionTemplate::New(ReadLine)); | 423 FunctionTemplate::New(ReadLine)); |
424 global_template->Set(String::New("load"), FunctionTemplate::New(Load)); | 424 global_template->Set(String::New("load"), FunctionTemplate::New(Load)); |
425 global_template->Set(String::New("quit"), FunctionTemplate::New(Quit)); | 425 global_template->Set(String::New("quit"), FunctionTemplate::New(Quit)); |
426 global_template->Set(String::New("version"), FunctionTemplate::New(Version)); | 426 global_template->Set(String::New("version"), FunctionTemplate::New(Version)); |
427 | 427 |
| 428 #ifdef LIVE_OBJECT_LIST |
| 429 global_template->Set(String::New("lol_is_enabled"), Boolean::New(true)); |
| 430 #else |
| 431 global_template->Set(String::New("lol_is_enabled"), Boolean::New(false)); |
| 432 #endif |
| 433 |
428 Handle<ObjectTemplate> os_templ = ObjectTemplate::New(); | 434 Handle<ObjectTemplate> os_templ = ObjectTemplate::New(); |
429 AddOSMethods(os_templ); | 435 AddOSMethods(os_templ); |
430 global_template->Set(String::New("os"), os_templ); | 436 global_template->Set(String::New("os"), os_templ); |
431 | 437 |
432 utility_context_ = Context::New(NULL, global_template); | 438 utility_context_ = Context::New(NULL, global_template); |
433 utility_context_->SetSecurityToken(Undefined()); | 439 utility_context_->SetSecurityToken(Undefined()); |
434 Context::Scope utility_scope(utility_context_); | 440 Context::Scope utility_scope(utility_context_); |
435 | 441 |
436 i::JSArguments js_args = i::FLAG_js_arguments; | 442 i::JSArguments js_args = i::FLAG_js_arguments; |
437 i::Handle<i::FixedArray> arguments_array = | 443 i::Handle<i::FixedArray> arguments_array = |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 return 0; | 783 return 0; |
778 } | 784 } |
779 | 785 |
780 | 786 |
781 } // namespace v8 | 787 } // namespace v8 |
782 | 788 |
783 | 789 |
784 int main(int argc, char* argv[]) { | 790 int main(int argc, char* argv[]) { |
785 return v8::Shell::Main(argc, argv); | 791 return v8::Shell::Main(argc, argv); |
786 } | 792 } |
OLD | NEW |