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 7920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7931 } | 7931 } |
7932 | 7932 |
7933 // We don't want to add more than a certain number of nodes from inlining. | 7933 // We don't want to add more than a certain number of nodes from inlining. |
7934 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, | 7934 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, |
7935 kUnlimitedMaxInlinedNodesCumulative)) { | 7935 kUnlimitedMaxInlinedNodesCumulative)) { |
7936 TraceInline(target, caller, "cumulative AST node limit reached"); | 7936 TraceInline(target, caller, "cumulative AST node limit reached"); |
7937 return false; | 7937 return false; |
7938 } | 7938 } |
7939 | 7939 |
7940 // Parse and allocate variables. | 7940 // Parse and allocate variables. |
7941 CompilationInfo target_info(target, zone()); | 7941 CompilationInfo target_info(target, zone(), current_info()->phase_zone()); |
7942 Handle<SharedFunctionInfo> target_shared(target->shared()); | 7942 Handle<SharedFunctionInfo> target_shared(target->shared()); |
7943 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info)) { | 7943 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info)) { |
7944 if (target_info.isolate()->has_pending_exception()) { | 7944 if (target_info.isolate()->has_pending_exception()) { |
7945 // Parse or scope error, never optimize this function. | 7945 // Parse or scope error, never optimize this function. |
7946 SetStackOverflow(); | 7946 SetStackOverflow(); |
7947 target_shared->DisableOptimization("parse/scope error"); | 7947 target_shared->DisableOptimization("parse/scope error"); |
7948 } | 7948 } |
7949 TraceInline(target, caller, "parse failure"); | 7949 TraceInline(target, caller, "parse failure"); |
7950 return false; | 7950 return false; |
7951 } | 7951 } |
(...skipping 3632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11584 } | 11584 } |
11585 } | 11585 } |
11586 | 11586 |
11587 #ifdef DEBUG | 11587 #ifdef DEBUG |
11588 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 11588 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
11589 if (allocator_ != NULL) allocator_->Verify(); | 11589 if (allocator_ != NULL) allocator_->Verify(); |
11590 #endif | 11590 #endif |
11591 } | 11591 } |
11592 | 11592 |
11593 } } // namespace v8::internal | 11593 } } // namespace v8::internal |
OLD | NEW |