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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 REGULAR_NODE(ObjectLiteral) | 1069 REGULAR_NODE(ObjectLiteral) |
1070 REGULAR_NODE(RegExpLiteral) | 1070 REGULAR_NODE(RegExpLiteral) |
1071 REGULAR_NODE(FunctionLiteral) | 1071 REGULAR_NODE(FunctionLiteral) |
1072 REGULAR_NODE(Assignment) | 1072 REGULAR_NODE(Assignment) |
1073 REGULAR_NODE(Throw) | 1073 REGULAR_NODE(Throw) |
1074 REGULAR_NODE(UnaryOperation) | 1074 REGULAR_NODE(UnaryOperation) |
1075 REGULAR_NODE(CountOperation) | 1075 REGULAR_NODE(CountOperation) |
1076 REGULAR_NODE(BinaryOperation) | 1076 REGULAR_NODE(BinaryOperation) |
1077 REGULAR_NODE(CompareOperation) | 1077 REGULAR_NODE(CompareOperation) |
1078 REGULAR_NODE(ThisFunction) | 1078 REGULAR_NODE(ThisFunction) |
| 1079 REGULAR_NODE(TemplateLiteral) |
1079 | 1080 |
1080 REGULAR_NODE_WITH_FEEDBACK_SLOTS(Call) | 1081 REGULAR_NODE_WITH_FEEDBACK_SLOTS(Call) |
1081 REGULAR_NODE_WITH_FEEDBACK_SLOTS(CallNew) | 1082 REGULAR_NODE_WITH_FEEDBACK_SLOTS(CallNew) |
1082 REGULAR_NODE_WITH_FEEDBACK_SLOTS(Property) | 1083 REGULAR_NODE_WITH_FEEDBACK_SLOTS(Property) |
1083 // In theory, for VariableProxy we'd have to add: | 1084 // In theory, for VariableProxy we'd have to add: |
1084 // if (node->var()->IsLookupSlot()) | 1085 // if (node->var()->IsLookupSlot()) |
1085 // set_dont_optimize_reason(kReferenceToAVariableWhichRequiresDynamicLookup); | 1086 // set_dont_optimize_reason(kReferenceToAVariableWhichRequiresDynamicLookup); |
1086 // But node->var() is usually not bound yet at VariableProxy creation time, and | 1087 // But node->var() is usually not bound yet at VariableProxy creation time, and |
1087 // LOOKUP variables only result from constructs that cannot be inlined anyway. | 1088 // LOOKUP variables only result from constructs that cannot be inlined anyway. |
1088 REGULAR_NODE_WITH_FEEDBACK_SLOTS(VariableProxy) | 1089 REGULAR_NODE_WITH_FEEDBACK_SLOTS(VariableProxy) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 // static | 1145 // static |
1145 bool Literal::Match(void* literal1, void* literal2) { | 1146 bool Literal::Match(void* literal1, void* literal2) { |
1146 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 1147 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
1147 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 1148 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
1148 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || | 1149 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || |
1149 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 1150 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
1150 } | 1151 } |
1151 | 1152 |
1152 | 1153 |
1153 } } // namespace v8::internal | 1154 } } // namespace v8::internal |
OLD | NEW |