Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: src/compiler/js-call-reducer.h

Issue 2956843002: [turbofan] Replace uninitialized JSCall nodes with SOFT deopt. (Closed)
Patch Set: Several improvements. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_COMPILER_JS_CALL_REDUCER_H_ 5 #ifndef V8_COMPILER_JS_CALL_REDUCER_H_
6 #define V8_COMPILER_JS_CALL_REDUCER_H_ 6 #define V8_COMPILER_JS_CALL_REDUCER_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/compiler/graph-reducer.h" 9 #include "src/compiler/graph-reducer.h"
10 10
(...skipping 10 matching lines...) Expand all
21 class CallFrequency; 21 class CallFrequency;
22 class CommonOperatorBuilder; 22 class CommonOperatorBuilder;
23 class JSGraph; 23 class JSGraph;
24 class JSOperatorBuilder; 24 class JSOperatorBuilder;
25 class SimplifiedOperatorBuilder; 25 class SimplifiedOperatorBuilder;
26 26
27 // Performs strength reduction on {JSConstruct} and {JSCall} nodes, 27 // Performs strength reduction on {JSConstruct} and {JSCall} nodes,
28 // which might allow inlining or other optimizations to be performed afterwards. 28 // which might allow inlining or other optimizations to be performed afterwards.
29 class JSCallReducer final : public AdvancedReducer { 29 class JSCallReducer final : public AdvancedReducer {
30 public: 30 public:
31 JSCallReducer(Editor* editor, JSGraph* jsgraph, 31 // Flags that control the mode of operation.
32 enum Flag { kNoFlags = 0u, kBailoutOnUninitialized = 1u << 0 };
33 typedef base::Flags<Flag> Flags;
34
35 JSCallReducer(Editor* editor, JSGraph* jsgraph, Flags flags,
32 Handle<Context> native_context, 36 Handle<Context> native_context,
33 CompilationDependencies* dependencies) 37 CompilationDependencies* dependencies)
34 : AdvancedReducer(editor), 38 : AdvancedReducer(editor),
35 jsgraph_(jsgraph), 39 jsgraph_(jsgraph),
40 flags_(flags),
36 native_context_(native_context), 41 native_context_(native_context),
37 dependencies_(dependencies) {} 42 dependencies_(dependencies) {}
38 43
39 Reduction Reduce(Node* node) final; 44 Reduction Reduce(Node* node) final;
40 45
41 private: 46 private:
42 Reduction ReduceArrayConstructor(Node* node); 47 Reduction ReduceArrayConstructor(Node* node);
43 Reduction ReduceBooleanConstructor(Node* node); 48 Reduction ReduceBooleanConstructor(Node* node);
44 Reduction ReduceCallApiFunction( 49 Reduction ReduceCallApiFunction(
45 Node* node, Handle<FunctionTemplateInfo> function_template_info); 50 Node* node, Handle<FunctionTemplateInfo> function_template_info);
(...skipping 21 matching lines...) Expand all
67 72
68 Graph* graph() const; 73 Graph* graph() const;
69 JSGraph* jsgraph() const { return jsgraph_; } 74 JSGraph* jsgraph() const { return jsgraph_; }
70 Isolate* isolate() const; 75 Isolate* isolate() const;
71 Factory* factory() const; 76 Factory* factory() const;
72 Handle<Context> native_context() const { return native_context_; } 77 Handle<Context> native_context() const { return native_context_; }
73 Handle<JSGlobalProxy> global_proxy() const; 78 Handle<JSGlobalProxy> global_proxy() const;
74 CommonOperatorBuilder* common() const; 79 CommonOperatorBuilder* common() const;
75 JSOperatorBuilder* javascript() const; 80 JSOperatorBuilder* javascript() const;
76 SimplifiedOperatorBuilder* simplified() const; 81 SimplifiedOperatorBuilder* simplified() const;
82 Flags flags() const { return flags_; }
77 CompilationDependencies* dependencies() const { return dependencies_; } 83 CompilationDependencies* dependencies() const { return dependencies_; }
78 84
79 JSGraph* const jsgraph_; 85 JSGraph* const jsgraph_;
86 Flags const flags_;
80 Handle<Context> const native_context_; 87 Handle<Context> const native_context_;
81 CompilationDependencies* const dependencies_; 88 CompilationDependencies* const dependencies_;
82 }; 89 };
83 90
84 } // namespace compiler 91 } // namespace compiler
85 } // namespace internal 92 } // namespace internal
86 } // namespace v8 93 } // namespace v8
87 94
88 #endif // V8_COMPILER_JS_CALL_REDUCER_H_ 95 #endif // V8_COMPILER_JS_CALL_REDUCER_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698