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

Side by Side Diff: src/ast.cc

Issue 10689005: Allow 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 | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.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 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)
1051 REGULAR_NODE(Assignment) 1052 REGULAR_NODE(Assignment)
1052 REGULAR_NODE(Throw) 1053 REGULAR_NODE(Throw)
1053 REGULAR_NODE(Property) 1054 REGULAR_NODE(Property)
1054 REGULAR_NODE(UnaryOperation) 1055 REGULAR_NODE(UnaryOperation)
1055 REGULAR_NODE(CountOperation) 1056 REGULAR_NODE(CountOperation)
1056 REGULAR_NODE(BinaryOperation) 1057 REGULAR_NODE(BinaryOperation)
1057 REGULAR_NODE(CompareOperation) 1058 REGULAR_NODE(CompareOperation)
1058 REGULAR_NODE(ThisFunction) 1059 REGULAR_NODE(ThisFunction)
1059 REGULAR_NODE(Call) 1060 REGULAR_NODE(Call)
1060 REGULAR_NODE(CallNew) 1061 REGULAR_NODE(CallNew)
(...skipping 10 matching lines...) Expand all
1071 DONT_OPTIMIZE_NODE(ModuleVariable) 1072 DONT_OPTIMIZE_NODE(ModuleVariable)
1072 DONT_OPTIMIZE_NODE(ModulePath) 1073 DONT_OPTIMIZE_NODE(ModulePath)
1073 DONT_OPTIMIZE_NODE(ModuleUrl) 1074 DONT_OPTIMIZE_NODE(ModuleUrl)
1074 DONT_OPTIMIZE_NODE(WithStatement) 1075 DONT_OPTIMIZE_NODE(WithStatement)
1075 DONT_OPTIMIZE_NODE(TryCatchStatement) 1076 DONT_OPTIMIZE_NODE(TryCatchStatement)
1076 DONT_OPTIMIZE_NODE(TryFinallyStatement) 1077 DONT_OPTIMIZE_NODE(TryFinallyStatement)
1077 DONT_OPTIMIZE_NODE(DebuggerStatement) 1078 DONT_OPTIMIZE_NODE(DebuggerStatement)
1078 DONT_OPTIMIZE_NODE(SharedFunctionInfoLiteral) 1079 DONT_OPTIMIZE_NODE(SharedFunctionInfoLiteral)
1079 1080
1080 DONT_INLINE_NODE(FunctionLiteral) 1081 DONT_INLINE_NODE(FunctionLiteral)
1081 DONT_INLINE_NODE(ArrayLiteral) // TODO(1322): Allow materialized literals.
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()) {
1091 // Don't try to inline JS runtime calls because we don't (currently) even 1091 // Don't try to inline JS runtime calls because we don't (currently) even
(...skipping 26 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 | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698