OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 void FullCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { | 1161 void FullCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { |
1162 Comment cmnt(masm_, "[ FunctionLiteral"); | 1162 Comment cmnt(masm_, "[ FunctionLiteral"); |
1163 | 1163 |
1164 // Build the function boilerplate and instantiate it. | 1164 // Build the function boilerplate and instantiate it. |
1165 Handle<SharedFunctionInfo> function_info = | 1165 Handle<SharedFunctionInfo> function_info = |
1166 Compiler::BuildFunctionInfo(expr, script()); | 1166 Compiler::BuildFunctionInfo(expr, script()); |
1167 if (function_info.is_null()) { | 1167 if (function_info.is_null()) { |
1168 SetStackOverflow(); | 1168 SetStackOverflow(); |
1169 return; | 1169 return; |
1170 } | 1170 } |
1171 EmitNewClosure(function_info); | 1171 EmitNewClosure(function_info, expr->pretenure()); |
1172 } | 1172 } |
1173 | 1173 |
1174 | 1174 |
1175 void FullCodeGenerator::VisitSharedFunctionInfoLiteral( | 1175 void FullCodeGenerator::VisitSharedFunctionInfoLiteral( |
1176 SharedFunctionInfoLiteral* expr) { | 1176 SharedFunctionInfoLiteral* expr) { |
1177 Comment cmnt(masm_, "[ SharedFunctionInfoLiteral"); | 1177 Comment cmnt(masm_, "[ SharedFunctionInfoLiteral"); |
1178 EmitNewClosure(expr->shared_function_info()); | 1178 EmitNewClosure(expr->shared_function_info(), false); |
1179 } | 1179 } |
1180 | 1180 |
1181 | 1181 |
1182 void FullCodeGenerator::VisitCatchExtensionObject(CatchExtensionObject* expr) { | 1182 void FullCodeGenerator::VisitCatchExtensionObject(CatchExtensionObject* expr) { |
1183 // Call runtime routine to allocate the catch extension object and | 1183 // Call runtime routine to allocate the catch extension object and |
1184 // assign the exception value to the catch variable. | 1184 // assign the exception value to the catch variable. |
1185 Comment cmnt(masm_, "[ CatchExtensionObject"); | 1185 Comment cmnt(masm_, "[ CatchExtensionObject"); |
1186 VisitForStackValue(expr->key()); | 1186 VisitForStackValue(expr->key()); |
1187 VisitForStackValue(expr->value()); | 1187 VisitForStackValue(expr->value()); |
1188 // Create catch extension object. | 1188 // Create catch extension object. |
(...skipping 29 matching lines...) Expand all Loading... |
1218 __ Drop(stack_depth); | 1218 __ Drop(stack_depth); |
1219 __ PopTryHandler(); | 1219 __ PopTryHandler(); |
1220 return 0; | 1220 return 0; |
1221 } | 1221 } |
1222 | 1222 |
1223 | 1223 |
1224 #undef __ | 1224 #undef __ |
1225 | 1225 |
1226 | 1226 |
1227 } } // namespace v8::internal | 1227 } } // namespace v8::internal |
OLD | NEW |