| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 line_offset, | 261 line_offset, |
| 262 column_offset); | 262 column_offset); |
| 263 } | 263 } |
| 264 | 264 |
| 265 if (result.is_null()) { | 265 if (result.is_null()) { |
| 266 // No cache entry found. Do pre-parsing and compile the script. | 266 // No cache entry found. Do pre-parsing and compile the script. |
| 267 ScriptDataImpl* pre_data = input_pre_data; | 267 ScriptDataImpl* pre_data = input_pre_data; |
| 268 if (pre_data == NULL && source_length >= FLAG_min_preparse_length) { | 268 if (pre_data == NULL && source_length >= FLAG_min_preparse_length) { |
| 269 Access<SafeStringInputBuffer> buf(&safe_string_input_buffer); | 269 Access<SafeStringInputBuffer> buf(&safe_string_input_buffer); |
| 270 buf->Reset(source.location()); | 270 buf->Reset(source.location()); |
| 271 pre_data = PreParse(buf.value(), extension); | 271 pre_data = PreParse(source, buf.value(), extension); |
| 272 } | 272 } |
| 273 | 273 |
| 274 // Create a script object describing the script to be compiled. | 274 // Create a script object describing the script to be compiled. |
| 275 Handle<Script> script = Factory::NewScript(source); | 275 Handle<Script> script = Factory::NewScript(source); |
| 276 if (!script_name.is_null()) { | 276 if (!script_name.is_null()) { |
| 277 script->set_name(*script_name); | 277 script->set_name(*script_name); |
| 278 script->set_line_offset(Smi::FromInt(line_offset)); | 278 script->set_line_offset(Smi::FromInt(line_offset)); |
| 279 script->set_column_offset(Smi::FromInt(column_offset)); | 279 script->set_column_offset(Smi::FromInt(column_offset)); |
| 280 } | 280 } |
| 281 | 281 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // Set the expected number of properties for instances. | 417 // Set the expected number of properties for instances. |
| 418 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); | 418 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); |
| 419 | 419 |
| 420 // Check the function has compiled code. | 420 // Check the function has compiled code. |
| 421 ASSERT(shared->is_compiled()); | 421 ASSERT(shared->is_compiled()); |
| 422 return true; | 422 return true; |
| 423 } | 423 } |
| 424 | 424 |
| 425 | 425 |
| 426 } } // namespace v8::internal | 426 } } // namespace v8::internal |
| OLD | NEW |