OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler/js-native-context-specialization.h" | 5 #include "src/compiler/js-native-context-specialization.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 case IrOpcode::kJSLoadContext: | 76 case IrOpcode::kJSLoadContext: |
77 return ReduceJSLoadContext(node); | 77 return ReduceJSLoadContext(node); |
78 case IrOpcode::kJSLoadNamed: | 78 case IrOpcode::kJSLoadNamed: |
79 return ReduceJSLoadNamed(node); | 79 return ReduceJSLoadNamed(node); |
80 case IrOpcode::kJSStoreNamed: | 80 case IrOpcode::kJSStoreNamed: |
81 return ReduceJSStoreNamed(node); | 81 return ReduceJSStoreNamed(node); |
82 case IrOpcode::kJSLoadProperty: | 82 case IrOpcode::kJSLoadProperty: |
83 return ReduceJSLoadProperty(node); | 83 return ReduceJSLoadProperty(node); |
84 case IrOpcode::kJSStoreProperty: | 84 case IrOpcode::kJSStoreProperty: |
85 return ReduceJSStoreProperty(node); | 85 return ReduceJSStoreProperty(node); |
| 86 case IrOpcode::kJSStoreDataPropertyInLiteral: |
| 87 return ReduceJSStoreDataPropertyInLiteral(node); |
86 default: | 88 default: |
87 break; | 89 break; |
88 } | 90 } |
89 return NoChange(); | 91 return NoChange(); |
90 } | 92 } |
91 | 93 |
92 Reduction JSNativeContextSpecialization::ReduceJSInstanceOf(Node* node) { | 94 Reduction JSNativeContextSpecialization::ReduceJSInstanceOf(Node* node) { |
93 DCHECK_EQ(IrOpcode::kJSInstanceOf, node->opcode()); | 95 DCHECK_EQ(IrOpcode::kJSInstanceOf, node->opcode()); |
94 Node* object = NodeProperties::GetValueInput(node, 0); | 96 Node* object = NodeProperties::GetValueInput(node, 0); |
95 Node* constructor = NodeProperties::GetValueInput(node, 1); | 97 Node* constructor = NodeProperties::GetValueInput(node, 1); |
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 vector_node, context, frame_state, effect, control}; | 1247 vector_node, context, frame_state, effect, control}; |
1246 | 1248 |
1247 value = effect = control = | 1249 value = effect = control = |
1248 graph()->NewNode(common()->Call(desc), arraysize(inputs), inputs); | 1250 graph()->NewNode(common()->Call(desc), arraysize(inputs), inputs); |
1249 control = graph()->NewNode(common()->IfSuccess(), control); | 1251 control = graph()->NewNode(common()->IfSuccess(), control); |
1250 } | 1252 } |
1251 | 1253 |
1252 return ValueEffectControl(value, effect, control); | 1254 return ValueEffectControl(value, effect, control); |
1253 } | 1255 } |
1254 | 1256 |
| 1257 Reduction JSNativeContextSpecialization::ReduceJSStoreDataPropertyInLiteral( |
| 1258 Node* node) { |
| 1259 // TODO(franzih): Use feedback |
| 1260 return NoChange(); |
| 1261 } |
| 1262 |
1255 namespace { | 1263 namespace { |
1256 | 1264 |
1257 ExternalArrayType GetArrayTypeFromElementsKind(ElementsKind kind) { | 1265 ExternalArrayType GetArrayTypeFromElementsKind(ElementsKind kind) { |
1258 switch (kind) { | 1266 switch (kind) { |
1259 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ | 1267 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ |
1260 case TYPE##_ELEMENTS: \ | 1268 case TYPE##_ELEMENTS: \ |
1261 return kExternal##Type##Array; | 1269 return kExternal##Type##Array; |
1262 TYPED_ARRAYS(TYPED_ARRAY_CASE) | 1270 TYPED_ARRAYS(TYPED_ARRAY_CASE) |
1263 #undef TYPED_ARRAY_CASE | 1271 #undef TYPED_ARRAY_CASE |
1264 default: | 1272 default: |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 return jsgraph()->javascript(); | 1837 return jsgraph()->javascript(); |
1830 } | 1838 } |
1831 | 1839 |
1832 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { | 1840 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { |
1833 return jsgraph()->simplified(); | 1841 return jsgraph()->simplified(); |
1834 } | 1842 } |
1835 | 1843 |
1836 } // namespace compiler | 1844 } // namespace compiler |
1837 } // namespace internal | 1845 } // namespace internal |
1838 } // namespace v8 | 1846 } // namespace v8 |
OLD | NEW |