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/ast.cc

Issue 9419005: Allow inlining of functions containing function literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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 | « no previous file | test/mjsunit/compiler/inline-literals.js » ('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 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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 INCREASE_NODE_COUNT(Block) 1003 INCREASE_NODE_COUNT(Block)
1004 INCREASE_NODE_COUNT(ExpressionStatement) 1004 INCREASE_NODE_COUNT(ExpressionStatement)
1005 INCREASE_NODE_COUNT(EmptyStatement) 1005 INCREASE_NODE_COUNT(EmptyStatement)
1006 INCREASE_NODE_COUNT(IfStatement) 1006 INCREASE_NODE_COUNT(IfStatement)
1007 INCREASE_NODE_COUNT(ContinueStatement) 1007 INCREASE_NODE_COUNT(ContinueStatement)
1008 INCREASE_NODE_COUNT(BreakStatement) 1008 INCREASE_NODE_COUNT(BreakStatement)
1009 INCREASE_NODE_COUNT(ReturnStatement) 1009 INCREASE_NODE_COUNT(ReturnStatement)
1010 INCREASE_NODE_COUNT(Conditional) 1010 INCREASE_NODE_COUNT(Conditional)
1011 INCREASE_NODE_COUNT(Literal) 1011 INCREASE_NODE_COUNT(Literal)
1012 INCREASE_NODE_COUNT(ObjectLiteral) 1012 INCREASE_NODE_COUNT(ObjectLiteral)
1013 INCREASE_NODE_COUNT(FunctionLiteral)
1013 INCREASE_NODE_COUNT(Assignment) 1014 INCREASE_NODE_COUNT(Assignment)
1014 INCREASE_NODE_COUNT(Throw) 1015 INCREASE_NODE_COUNT(Throw)
1015 INCREASE_NODE_COUNT(Property) 1016 INCREASE_NODE_COUNT(Property)
1016 INCREASE_NODE_COUNT(UnaryOperation) 1017 INCREASE_NODE_COUNT(UnaryOperation)
1017 INCREASE_NODE_COUNT(CountOperation) 1018 INCREASE_NODE_COUNT(CountOperation)
1018 INCREASE_NODE_COUNT(BinaryOperation) 1019 INCREASE_NODE_COUNT(BinaryOperation)
1019 INCREASE_NODE_COUNT(CompareOperation) 1020 INCREASE_NODE_COUNT(CompareOperation)
1020 INCREASE_NODE_COUNT(ThisFunction) 1021 INCREASE_NODE_COUNT(ThisFunction)
1021 1022
1022 #undef INCREASE_NODE_COUNT 1023 #undef INCREASE_NODE_COUNT
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 } 1077 }
1077 1078
1078 1079
1079 void AstConstructionVisitor::VisitDebuggerStatement(DebuggerStatement* node) { 1080 void AstConstructionVisitor::VisitDebuggerStatement(DebuggerStatement* node) {
1080 increase_node_count(); 1081 increase_node_count();
1081 add_flag(kDontOptimize); 1082 add_flag(kDontOptimize);
1082 add_flag(kDontInline); 1083 add_flag(kDontInline);
1083 } 1084 }
1084 1085
1085 1086
1086 void AstConstructionVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
1087 increase_node_count();
1088 add_flag(kDontInline);
1089 }
1090
1091
1092 void AstConstructionVisitor::VisitSharedFunctionInfoLiteral( 1087 void AstConstructionVisitor::VisitSharedFunctionInfoLiteral(
1093 SharedFunctionInfoLiteral* node) { 1088 SharedFunctionInfoLiteral* node) {
1094 increase_node_count(); 1089 increase_node_count();
1095 add_flag(kDontOptimize); 1090 add_flag(kDontOptimize);
1096 add_flag(kDontInline); 1091 add_flag(kDontInline);
1097 } 1092 }
1098 1093
1099 1094
1100 void AstConstructionVisitor::VisitVariableProxy(VariableProxy* node) { 1095 void AstConstructionVisitor::VisitVariableProxy(VariableProxy* node) {
1101 increase_node_count(); 1096 increase_node_count();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 (node->name()->IsEqualTo(CStrVector("_ArgumentsLength")) || 1137 (node->name()->IsEqualTo(CStrVector("_ArgumentsLength")) ||
1143 node->name()->IsEqualTo(CStrVector("_Arguments")))) { 1138 node->name()->IsEqualTo(CStrVector("_Arguments")))) {
1144 // Don't inline the %_ArgumentsLength or %_Arguments because their 1139 // Don't inline the %_ArgumentsLength or %_Arguments because their
1145 // implementation will not work. There is no stack frame to get them 1140 // implementation will not work. There is no stack frame to get them
1146 // from. 1141 // from.
1147 add_flag(kDontInline); 1142 add_flag(kDontInline);
1148 } 1143 }
1149 } 1144 }
1150 1145
1151 } } // namespace v8::internal 1146 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/compiler/inline-literals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698