| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); | 447 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); |
| 448 | 448 |
| 449 // Set the optimication hints after performing lazy compilation, as these are | 449 // Set the optimication hints after performing lazy compilation, as these are |
| 450 // not set when the function is set up as a lazily compiled function. | 450 // not set when the function is set up as a lazily compiled function. |
| 451 shared->SetThisPropertyAssignmentsInfo( | 451 shared->SetThisPropertyAssignmentsInfo( |
| 452 lit->has_only_simple_this_property_assignments(), | 452 lit->has_only_simple_this_property_assignments(), |
| 453 *lit->this_property_assignments()); | 453 *lit->this_property_assignments()); |
| 454 | 454 |
| 455 // Check the function has compiled code. | 455 // Check the function has compiled code. |
| 456 ASSERT(shared->is_compiled()); | 456 ASSERT(shared->is_compiled()); |
| 457 shared->set_code_age(0); |
| 457 return true; | 458 return true; |
| 458 } | 459 } |
| 459 | 460 |
| 460 | 461 |
| 461 Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal, | 462 Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal, |
| 462 Handle<Script> script, | 463 Handle<Script> script, |
| 463 AstVisitor* caller) { | 464 AstVisitor* caller) { |
| 464 LiveEditFunctionTracker live_edit_tracker(literal); | 465 LiveEditFunctionTracker live_edit_tracker(literal); |
| 465 #ifdef DEBUG | 466 #ifdef DEBUG |
| 466 // We should not try to compile the same function literal more than | 467 // We should not try to compile the same function literal more than |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script), | 622 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script), |
| 622 *code, *func_name)); | 623 *code, *func_name)); |
| 623 OPROFILE(CreateNativeCodeRegion(*func_name, | 624 OPROFILE(CreateNativeCodeRegion(*func_name, |
| 624 code->instruction_start(), | 625 code->instruction_start(), |
| 625 code->instruction_size())); | 626 code->instruction_size())); |
| 626 } | 627 } |
| 627 } | 628 } |
| 628 } | 629 } |
| 629 | 630 |
| 630 } } // namespace v8::internal | 631 } } // namespace v8::internal |
| OLD | NEW |