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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 static void InstallCodeCommon(CompilationInfo* info) { | 719 static void InstallCodeCommon(CompilationInfo* info) { |
720 Handle<SharedFunctionInfo> shared = info->shared_info(); | 720 Handle<SharedFunctionInfo> shared = info->shared_info(); |
721 Handle<Code> code = info->code(); | 721 Handle<Code> code = info->code(); |
722 ASSERT(!code.is_null()); | 722 ASSERT(!code.is_null()); |
723 | 723 |
724 // Set optimizable to false if this is disallowed by the shared | 724 // Set optimizable to false if this is disallowed by the shared |
725 // function info, e.g., we might have flushed the code and must | 725 // function info, e.g., we might have flushed the code and must |
726 // reset this bit when lazy compiling the code again. | 726 // reset this bit when lazy compiling the code again. |
727 if (shared->optimization_disabled()) code->set_optimizable(false); | 727 if (shared->optimization_disabled()) code->set_optimizable(false); |
728 | 728 |
729 Handle<JSFunction> function = info->closure(); | |
730 Compiler::RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared); | 729 Compiler::RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared); |
731 } | 730 } |
732 | 731 |
733 | 732 |
734 static void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) { | 733 static void InsertCodeIntoOptimizedCodeMap(CompilationInfo* info) { |
735 Handle<Code> code = info->code(); | 734 Handle<Code> code = info->code(); |
736 Handle<JSFunction> function = info->closure(); | 735 Handle<JSFunction> function = info->closure(); |
737 if (FLAG_cache_optimized_code && code->kind() == Code::OPTIMIZED_FUNCTION) { | 736 if (FLAG_cache_optimized_code && code->kind() == Code::OPTIMIZED_FUNCTION) { |
738 Handle<SharedFunctionInfo> shared(function->shared()); | 737 Handle<SharedFunctionInfo> shared(function->shared()); |
739 Handle<FixedArray> literals(function->literals()); | 738 Handle<FixedArray> literals(function->literals()); |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 } | 1027 } |
1029 } | 1028 } |
1030 | 1029 |
1031 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1030 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
1032 Handle<Script>(info->script()), | 1031 Handle<Script>(info->script()), |
1033 Handle<Code>(info->code()), | 1032 Handle<Code>(info->code()), |
1034 info)); | 1033 info)); |
1035 } | 1034 } |
1036 | 1035 |
1037 } } // namespace v8::internal | 1036 } } // namespace v8::internal |
OLD | NEW |