OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/ast.h" | 5 #include "src/ast.h" |
6 | 6 |
7 #include <cmath> // For isfinite. | 7 #include <cmath> // For isfinite. |
8 #include "src/builtins.h" | 8 #include "src/builtins.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/contexts.h" | 10 #include "src/contexts.h" |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 // We currently do not optimize any modules. | 1083 // We currently do not optimize any modules. |
1084 DONT_OPTIMIZE_NODE(ModuleDeclaration) | 1084 DONT_OPTIMIZE_NODE(ModuleDeclaration) |
1085 DONT_OPTIMIZE_NODE(ImportDeclaration) | 1085 DONT_OPTIMIZE_NODE(ImportDeclaration) |
1086 DONT_OPTIMIZE_NODE(ExportDeclaration) | 1086 DONT_OPTIMIZE_NODE(ExportDeclaration) |
1087 DONT_OPTIMIZE_NODE(ModuleVariable) | 1087 DONT_OPTIMIZE_NODE(ModuleVariable) |
1088 DONT_OPTIMIZE_NODE(ModulePath) | 1088 DONT_OPTIMIZE_NODE(ModulePath) |
1089 DONT_OPTIMIZE_NODE(ModuleUrl) | 1089 DONT_OPTIMIZE_NODE(ModuleUrl) |
1090 DONT_OPTIMIZE_NODE(ModuleStatement) | 1090 DONT_OPTIMIZE_NODE(ModuleStatement) |
1091 DONT_OPTIMIZE_NODE(WithStatement) | 1091 DONT_OPTIMIZE_NODE(WithStatement) |
1092 DONT_OPTIMIZE_NODE(DebuggerStatement) | 1092 DONT_OPTIMIZE_NODE(DebuggerStatement) |
1093 DONT_OPTIMIZE_NODE(ClassLiteral) | |
1094 DONT_OPTIMIZE_NODE(NativeFunctionLiteral) | 1093 DONT_OPTIMIZE_NODE(NativeFunctionLiteral) |
1095 DONT_OPTIMIZE_NODE(SuperReference) | |
1096 | 1094 |
1097 DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(Yield) | 1095 DONT_OPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(Yield) |
1098 | 1096 |
1099 // TODO(turbofan): Remove the dont_turbofan_reason once this list is empty. | 1097 // TODO(turbofan): Remove the dont_turbofan_reason once this list is empty. |
| 1098 // This list must be kept in sync with Pipeline::GenerateCode. |
1100 DONT_TURBOFAN_NODE(ForOfStatement) | 1099 DONT_TURBOFAN_NODE(ForOfStatement) |
1101 DONT_TURBOFAN_NODE(TryCatchStatement) | 1100 DONT_TURBOFAN_NODE(TryCatchStatement) |
1102 DONT_TURBOFAN_NODE(TryFinallyStatement) | 1101 DONT_TURBOFAN_NODE(TryFinallyStatement) |
| 1102 DONT_TURBOFAN_NODE(ClassLiteral) |
| 1103 DONT_TURBOFAN_NODE(SuperReference) |
1103 | 1104 |
1104 DONT_SELFOPTIMIZE_NODE(DoWhileStatement) | 1105 DONT_SELFOPTIMIZE_NODE(DoWhileStatement) |
1105 DONT_SELFOPTIMIZE_NODE(WhileStatement) | 1106 DONT_SELFOPTIMIZE_NODE(WhileStatement) |
1106 DONT_SELFOPTIMIZE_NODE(ForStatement) | 1107 DONT_SELFOPTIMIZE_NODE(ForStatement) |
1107 | 1108 |
1108 DONT_SELFOPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(ForInStatement) | 1109 DONT_SELFOPTIMIZE_NODE_WITH_FEEDBACK_SLOTS(ForInStatement) |
1109 | 1110 |
1110 DONT_CACHE_NODE(ModuleLiteral) | 1111 DONT_CACHE_NODE(ModuleLiteral) |
1111 | 1112 |
1112 | 1113 |
(...skipping 22 matching lines...) Expand all Loading... |
1135 // static | 1136 // static |
1136 bool Literal::Match(void* literal1, void* literal2) { | 1137 bool Literal::Match(void* literal1, void* literal2) { |
1137 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 1138 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
1138 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 1139 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
1139 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || | 1140 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || |
1140 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 1141 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
1141 } | 1142 } |
1142 | 1143 |
1143 | 1144 |
1144 } } // namespace v8::internal | 1145 } } // namespace v8::internal |
OLD | NEW |