| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_CREATE_LOWERING_H_ | 5 #ifndef V8_COMPILER_JS_CREATE_LOWERING_H_ |
| 6 #define V8_COMPILER_JS_CREATE_LOWERING_H_ | 6 #define V8_COMPILER_JS_CREATE_LOWERING_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 13 matching lines...) Expand all Loading... |
| 24 class JSOperatorBuilder; | 24 class JSOperatorBuilder; |
| 25 class MachineOperatorBuilder; | 25 class MachineOperatorBuilder; |
| 26 class SimplifiedOperatorBuilder; | 26 class SimplifiedOperatorBuilder; |
| 27 | 27 |
| 28 | 28 |
| 29 // Lowers JSCreate-level operators to fast (inline) allocations. | 29 // Lowers JSCreate-level operators to fast (inline) allocations. |
| 30 class JSCreateLowering final : public AdvancedReducer { | 30 class JSCreateLowering final : public AdvancedReducer { |
| 31 public: | 31 public: |
| 32 JSCreateLowering(Editor* editor, CompilationDependencies* dependencies, | 32 JSCreateLowering(Editor* editor, CompilationDependencies* dependencies, |
| 33 JSGraph* jsgraph, MaybeHandle<LiteralsArray> literals_array, | 33 JSGraph* jsgraph, MaybeHandle<LiteralsArray> literals_array, |
| 34 MaybeHandle<Context> native_context, Zone* zone) | 34 Handle<Context> native_context, Zone* zone) |
| 35 : AdvancedReducer(editor), | 35 : AdvancedReducer(editor), |
| 36 dependencies_(dependencies), | 36 dependencies_(dependencies), |
| 37 jsgraph_(jsgraph), | 37 jsgraph_(jsgraph), |
| 38 literals_array_(literals_array), | 38 literals_array_(literals_array), |
| 39 native_context_(native_context), | 39 native_context_(native_context), |
| 40 zone_(zone) {} | 40 zone_(zone) {} |
| 41 ~JSCreateLowering() final {} | 41 ~JSCreateLowering() final {} |
| 42 | 42 |
| 43 Reduction Reduce(Node* node) final; | 43 Reduction Reduce(Node* node) final; |
| 44 | 44 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 70 AllocationSiteUsageContext* site_context); | 70 AllocationSiteUsageContext* site_context); |
| 71 Node* AllocateFastLiteralElements(Node* effect, Node* control, | 71 Node* AllocateFastLiteralElements(Node* effect, Node* control, |
| 72 Handle<JSObject> boilerplate, | 72 Handle<JSObject> boilerplate, |
| 73 PretenureFlag pretenure, | 73 PretenureFlag pretenure, |
| 74 AllocationSiteUsageContext* site_context); | 74 AllocationSiteUsageContext* site_context); |
| 75 | 75 |
| 76 Reduction ReduceNewArrayToStubCall(Node* node, Handle<AllocationSite> site); | 76 Reduction ReduceNewArrayToStubCall(Node* node, Handle<AllocationSite> site); |
| 77 | 77 |
| 78 // Infers the LiteralsArray to use for a given {node}. | 78 // Infers the LiteralsArray to use for a given {node}. |
| 79 MaybeHandle<LiteralsArray> GetSpecializationLiterals(Node* node); | 79 MaybeHandle<LiteralsArray> GetSpecializationLiterals(Node* node); |
| 80 // Infers the native context to use for a given {node}. | |
| 81 MaybeHandle<Context> GetSpecializationNativeContext(Node* node); | |
| 82 | 80 |
| 83 Factory* factory() const; | 81 Factory* factory() const; |
| 84 Graph* graph() const; | 82 Graph* graph() const; |
| 85 JSGraph* jsgraph() const { return jsgraph_; } | 83 JSGraph* jsgraph() const { return jsgraph_; } |
| 86 Isolate* isolate() const; | 84 Isolate* isolate() const; |
| 85 Handle<Context> native_context() const { return native_context_; } |
| 87 JSOperatorBuilder* javascript() const; | 86 JSOperatorBuilder* javascript() const; |
| 88 CommonOperatorBuilder* common() const; | 87 CommonOperatorBuilder* common() const; |
| 89 SimplifiedOperatorBuilder* simplified() const; | 88 SimplifiedOperatorBuilder* simplified() const; |
| 90 MachineOperatorBuilder* machine() const; | 89 MachineOperatorBuilder* machine() const; |
| 91 CompilationDependencies* dependencies() const { return dependencies_; } | 90 CompilationDependencies* dependencies() const { return dependencies_; } |
| 92 Zone* zone() const { return zone_; } | 91 Zone* zone() const { return zone_; } |
| 93 | 92 |
| 94 CompilationDependencies* const dependencies_; | 93 CompilationDependencies* const dependencies_; |
| 95 JSGraph* const jsgraph_; | 94 JSGraph* const jsgraph_; |
| 96 MaybeHandle<LiteralsArray> const literals_array_; | 95 MaybeHandle<LiteralsArray> const literals_array_; |
| 97 MaybeHandle<Context> const native_context_; | 96 Handle<Context> const native_context_; |
| 98 Zone* const zone_; | 97 Zone* const zone_; |
| 99 }; | 98 }; |
| 100 | 99 |
| 101 } // namespace compiler | 100 } // namespace compiler |
| 102 } // namespace internal | 101 } // namespace internal |
| 103 } // namespace v8 | 102 } // namespace v8 |
| 104 | 103 |
| 105 #endif // V8_COMPILER_JS_CREATE_LOWERING_H_ | 104 #endif // V8_COMPILER_JS_CREATE_LOWERING_H_ |
| OLD | NEW |