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

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

Issue 669240: - Remove function boilerplate objects and use SharedFunctionInfos in... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Committed Created 10 years, 9 months 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/fast-codegen.cc ('k') | src/handles.h » ('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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 DebuggerStatement* stmt) { 205 DebuggerStatement* stmt) {
206 // Supported. 206 // Supported.
207 } 207 }
208 208
209 209
210 void FullCodeGenSyntaxChecker::VisitFunctionLiteral(FunctionLiteral* expr) { 210 void FullCodeGenSyntaxChecker::VisitFunctionLiteral(FunctionLiteral* expr) {
211 // Supported. 211 // Supported.
212 } 212 }
213 213
214 214
215 void FullCodeGenSyntaxChecker::VisitFunctionBoilerplateLiteral( 215 void FullCodeGenSyntaxChecker::VisitSharedFunctionInfoLiteral(
216 FunctionBoilerplateLiteral* expr) { 216 SharedFunctionInfoLiteral* expr) {
217 BAILOUT("FunctionBoilerplateLiteral"); 217 BAILOUT("SharedFunctionInfoLiteral");
218 } 218 }
219 219
220 220
221 void FullCodeGenSyntaxChecker::VisitConditional(Conditional* expr) { 221 void FullCodeGenSyntaxChecker::VisitConditional(Conditional* expr) {
222 Visit(expr->condition()); 222 Visit(expr->condition());
223 CHECK_BAILOUT; 223 CHECK_BAILOUT;
224 Visit(expr->then_expression()); 224 Visit(expr->then_expression());
225 CHECK_BAILOUT; 225 CHECK_BAILOUT;
226 Visit(expr->else_expression()); 226 Visit(expr->else_expression());
227 } 227 }
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 if ((slot == NULL || slot->type() != Slot::LOOKUP) && var->is_global()) { 517 if ((slot == NULL || slot->type() != Slot::LOOKUP) && var->is_global()) {
518 array->set(j++, *(var->name())); 518 array->set(j++, *(var->name()));
519 if (decl->fun() == NULL) { 519 if (decl->fun() == NULL) {
520 if (var->mode() == Variable::CONST) { 520 if (var->mode() == Variable::CONST) {
521 // In case this is const property use the hole. 521 // In case this is const property use the hole.
522 array->set_the_hole(j++); 522 array->set_the_hole(j++);
523 } else { 523 } else {
524 array->set_undefined(j++); 524 array->set_undefined(j++);
525 } 525 }
526 } else { 526 } else {
527 Handle<JSFunction> function = 527 Handle<SharedFunctionInfo> function =
528 Compiler::BuildBoilerplate(decl->fun(), script(), this); 528 Compiler::BuildFunctionInfo(decl->fun(), script(), this);
529 // Check for stack-overflow exception. 529 // Check for stack-overflow exception.
530 if (HasStackOverflow()) return; 530 if (HasStackOverflow()) return;
531 array->set(j++, *function); 531 array->set(j++, *function);
532 } 532 }
533 } 533 }
534 } 534 }
535 // Invoke the platform-dependent code generator to do the actual 535 // Invoke the platform-dependent code generator to do the actual
536 // declaration the global variables and functions. 536 // declaration the global variables and functions.
537 DeclareGlobals(array); 537 DeclareGlobals(array);
538 } 538 }
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 #ifdef ENABLE_DEBUGGER_SUPPORT 991 #ifdef ENABLE_DEBUGGER_SUPPORT
992 Comment cmnt(masm_, "[ DebuggerStatement"); 992 Comment cmnt(masm_, "[ DebuggerStatement");
993 SetStatementPosition(stmt); 993 SetStatementPosition(stmt);
994 994
995 __ DebugBreak(); 995 __ DebugBreak();
996 // Ignore the return value. 996 // Ignore the return value.
997 #endif 997 #endif
998 } 998 }
999 999
1000 1000
1001 void FullCodeGenerator::VisitFunctionBoilerplateLiteral( 1001 void FullCodeGenerator::VisitSharedFunctionInfoLiteral(
1002 FunctionBoilerplateLiteral* expr) { 1002 SharedFunctionInfoLiteral* expr) {
1003 UNREACHABLE(); 1003 UNREACHABLE();
1004 } 1004 }
1005 1005
1006 1006
1007 void FullCodeGenerator::VisitConditional(Conditional* expr) { 1007 void FullCodeGenerator::VisitConditional(Conditional* expr) {
1008 Comment cmnt(masm_, "[ Conditional"); 1008 Comment cmnt(masm_, "[ Conditional");
1009 Label true_case, false_case, done; 1009 Label true_case, false_case, done;
1010 VisitForControl(expr->condition(), &true_case, &false_case); 1010 VisitForControl(expr->condition(), &true_case, &false_case);
1011 1011
1012 __ bind(&true_case); 1012 __ bind(&true_case);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 // The macros used here must preserve the result register. 1070 // The macros used here must preserve the result register.
1071 __ Drop(stack_depth); 1071 __ Drop(stack_depth);
1072 __ PopTryHandler(); 1072 __ PopTryHandler();
1073 return 0; 1073 return 0;
1074 } 1074 }
1075 1075
1076 #undef __ 1076 #undef __
1077 1077
1078 1078
1079 } } // namespace v8::internal 1079 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/fast-codegen.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698