OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_ | 5 #ifndef V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_ |
6 #define V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_ | 6 #define V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_ |
7 | 7 |
8 #include "src/compiler/graph-reducer.h" | 8 #include "src/compiler/graph-reducer.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 12 matching lines...) Expand all Loading... |
23 JSContextSpecialization(Editor* editor, JSGraph* jsgraph, | 23 JSContextSpecialization(Editor* editor, JSGraph* jsgraph, |
24 MaybeHandle<Context> context) | 24 MaybeHandle<Context> context) |
25 : AdvancedReducer(editor), jsgraph_(jsgraph), context_(context) {} | 25 : AdvancedReducer(editor), jsgraph_(jsgraph), context_(context) {} |
26 | 26 |
27 Reduction Reduce(Node* node) final; | 27 Reduction Reduce(Node* node) final; |
28 | 28 |
29 private: | 29 private: |
30 Reduction ReduceJSLoadContext(Node* node); | 30 Reduction ReduceJSLoadContext(Node* node); |
31 Reduction ReduceJSStoreContext(Node* node); | 31 Reduction ReduceJSStoreContext(Node* node); |
32 | 32 |
33 // Returns the {Context} to specialize {node} to (if any). | 33 Reduction SimplifyJSStoreContext(Node* node, Node* new_context, |
34 MaybeHandle<Context> GetSpecializationContext(Node* node); | 34 size_t new_depth); |
| 35 Reduction SimplifyJSLoadContext(Node* node, Node* new_context, |
| 36 size_t new_depth); |
35 | 37 |
36 Isolate* isolate() const; | 38 Isolate* isolate() const; |
37 JSOperatorBuilder* javascript() const; | 39 JSOperatorBuilder* javascript() const; |
38 JSGraph* jsgraph() const { return jsgraph_; } | 40 JSGraph* jsgraph() const { return jsgraph_; } |
39 MaybeHandle<Context> context() const { return context_; } | 41 MaybeHandle<Context> context() const { return context_; } |
40 | 42 |
41 JSGraph* const jsgraph_; | 43 JSGraph* const jsgraph_; |
42 MaybeHandle<Context> context_; | 44 MaybeHandle<Context> context_; |
43 | 45 |
44 DISALLOW_COPY_AND_ASSIGN(JSContextSpecialization); | 46 DISALLOW_COPY_AND_ASSIGN(JSContextSpecialization); |
45 }; | 47 }; |
46 | 48 |
47 } // namespace compiler | 49 } // namespace compiler |
48 } // namespace internal | 50 } // namespace internal |
49 } // namespace v8 | 51 } // namespace v8 |
50 | 52 |
51 #endif // V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_ | 53 #endif // V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_ |
OLD | NEW |