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

Side by Side Diff: src/ast.cc

Issue 10690045: Disallow inlining of functions containing array literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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 | no next file » | 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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 REGULAR_NODE(EmptyStatement) 1041 REGULAR_NODE(EmptyStatement)
1042 REGULAR_NODE(IfStatement) 1042 REGULAR_NODE(IfStatement)
1043 REGULAR_NODE(ContinueStatement) 1043 REGULAR_NODE(ContinueStatement)
1044 REGULAR_NODE(BreakStatement) 1044 REGULAR_NODE(BreakStatement)
1045 REGULAR_NODE(ReturnStatement) 1045 REGULAR_NODE(ReturnStatement)
1046 REGULAR_NODE(SwitchStatement) 1046 REGULAR_NODE(SwitchStatement)
1047 REGULAR_NODE(Conditional) 1047 REGULAR_NODE(Conditional)
1048 REGULAR_NODE(Literal) 1048 REGULAR_NODE(Literal)
1049 REGULAR_NODE(ObjectLiteral) 1049 REGULAR_NODE(ObjectLiteral)
1050 REGULAR_NODE(RegExpLiteral) 1050 REGULAR_NODE(RegExpLiteral)
1051 REGULAR_NODE(ArrayLiteral)
1052 REGULAR_NODE(Assignment) 1051 REGULAR_NODE(Assignment)
1053 REGULAR_NODE(Throw) 1052 REGULAR_NODE(Throw)
1054 REGULAR_NODE(Property) 1053 REGULAR_NODE(Property)
1055 REGULAR_NODE(UnaryOperation) 1054 REGULAR_NODE(UnaryOperation)
1056 REGULAR_NODE(CountOperation) 1055 REGULAR_NODE(CountOperation)
1057 REGULAR_NODE(BinaryOperation) 1056 REGULAR_NODE(BinaryOperation)
1058 REGULAR_NODE(CompareOperation) 1057 REGULAR_NODE(CompareOperation)
1059 REGULAR_NODE(ThisFunction) 1058 REGULAR_NODE(ThisFunction)
1060 REGULAR_NODE(Call) 1059 REGULAR_NODE(Call)
1061 REGULAR_NODE(CallNew) 1060 REGULAR_NODE(CallNew)
1062 // In theory, for VariableProxy we'd have to add: 1061 // In theory, for VariableProxy we'd have to add:
1063 // if (node->var()->IsLookupSlot()) add_flag(kDontInline); 1062 // if (node->var()->IsLookupSlot()) add_flag(kDontInline);
1064 // But node->var() is usually not bound yet at VariableProxy creation time, and 1063 // But node->var() is usually not bound yet at VariableProxy creation time, and
1065 // LOOKUP variables only result from constructs that cannot be inlined anyway. 1064 // LOOKUP variables only result from constructs that cannot be inlined anyway.
1066 REGULAR_NODE(VariableProxy) 1065 REGULAR_NODE(VariableProxy)
1067 1066
1068 DONT_OPTIMIZE_NODE(ModuleDeclaration) 1067 DONT_OPTIMIZE_NODE(ModuleDeclaration)
1069 DONT_OPTIMIZE_NODE(ImportDeclaration) 1068 DONT_OPTIMIZE_NODE(ImportDeclaration)
1070 DONT_OPTIMIZE_NODE(ExportDeclaration) 1069 DONT_OPTIMIZE_NODE(ExportDeclaration)
1071 DONT_OPTIMIZE_NODE(ModuleLiteral) 1070 DONT_OPTIMIZE_NODE(ModuleLiteral)
1072 DONT_OPTIMIZE_NODE(ModuleVariable) 1071 DONT_OPTIMIZE_NODE(ModuleVariable)
1073 DONT_OPTIMIZE_NODE(ModulePath) 1072 DONT_OPTIMIZE_NODE(ModulePath)
1074 DONT_OPTIMIZE_NODE(ModuleUrl) 1073 DONT_OPTIMIZE_NODE(ModuleUrl)
1075 DONT_OPTIMIZE_NODE(WithStatement) 1074 DONT_OPTIMIZE_NODE(WithStatement)
1076 DONT_OPTIMIZE_NODE(TryCatchStatement) 1075 DONT_OPTIMIZE_NODE(TryCatchStatement)
1077 DONT_OPTIMIZE_NODE(TryFinallyStatement) 1076 DONT_OPTIMIZE_NODE(TryFinallyStatement)
1078 DONT_OPTIMIZE_NODE(DebuggerStatement) 1077 DONT_OPTIMIZE_NODE(DebuggerStatement)
1079 DONT_OPTIMIZE_NODE(SharedFunctionInfoLiteral) 1078 DONT_OPTIMIZE_NODE(SharedFunctionInfoLiteral)
1080 1079
1080 DONT_INLINE_NODE(ArrayLiteral) // TODO(1322): Allow materialized literals.
1081 DONT_INLINE_NODE(FunctionLiteral) 1081 DONT_INLINE_NODE(FunctionLiteral)
1082 1082
1083 DONT_SELFOPTIMIZE_NODE(DoWhileStatement) 1083 DONT_SELFOPTIMIZE_NODE(DoWhileStatement)
1084 DONT_SELFOPTIMIZE_NODE(WhileStatement) 1084 DONT_SELFOPTIMIZE_NODE(WhileStatement)
1085 DONT_SELFOPTIMIZE_NODE(ForStatement) 1085 DONT_SELFOPTIMIZE_NODE(ForStatement)
1086 DONT_SELFOPTIMIZE_NODE(ForInStatement) 1086 DONT_SELFOPTIMIZE_NODE(ForInStatement)
1087 1087
1088 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) { 1088 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) {
1089 increase_node_count(); 1089 increase_node_count();
1090 if (node->is_jsruntime()) { 1090 if (node->is_jsruntime()) {
(...skipping 27 matching lines...) Expand all
1118 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); 1118 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value());
1119 str = arr; 1119 str = arr;
1120 } else { 1120 } else {
1121 str = DoubleToCString(handle_->Number(), buffer); 1121 str = DoubleToCString(handle_->Number(), buffer);
1122 } 1122 }
1123 return FACTORY->NewStringFromAscii(CStrVector(str)); 1123 return FACTORY->NewStringFromAscii(CStrVector(str));
1124 } 1124 }
1125 1125
1126 1126
1127 } } // namespace v8::internal 1127 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698