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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 Handle<String> source = ReadFile(str); | 535 Handle<String> source = ReadFile(str); |
536 if (source.IsEmpty()) { | 536 if (source.IsEmpty()) { |
537 printf("Error reading '%s'\n", str); | 537 printf("Error reading '%s'\n", str); |
538 return 1; | 538 return 1; |
539 } | 539 } |
540 if (!ExecuteString(source, file_name, false, true)) | 540 if (!ExecuteString(source, file_name, false, true)) |
541 return 1; | 541 return 1; |
542 } | 542 } |
543 } | 543 } |
544 if (i::FLAG_debugger) | 544 if (i::FLAG_debugger) |
545 v8::Debug::AddDebugEventListener(HandleDebugEvent); | 545 v8::Debug::SetDebugEventListener(HandleDebugEvent); |
546 } | 546 } |
547 if (run_shell) | 547 if (run_shell) |
548 RunShell(); | 548 RunShell(); |
549 for (int i = 0; i < threads.length(); i++) { | 549 for (int i = 0; i < threads.length(); i++) { |
550 i::Thread *thread = threads[i]; | 550 i::Thread *thread = threads[i]; |
551 thread->Join(); | 551 thread->Join(); |
552 delete thread; | 552 delete thread; |
553 } | 553 } |
554 OnExit(); | 554 OnExit(); |
555 return 0; | 555 return 0; |
556 } | 556 } |
557 | 557 |
558 | 558 |
559 } // namespace v8 | 559 } // namespace v8 |
560 | 560 |
561 | 561 |
562 int main(int argc, char* argv[]) { | 562 int main(int argc, char* argv[]) { |
563 return v8::Shell::Main(argc, argv); | 563 return v8::Shell::Main(argc, argv); |
564 } | 564 } |
OLD | NEW |