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 7974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7985 // We don't want to add more than a certain number of nodes from inlining. | 7985 // We don't want to add more than a certain number of nodes from inlining. |
7986 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, | 7986 if (inlined_count_ > Min(FLAG_max_inlined_nodes_cumulative, |
7987 kUnlimitedMaxInlinedNodesCumulative)) { | 7987 kUnlimitedMaxInlinedNodesCumulative)) { |
7988 TraceInline(target, caller, "cumulative AST node limit reached"); | 7988 TraceInline(target, caller, "cumulative AST node limit reached"); |
7989 return false; | 7989 return false; |
7990 } | 7990 } |
7991 | 7991 |
7992 // Parse and allocate variables. | 7992 // Parse and allocate variables. |
7993 CompilationInfo target_info(target, zone()); | 7993 CompilationInfo target_info(target, zone()); |
7994 Handle<SharedFunctionInfo> target_shared(target->shared()); | 7994 Handle<SharedFunctionInfo> target_shared(target->shared()); |
7995 if (!ParserApi::Parse(&target_info, kNoParsingFlags) || | 7995 if (!Parser::Parse(&target_info) || !Scope::Analyze(&target_info)) { |
7996 !Scope::Analyze(&target_info)) { | |
7997 if (target_info.isolate()->has_pending_exception()) { | 7996 if (target_info.isolate()->has_pending_exception()) { |
7998 // Parse or scope error, never optimize this function. | 7997 // Parse or scope error, never optimize this function. |
7999 SetStackOverflow(); | 7998 SetStackOverflow(); |
8000 target_shared->DisableOptimization("parse/scope error"); | 7999 target_shared->DisableOptimization("parse/scope error"); |
8001 } | 8000 } |
8002 TraceInline(target, caller, "parse failure"); | 8001 TraceInline(target, caller, "parse failure"); |
8003 return false; | 8002 return false; |
8004 } | 8003 } |
8005 | 8004 |
8006 if (target_info.scope()->num_heap_slots() > 0) { | 8005 if (target_info.scope()->num_heap_slots() > 0) { |
(...skipping 3279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11286 } | 11285 } |
11287 } | 11286 } |
11288 | 11287 |
11289 #ifdef DEBUG | 11288 #ifdef DEBUG |
11290 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 11289 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
11291 if (allocator_ != NULL) allocator_->Verify(); | 11290 if (allocator_ != NULL) allocator_->Verify(); |
11292 #endif | 11291 #endif |
11293 } | 11292 } |
11294 | 11293 |
11295 } } // namespace v8::internal | 11294 } } // namespace v8::internal |
OLD | NEW |