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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 Top::StackOverflow(); | 310 Top::StackOverflow(); |
311 return false; | 311 return false; |
312 } | 312 } |
313 | 313 |
314 #if defined ENABLE_LOGGING_AND_PROFILING || defined ENABLE_OPROFILE_AGENT | 314 #if defined ENABLE_LOGGING_AND_PROFILING || defined ENABLE_OPROFILE_AGENT |
315 // Log the code generation. If source information is available include script | 315 // Log the code generation. If source information is available include script |
316 // name and line number. Check explicit whether logging is enabled as finding | 316 // name and line number. Check explicit whether logging is enabled as finding |
317 // the line number is not for free. | 317 // the line number is not for free. |
318 if (Logger::is_enabled() || OProfileAgent::is_enabled()) { | 318 if (Logger::is_enabled() || OProfileAgent::is_enabled()) { |
319 if (script->name()->IsString()) { | 319 if (script->name()->IsString()) { |
320 int line_num = script->GetLineNumber(start_position); | 320 int line_num = GetScriptLineNumber(script, start_position); |
321 if (line_num > 0) { | 321 if (line_num > 0) { |
322 line_num += script->line_offset()->value() + 1; | 322 line_num += script->line_offset()->value() + 1; |
323 } | 323 } |
324 LOG(CodeCreateEvent("LazyCompile", *code, *lit->name(), | 324 LOG(CodeCreateEvent("LazyCompile", *code, *lit->name(), |
325 String::cast(script->name()), line_num)); | 325 String::cast(script->name()), line_num)); |
326 OProfileAgent::CreateNativeCodeRegion(*lit->name(), | 326 OProfileAgent::CreateNativeCodeRegion(*lit->name(), |
327 String::cast(script->name()), | 327 String::cast(script->name()), |
328 line_num, code->address(), | 328 line_num, code->address(), |
329 code->ExecutableSize()); | 329 code->ExecutableSize()); |
330 } else { | 330 } else { |
(...skipping 10 matching lines...) Expand all 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 |