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-global-specialization.h" | 5 #include "src/compiler/js-global-specialization.h" |
6 | 6 |
7 #include "src/compilation-dependencies.h" | 7 #include "src/compilation-dependencies.h" |
8 #include "src/compiler/access-builder.h" | 8 #include "src/compiler/access-builder.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/js-operator.h" | 10 #include "src/compiler/js-operator.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 }; | 23 }; |
24 | 24 |
25 | 25 |
26 JSGlobalSpecialization::JSGlobalSpecialization( | 26 JSGlobalSpecialization::JSGlobalSpecialization( |
27 Editor* editor, JSGraph* jsgraph, Flags flags, | 27 Editor* editor, JSGraph* jsgraph, Flags flags, |
28 Handle<GlobalObject> global_object, CompilationDependencies* dependencies) | 28 Handle<GlobalObject> global_object, CompilationDependencies* dependencies) |
29 : AdvancedReducer(editor), | 29 : AdvancedReducer(editor), |
30 jsgraph_(jsgraph), | 30 jsgraph_(jsgraph), |
31 flags_(flags), | 31 flags_(flags), |
32 global_object_(global_object), | 32 global_object_(global_object), |
33 dependencies_(dependencies), | 33 dependencies_(dependencies) {} |
34 simplified_(graph()->zone()) {} | |
35 | 34 |
36 | 35 |
37 Reduction JSGlobalSpecialization::Reduce(Node* node) { | 36 Reduction JSGlobalSpecialization::Reduce(Node* node) { |
38 switch (node->opcode()) { | 37 switch (node->opcode()) { |
39 case IrOpcode::kJSLoadGlobal: | 38 case IrOpcode::kJSLoadGlobal: |
40 return ReduceJSLoadGlobal(node); | 39 return ReduceJSLoadGlobal(node); |
41 case IrOpcode::kJSStoreGlobal: | 40 case IrOpcode::kJSStoreGlobal: |
42 return ReduceJSStoreGlobal(node); | 41 return ReduceJSStoreGlobal(node); |
43 default: | 42 default: |
44 break; | 43 break; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 269 |
271 CommonOperatorBuilder* JSGlobalSpecialization::common() const { | 270 CommonOperatorBuilder* JSGlobalSpecialization::common() const { |
272 return jsgraph()->common(); | 271 return jsgraph()->common(); |
273 } | 272 } |
274 | 273 |
275 | 274 |
276 JSOperatorBuilder* JSGlobalSpecialization::javascript() const { | 275 JSOperatorBuilder* JSGlobalSpecialization::javascript() const { |
277 return jsgraph()->javascript(); | 276 return jsgraph()->javascript(); |
278 } | 277 } |
279 | 278 |
| 279 |
| 280 SimplifiedOperatorBuilder* JSGlobalSpecialization::simplified() const { |
| 281 return jsgraph()->simplified(); |
| 282 } |
| 283 |
280 } // namespace compiler | 284 } // namespace compiler |
281 } // namespace internal | 285 } // namespace internal |
282 } // namespace v8 | 286 } // namespace v8 |
OLD | NEW |