| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 | 679 |
| 680 // Find source and name for the requested script. | 680 // Find source and name for the requested script. |
| 681 Handle<String> source_code = Bootstrapper::NativesSourceLookup(index); | 681 Handle<String> source_code = Bootstrapper::NativesSourceLookup(index); |
| 682 Vector<const char> name = Natives::GetScriptName(index); | 682 Vector<const char> name = Natives::GetScriptName(index); |
| 683 Handle<String> script_name = Factory::NewStringFromAscii(name); | 683 Handle<String> script_name = Factory::NewStringFromAscii(name); |
| 684 | 684 |
| 685 // Compile the script. | 685 // Compile the script. |
| 686 bool allow_natives_syntax = FLAG_allow_natives_syntax; | 686 bool allow_natives_syntax = FLAG_allow_natives_syntax; |
| 687 FLAG_allow_natives_syntax = true; | 687 FLAG_allow_natives_syntax = true; |
| 688 Handle<JSFunction> boilerplate; | 688 Handle<JSFunction> boilerplate; |
| 689 boilerplate = Compiler::Compile(source_code, script_name, 0, 0, NULL, NULL, | 689 boilerplate = Compiler::Compile(source_code, |
| 690 Handle<String>::null()); | 690 script_name, |
| 691 0, |
| 692 0, |
| 693 NULL, |
| 694 NULL, |
| 695 Handle<String>::null(), |
| 696 NATIVES_CODE); |
| 691 FLAG_allow_natives_syntax = allow_natives_syntax; | 697 FLAG_allow_natives_syntax = allow_natives_syntax; |
| 692 | 698 |
| 693 // Silently ignore stack overflows during compilation. | 699 // Silently ignore stack overflows during compilation. |
| 694 if (boilerplate.is_null()) { | 700 if (boilerplate.is_null()) { |
| 695 ASSERT(Top::has_pending_exception()); | 701 ASSERT(Top::has_pending_exception()); |
| 696 Top::clear_pending_exception(); | 702 Top::clear_pending_exception(); |
| 697 return false; | 703 return false; |
| 698 } | 704 } |
| 699 | 705 |
| 700 // Execute the boilerplate function in the debugger context. | 706 // Execute the boilerplate function in the debugger context. |
| (...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2800 { | 2806 { |
| 2801 Locker locker; | 2807 Locker locker; |
| 2802 Debugger::CallMessageDispatchHandler(); | 2808 Debugger::CallMessageDispatchHandler(); |
| 2803 } | 2809 } |
| 2804 } | 2810 } |
| 2805 } | 2811 } |
| 2806 | 2812 |
| 2807 #endif // ENABLE_DEBUGGER_SUPPORT | 2813 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2808 | 2814 |
| 2809 } } // namespace v8::internal | 2815 } } // namespace v8::internal |
| OLD | NEW |