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 7607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7618 // Generate the deoptimization data for the unoptimized version of | 7618 // Generate the deoptimization data for the unoptimized version of |
7619 // the target function if we don't already have it. | 7619 // the target function if we don't already have it. |
7620 if (!target_shared->has_deoptimization_support()) { | 7620 if (!target_shared->has_deoptimization_support()) { |
7621 // Note that we compile here using the same AST that we will use for | 7621 // Note that we compile here using the same AST that we will use for |
7622 // generating the optimized inline code. | 7622 // generating the optimized inline code. |
7623 target_info.EnableDeoptimizationSupport(); | 7623 target_info.EnableDeoptimizationSupport(); |
7624 if (!FullCodeGenerator::MakeCode(&target_info)) { | 7624 if (!FullCodeGenerator::MakeCode(&target_info)) { |
7625 TraceInline(target, caller, "could not generate deoptimization info"); | 7625 TraceInline(target, caller, "could not generate deoptimization info"); |
7626 return false; | 7626 return false; |
7627 } | 7627 } |
7628 if (target_shared->scope_info() == ScopeInfo::Empty()) { | 7628 if (target_shared->scope_info() == ScopeInfo::Empty(isolate())) { |
7629 // The scope info might not have been set if a lazily compiled | 7629 // The scope info might not have been set if a lazily compiled |
7630 // function is inlined before being called for the first time. | 7630 // function is inlined before being called for the first time. |
7631 Handle<ScopeInfo> target_scope_info = | 7631 Handle<ScopeInfo> target_scope_info = |
7632 ScopeInfo::Create(target_info.scope(), zone()); | 7632 ScopeInfo::Create(target_info.scope(), zone()); |
7633 target_shared->set_scope_info(*target_scope_info); | 7633 target_shared->set_scope_info(*target_scope_info); |
7634 } | 7634 } |
7635 target_shared->EnableDeoptimizationSupport(*target_info.code()); | 7635 target_shared->EnableDeoptimizationSupport(*target_info.code()); |
7636 Compiler::RecordFunctionCompilation(Logger::FUNCTION_TAG, | 7636 Compiler::RecordFunctionCompilation(Logger::FUNCTION_TAG, |
7637 &target_info, | 7637 &target_info, |
7638 target_shared); | 7638 target_shared); |
(...skipping 3155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10794 } | 10794 } |
10795 } | 10795 } |
10796 | 10796 |
10797 #ifdef DEBUG | 10797 #ifdef DEBUG |
10798 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 10798 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
10799 if (allocator_ != NULL) allocator_->Verify(); | 10799 if (allocator_ != NULL) allocator_->Verify(); |
10800 #endif | 10800 #endif |
10801 } | 10801 } |
10802 | 10802 |
10803 } } // namespace v8::internal | 10803 } } // namespace v8::internal |
OLD | NEW |