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

Side by Side Diff: src/compiler/js-native-context-specialization.h

Issue 2198473002: [turbofan] Add support for accessor inlining. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@TurboFan_CheckMaps
Patch Set: Fixes Created 4 years, 4 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/frame-states.cc ('k') | src/compiler/js-native-context-specialization.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_NATIVE_CONTEXT_SPECIALIZATION_H_ 5 #ifndef V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_
6 #define V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ 6 #define V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_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 #include "src/deoptimize-reason.h" 10 #include "src/deoptimize-reason.h"
(...skipping 23 matching lines...) Expand all
34 34
35 // Specializes a given JSGraph to a given native context, potentially constant 35 // Specializes a given JSGraph to a given native context, potentially constant
36 // folding some {LoadGlobal} nodes or strength reducing some {StoreGlobal} 36 // folding some {LoadGlobal} nodes or strength reducing some {StoreGlobal}
37 // nodes. And also specializes {LoadNamed} and {StoreNamed} nodes according 37 // nodes. And also specializes {LoadNamed} and {StoreNamed} nodes according
38 // to type feedback (if available). 38 // to type feedback (if available).
39 class JSNativeContextSpecialization final : public AdvancedReducer { 39 class JSNativeContextSpecialization final : public AdvancedReducer {
40 public: 40 public:
41 // Flags that control the mode of operation. 41 // Flags that control the mode of operation.
42 enum Flag { 42 enum Flag {
43 kNoFlags = 0u, 43 kNoFlags = 0u,
44 kBailoutOnUninitialized = 1u << 0, 44 kAccessorInliningEnabled = 1u << 0,
45 kDeoptimizationEnabled = 1u << 1, 45 kBailoutOnUninitialized = 1u << 1,
46 kDeoptimizationEnabled = 1u << 2,
46 }; 47 };
47 typedef base::Flags<Flag> Flags; 48 typedef base::Flags<Flag> Flags;
48 49
49 JSNativeContextSpecialization(Editor* editor, JSGraph* jsgraph, Flags flags, 50 JSNativeContextSpecialization(Editor* editor, JSGraph* jsgraph, Flags flags,
50 MaybeHandle<Context> native_context, 51 MaybeHandle<Context> native_context,
51 CompilationDependencies* dependencies, 52 CompilationDependencies* dependencies,
52 Zone* zone); 53 Zone* zone);
53 54
54 Reduction Reduce(Node* node) final; 55 Reduction Reduce(Node* node) final;
55 56
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 Node* control() const { return control_; } 94 Node* control() const { return control_; }
94 95
95 private: 96 private:
96 Node* const value_; 97 Node* const value_;
97 Node* const effect_; 98 Node* const effect_;
98 Node* const control_; 99 Node* const control_;
99 }; 100 };
100 101
101 // Construct the appropriate subgraph for property access. 102 // Construct the appropriate subgraph for property access.
102 ValueEffectControl BuildPropertyAccess(Node* receiver, Node* value, 103 ValueEffectControl BuildPropertyAccess(Node* receiver, Node* value,
104 Node* context, Node* frame_state,
103 Node* effect, Node* control, 105 Node* effect, Node* control,
104 Handle<Name> name, 106 Handle<Name> name,
105 Handle<Context> native_context, 107 Handle<Context> native_context,
106 PropertyAccessInfo const& access_info, 108 PropertyAccessInfo const& access_info,
107 AccessMode access_mode); 109 AccessMode access_mode);
108 110
109 // Construct the appropriate subgraph for element access. 111 // Construct the appropriate subgraph for element access.
110 ValueEffectControl BuildElementAccess(Node* receiver, Node* index, 112 ValueEffectControl BuildElementAccess(Node* receiver, Node* index,
111 Node* value, Node* effect, 113 Node* value, Node* effect,
112 Node* control, 114 Node* control,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); 169 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization);
168 }; 170 };
169 171
170 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) 172 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags)
171 173
172 } // namespace compiler 174 } // namespace compiler
173 } // namespace internal 175 } // namespace internal
174 } // namespace v8 176 } // namespace v8
175 177
176 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ 178 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_
OLDNEW
« no previous file with comments | « src/compiler/frame-states.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698