OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 4687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4698 // Generate the deoptimization data for the unoptimized version of | 4698 // Generate the deoptimization data for the unoptimized version of |
4699 // the target function if we don't already have it. | 4699 // the target function if we don't already have it. |
4700 if (!target_shared->has_deoptimization_support()) { | 4700 if (!target_shared->has_deoptimization_support()) { |
4701 // Note that we compile here using the same AST that we will use for | 4701 // Note that we compile here using the same AST that we will use for |
4702 // generating the optimized inline code. | 4702 // generating the optimized inline code. |
4703 target_info.EnableDeoptimizationSupport(); | 4703 target_info.EnableDeoptimizationSupport(); |
4704 if (!FullCodeGenerator::MakeCode(&target_info)) { | 4704 if (!FullCodeGenerator::MakeCode(&target_info)) { |
4705 TraceInline(target, caller, "could not generate deoptimization info"); | 4705 TraceInline(target, caller, "could not generate deoptimization info"); |
4706 return false; | 4706 return false; |
4707 } | 4707 } |
4708 if (target_shared->scope_info() == SerializedScopeInfo::Empty()) { | 4708 if (target_shared->scope_info() == ScopeInfo::Empty()) { |
4709 // The scope info might not have been set if a lazily compiled | 4709 // The scope info might not have been set if a lazily compiled |
4710 // function is inlined before being called for the first time. | 4710 // function is inlined before being called for the first time. |
4711 Handle<SerializedScopeInfo> target_scope_info = | 4711 Handle<ScopeInfo> target_scope_info = |
4712 SerializedScopeInfo::Create(target_info.scope()); | 4712 ScopeInfo::Create(target_info.scope()); |
4713 target_shared->set_scope_info(*target_scope_info); | 4713 target_shared->set_scope_info(*target_scope_info); |
4714 } | 4714 } |
4715 target_shared->EnableDeoptimizationSupport(*target_info.code()); | 4715 target_shared->EnableDeoptimizationSupport(*target_info.code()); |
4716 Compiler::RecordFunctionCompilation(Logger::FUNCTION_TAG, | 4716 Compiler::RecordFunctionCompilation(Logger::FUNCTION_TAG, |
4717 &target_info, | 4717 &target_info, |
4718 target_shared); | 4718 target_shared); |
4719 } | 4719 } |
4720 | 4720 |
4721 // ---------------------------------------------------------------- | 4721 // ---------------------------------------------------------------- |
4722 // After this point, we've made a decision to inline this function (so | 4722 // After this point, we've made a decision to inline this function (so |
(...skipping 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7033 } | 7033 } |
7034 } | 7034 } |
7035 | 7035 |
7036 #ifdef DEBUG | 7036 #ifdef DEBUG |
7037 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7037 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
7038 if (allocator_ != NULL) allocator_->Verify(); | 7038 if (allocator_ != NULL) allocator_->Verify(); |
7039 #endif | 7039 #endif |
7040 } | 7040 } |
7041 | 7041 |
7042 } } // namespace v8::internal | 7042 } } // namespace v8::internal |
OLD | NEW |