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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } | 208 } |
209 | 209 |
210 // Compile the function and add it to the cache. | 210 // Compile the function and add it to the cache. |
211 result = MakeFunction(true, | 211 result = MakeFunction(true, |
212 false, | 212 false, |
213 script, | 213 script, |
214 Handle<Context>::null(), | 214 Handle<Context>::null(), |
215 extension, | 215 extension, |
216 pre_data); | 216 pre_data); |
217 if (extension == NULL && !result.is_null()) { | 217 if (extension == NULL && !result.is_null()) { |
218 CompilationCache::PutScript(source, CompilationCache::SCRIPT, result); | 218 CompilationCache::PutScript(source, result); |
219 } | 219 } |
220 | 220 |
221 // Get rid of the pre-parsing data (if necessary). | 221 // Get rid of the pre-parsing data (if necessary). |
222 if (input_pre_data == NULL && pre_data != NULL) { | 222 if (input_pre_data == NULL && pre_data != NULL) { |
223 delete pre_data; | 223 delete pre_data; |
224 } | 224 } |
225 } | 225 } |
226 | 226 |
227 if (result.is_null()) Top::ReportPendingMessages(); | 227 if (result.is_null()) Top::ReportPendingMessages(); |
228 return result; | 228 return result; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 // Set the expected number of properties for instances. | 341 // Set the expected number of properties for instances. |
342 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); | 342 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); |
343 | 343 |
344 // Check the function has compiled code. | 344 // Check the function has compiled code. |
345 ASSERT(shared->is_compiled()); | 345 ASSERT(shared->is_compiled()); |
346 return true; | 346 return true; |
347 } | 347 } |
348 | 348 |
349 | 349 |
350 } } // namespace v8::internal | 350 } } // namespace v8::internal |
OLD | NEW |