| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 4896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4907 *source = data; | 4907 *source = data; |
| 4908 return result; | 4908 return result; |
| 4909 } | 4909 } |
| 4910 | 4910 |
| 4911 | 4911 |
| 4912 // Create a Scanner for the preparser to use as input, and preparse the source. | 4912 // Create a Scanner for the preparser to use as input, and preparse the source. |
| 4913 static ScriptDataImpl* DoPreParse(UC16CharacterStream* source, | 4913 static ScriptDataImpl* DoPreParse(UC16CharacterStream* source, |
| 4914 bool allow_lazy, | 4914 bool allow_lazy, |
| 4915 ParserRecorder* recorder) { | 4915 ParserRecorder* recorder) { |
| 4916 Isolate* isolate = Isolate::Current(); | 4916 Isolate* isolate = Isolate::Current(); |
| 4917 V8JavaScriptScanner scanner(isolate->unicode_cache()); | 4917 JavaScriptScanner scanner(isolate->unicode_cache()); |
| 4918 scanner.Initialize(source); | 4918 scanner.Initialize(source); |
| 4919 intptr_t stack_limit = isolate->stack_guard()->real_climit(); | 4919 intptr_t stack_limit = isolate->stack_guard()->real_climit(); |
| 4920 if (!preparser::PreParser::PreParseProgram(&scanner, | 4920 if (!preparser::PreParser::PreParseProgram(&scanner, |
| 4921 recorder, | 4921 recorder, |
| 4922 allow_lazy, | 4922 allow_lazy, |
| 4923 stack_limit)) { | 4923 stack_limit)) { |
| 4924 isolate->StackOverflow(); | 4924 isolate->StackOverflow(); |
| 4925 return NULL; | 4925 return NULL; |
| 4926 } | 4926 } |
| 4927 | 4927 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5008 info->is_global(), | 5008 info->is_global(), |
| 5009 info->StrictMode()); | 5009 info->StrictMode()); |
| 5010 } | 5010 } |
| 5011 } | 5011 } |
| 5012 | 5012 |
| 5013 info->SetFunction(result); | 5013 info->SetFunction(result); |
| 5014 return (result != NULL); | 5014 return (result != NULL); |
| 5015 } | 5015 } |
| 5016 | 5016 |
| 5017 } } // namespace v8::internal | 5017 } } // namespace v8::internal |
| OLD | NEW |