Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Side by Side Diff: src/full-codegen.cc

Issue 5274002: Version 2.5.8... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/full-codegen.h ('k') | src/handles.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 SetStatementPosition(stmt); 875 SetStatementPosition(stmt);
876 Label body, stack_limit_hit, stack_check_success, done; 876 Label body, stack_limit_hit, stack_check_success, done;
877 877
878 Iteration loop_statement(this, stmt); 878 Iteration loop_statement(this, stmt);
879 increment_loop_depth(); 879 increment_loop_depth();
880 880
881 __ bind(&body); 881 __ bind(&body);
882 Visit(stmt->body()); 882 Visit(stmt->body());
883 883
884 // Check stack before looping. 884 // Check stack before looping.
885 __ bind(loop_statement.continue_target());
885 __ StackLimitCheck(&stack_limit_hit); 886 __ StackLimitCheck(&stack_limit_hit);
886 __ bind(&stack_check_success); 887 __ bind(&stack_check_success);
887 888
888 // Record the position of the do while condition and make sure it is 889 // Record the position of the do while condition and make sure it is
889 // possible to break on the condition. 890 // possible to break on the condition.
890 __ bind(loop_statement.continue_target());
891 SetExpressionPosition(stmt->cond(), stmt->condition_position()); 891 SetExpressionPosition(stmt->cond(), stmt->condition_position());
892 VisitForControl(stmt->cond(), 892 VisitForControl(stmt->cond(),
893 &body, 893 &body,
894 loop_statement.break_target(), 894 loop_statement.break_target(),
895 loop_statement.break_target()); 895 loop_statement.break_target());
896 896
897 __ bind(loop_statement.break_target()); 897 __ bind(loop_statement.break_target());
898 __ jmp(&done); 898 __ jmp(&done);
899 899
900 __ bind(&stack_limit_hit); 900 __ bind(&stack_limit_hit);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698