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 4031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4042 if (FLAG_trace_inlining) TraceInline(target, false); | 4042 if (FLAG_trace_inlining) TraceInline(target, false); |
4043 return false; | 4043 return false; |
4044 } | 4044 } |
4045 | 4045 |
4046 int count_before = AstNode::Count(); | 4046 int count_before = AstNode::Count(); |
4047 | 4047 |
4048 // Parse and allocate variables. | 4048 // Parse and allocate variables. |
4049 CompilationInfo inner_info(target); | 4049 CompilationInfo inner_info(target); |
4050 if (!ParserApi::Parse(&inner_info) || | 4050 if (!ParserApi::Parse(&inner_info) || |
4051 !Scope::Analyze(&inner_info)) { | 4051 !Scope::Analyze(&inner_info)) { |
| 4052 if (Top::has_pending_exception()) { |
| 4053 SetStackOverflow(); |
| 4054 } |
4052 return false; | 4055 return false; |
4053 } | 4056 } |
4054 FunctionLiteral* function = inner_info.function(); | 4057 FunctionLiteral* function = inner_info.function(); |
4055 | 4058 |
4056 // Count the number of AST nodes added by inlining this call. | 4059 // Count the number of AST nodes added by inlining this call. |
4057 int nodes_added = AstNode::Count() - count_before; | 4060 int nodes_added = AstNode::Count() - count_before; |
4058 if (FLAG_limit_inlining && nodes_added > kMaxInlinedSize) { | 4061 if (FLAG_limit_inlining && nodes_added > kMaxInlinedSize) { |
4059 if (FLAG_trace_inlining) TraceInline(target, false); | 4062 if (FLAG_trace_inlining) TraceInline(target, false); |
4060 return false; | 4063 return false; |
4061 } | 4064 } |
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6006 } | 6009 } |
6007 } | 6010 } |
6008 | 6011 |
6009 #ifdef DEBUG | 6012 #ifdef DEBUG |
6010 if (graph_ != NULL) graph_->Verify(); | 6013 if (graph_ != NULL) graph_->Verify(); |
6011 if (allocator_ != NULL) allocator_->Verify(); | 6014 if (allocator_ != NULL) allocator_->Verify(); |
6012 #endif | 6015 #endif |
6013 } | 6016 } |
6014 | 6017 |
6015 } } // namespace v8::internal | 6018 } } // namespace v8::internal |
OLD | NEW |