| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 info.SetLanguageMode(FLAG_harmony_scoping ? EXTENDED_MODE : STRICT_MODE); | 604 info.SetLanguageMode(FLAG_harmony_scoping ? EXTENDED_MODE : STRICT_MODE); |
| 605 } | 605 } |
| 606 result = MakeFunctionInfo(&info); | 606 result = MakeFunctionInfo(&info); |
| 607 if (extension == NULL && !result.is_null() && !result->dont_cache()) { | 607 if (extension == NULL && !result.is_null() && !result->dont_cache()) { |
| 608 compilation_cache->PutScript(source, context, result); | 608 compilation_cache->PutScript(source, context, result); |
| 609 } | 609 } |
| 610 } else { | 610 } else { |
| 611 if (result->ic_age() != HEAP->global_ic_age()) { | 611 if (result->ic_age() != HEAP->global_ic_age()) { |
| 612 result->ResetForNewContext(HEAP->global_ic_age()); | 612 result->ResetForNewContext(HEAP->global_ic_age()); |
| 613 } | 613 } |
| 614 result->code()->MakeYoung(); |
| 614 } | 615 } |
| 615 | 616 |
| 616 if (result.is_null()) isolate->ReportPendingMessages(); | 617 if (result.is_null()) isolate->ReportPendingMessages(); |
| 617 return result; | 618 return result; |
| 618 } | 619 } |
| 619 | 620 |
| 620 | 621 |
| 621 Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source, | 622 Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source, |
| 622 Handle<Context> context, | 623 Handle<Context> context, |
| 623 bool is_global, | 624 bool is_global, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 result->is_extended_mode()); | 666 result->is_extended_mode()); |
| 666 if (!result->dont_cache()) { | 667 if (!result->dont_cache()) { |
| 667 compilation_cache->PutEval( | 668 compilation_cache->PutEval( |
| 668 source, context, is_global, result, scope_position); | 669 source, context, is_global, result, scope_position); |
| 669 } | 670 } |
| 670 } | 671 } |
| 671 } else { | 672 } else { |
| 672 if (result->ic_age() != HEAP->global_ic_age()) { | 673 if (result->ic_age() != HEAP->global_ic_age()) { |
| 673 result->ResetForNewContext(HEAP->global_ic_age()); | 674 result->ResetForNewContext(HEAP->global_ic_age()); |
| 674 } | 675 } |
| 676 result->code()->MakeYoung(); |
| 675 } | 677 } |
| 676 | 678 |
| 677 return result; | 679 return result; |
| 678 } | 680 } |
| 679 | 681 |
| 680 | 682 |
| 681 static bool InstallFullCode(CompilationInfo* info) { | 683 static bool InstallFullCode(CompilationInfo* info) { |
| 682 // Update the shared function info with the compiled code and the | 684 // Update the shared function info with the compiled code and the |
| 683 // scope info. Please note, that the order of the shared function | 685 // scope info. Please note, that the order of the shared function |
| 684 // info initialization is important since set_scope_info might | 686 // info initialization is important since set_scope_info might |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 } | 1051 } |
| 1050 } | 1052 } |
| 1051 | 1053 |
| 1052 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1054 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
| 1053 Handle<Script>(info->script()), | 1055 Handle<Script>(info->script()), |
| 1054 Handle<Code>(info->code()), | 1056 Handle<Code>(info->code()), |
| 1055 info)); | 1057 info)); |
| 1056 } | 1058 } |
| 1057 | 1059 |
| 1058 } } // namespace v8::internal | 1060 } } // namespace v8::internal |
| OLD | NEW |