| OLD | NEW |
| 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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 REGULAR_NODE(Assignment) | 1059 REGULAR_NODE(Assignment) |
| 1060 REGULAR_NODE(Throw) | 1060 REGULAR_NODE(Throw) |
| 1061 REGULAR_NODE(Property) | 1061 REGULAR_NODE(Property) |
| 1062 REGULAR_NODE(UnaryOperation) | 1062 REGULAR_NODE(UnaryOperation) |
| 1063 REGULAR_NODE(CountOperation) | 1063 REGULAR_NODE(CountOperation) |
| 1064 REGULAR_NODE(BinaryOperation) | 1064 REGULAR_NODE(BinaryOperation) |
| 1065 REGULAR_NODE(CompareOperation) | 1065 REGULAR_NODE(CompareOperation) |
| 1066 REGULAR_NODE(ThisFunction) | 1066 REGULAR_NODE(ThisFunction) |
| 1067 REGULAR_NODE(Call) | 1067 REGULAR_NODE(Call) |
| 1068 REGULAR_NODE(CallNew) | 1068 REGULAR_NODE(CallNew) |
| 1069 REGULAR_NODE(FunctionLiteral) |
| 1069 // In theory, for VariableProxy we'd have to add: | 1070 // In theory, for VariableProxy we'd have to add: |
| 1070 // if (node->var()->IsLookupSlot()) add_flag(kDontInline); | 1071 // if (node->var()->IsLookupSlot()) add_flag(kDontInline); |
| 1071 // But node->var() is usually not bound yet at VariableProxy creation time, and | 1072 // But node->var() is usually not bound yet at VariableProxy creation time, and |
| 1072 // LOOKUP variables only result from constructs that cannot be inlined anyway. | 1073 // LOOKUP variables only result from constructs that cannot be inlined anyway. |
| 1073 REGULAR_NODE(VariableProxy) | 1074 REGULAR_NODE(VariableProxy) |
| 1074 | 1075 |
| 1075 // We currently do not optimize any modules. Note in particular, that module | 1076 // We currently do not optimize any modules. Note in particular, that module |
| 1076 // instance objects associated with ModuleLiterals are allocated during | 1077 // instance objects associated with ModuleLiterals are allocated during |
| 1077 // scope resolution, and references to them are embedded into the code. | 1078 // scope resolution, and references to them are embedded into the code. |
| 1078 // That code may hence neither be cached nor re-compiled. | 1079 // That code may hence neither be cached nor re-compiled. |
| 1079 DONT_OPTIMIZE_NODE(ModuleDeclaration) | 1080 DONT_OPTIMIZE_NODE(ModuleDeclaration) |
| 1080 DONT_OPTIMIZE_NODE(ImportDeclaration) | 1081 DONT_OPTIMIZE_NODE(ImportDeclaration) |
| 1081 DONT_OPTIMIZE_NODE(ExportDeclaration) | 1082 DONT_OPTIMIZE_NODE(ExportDeclaration) |
| 1082 DONT_OPTIMIZE_NODE(ModuleVariable) | 1083 DONT_OPTIMIZE_NODE(ModuleVariable) |
| 1083 DONT_OPTIMIZE_NODE(ModulePath) | 1084 DONT_OPTIMIZE_NODE(ModulePath) |
| 1084 DONT_OPTIMIZE_NODE(ModuleUrl) | 1085 DONT_OPTIMIZE_NODE(ModuleUrl) |
| 1085 DONT_OPTIMIZE_NODE(WithStatement) | 1086 DONT_OPTIMIZE_NODE(WithStatement) |
| 1086 DONT_OPTIMIZE_NODE(TryCatchStatement) | 1087 DONT_OPTIMIZE_NODE(TryCatchStatement) |
| 1087 DONT_OPTIMIZE_NODE(TryFinallyStatement) | 1088 DONT_OPTIMIZE_NODE(TryFinallyStatement) |
| 1088 DONT_OPTIMIZE_NODE(DebuggerStatement) | 1089 DONT_OPTIMIZE_NODE(DebuggerStatement) |
| 1089 DONT_OPTIMIZE_NODE(SharedFunctionInfoLiteral) | 1090 DONT_OPTIMIZE_NODE(SharedFunctionInfoLiteral) |
| 1090 | 1091 |
| 1091 DONT_INLINE_NODE(ArrayLiteral) // TODO(1322): Allow materialized literals. | 1092 DONT_INLINE_NODE(ArrayLiteral) // TODO(1322): Allow materialized literals. |
| 1092 DONT_INLINE_NODE(FunctionLiteral) | |
| 1093 | 1093 |
| 1094 DONT_SELFOPTIMIZE_NODE(DoWhileStatement) | 1094 DONT_SELFOPTIMIZE_NODE(DoWhileStatement) |
| 1095 DONT_SELFOPTIMIZE_NODE(WhileStatement) | 1095 DONT_SELFOPTIMIZE_NODE(WhileStatement) |
| 1096 DONT_SELFOPTIMIZE_NODE(ForStatement) | 1096 DONT_SELFOPTIMIZE_NODE(ForStatement) |
| 1097 DONT_SELFOPTIMIZE_NODE(ForInStatement) | 1097 DONT_SELFOPTIMIZE_NODE(ForInStatement) |
| 1098 | 1098 |
| 1099 DONT_CACHE_NODE(ModuleLiteral) | 1099 DONT_CACHE_NODE(ModuleLiteral) |
| 1100 | 1100 |
| 1101 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) { | 1101 void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) { |
| 1102 increase_node_count(); | 1102 increase_node_count(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1132 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); | 1132 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); |
| 1133 str = arr; | 1133 str = arr; |
| 1134 } else { | 1134 } else { |
| 1135 str = DoubleToCString(handle_->Number(), buffer); | 1135 str = DoubleToCString(handle_->Number(), buffer); |
| 1136 } | 1136 } |
| 1137 return FACTORY->NewStringFromAscii(CStrVector(str)); | 1137 return FACTORY->NewStringFromAscii(CStrVector(str)); |
| 1138 } | 1138 } |
| 1139 | 1139 |
| 1140 | 1140 |
| 1141 } } // namespace v8::internal | 1141 } } // namespace v8::internal |
| OLD | NEW |