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

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

Issue 1418213010: [turbofan] Initial support for keyed access to fast JSArrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 5 years, 1 month 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/access-info.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/access-info.h"
9 #include "src/compiler/graph-reducer.h" 10 #include "src/compiler/graph-reducer.h"
10 #include "src/compiler/property-access-info.h"
11 #include "src/compiler/simplified-operator.h" 11 #include "src/compiler/simplified-operator.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 // Forward declarations. 16 // Forward declarations.
17 class CompilationDependencies; 17 class CompilationDependencies;
18 class Factory; 18 class Factory;
19 class FeedbackNexus; 19 class FeedbackNexus;
20 class TypeCache; 20 class TypeCache;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 Reduction ReduceJSLoadProperty(Node* node); 58 Reduction ReduceJSLoadProperty(Node* node);
59 Reduction ReduceJSStoreProperty(Node* node); 59 Reduction ReduceJSStoreProperty(Node* node);
60 60
61 Reduction Replace(Node* node, Node* value, Node* effect = nullptr, 61 Reduction Replace(Node* node, Node* value, Node* effect = nullptr,
62 Node* control = nullptr) { 62 Node* control = nullptr) {
63 ReplaceWithValue(node, value, effect, control); 63 ReplaceWithValue(node, value, effect, control);
64 return Changed(value); 64 return Changed(value);
65 } 65 }
66 Reduction Replace(Node* node, Handle<Object> value); 66 Reduction Replace(Node* node, Handle<Object> value);
67 67
68 Reduction ReduceElementAccess(Node* node, Node* index, Node* value,
69 MapHandleList const& receiver_maps,
70 AccessMode access_mode,
71 LanguageMode language_mode);
68 Reduction ReduceKeyedAccess(Node* node, Node* index, Node* value, 72 Reduction ReduceKeyedAccess(Node* node, Node* index, Node* value,
69 FeedbackNexus const& nexus, 73 FeedbackNexus const& nexus,
70 PropertyAccessMode access_mode, 74 AccessMode access_mode,
71 LanguageMode language_mode); 75 LanguageMode language_mode);
72 Reduction ReduceNamedAccess(Node* node, Node* value, 76 Reduction ReduceNamedAccess(Node* node, Node* value,
73 MapHandleList const& receiver_maps, 77 MapHandleList const& receiver_maps,
74 Handle<Name> name, PropertyAccessMode access_mode, 78 Handle<Name> name, AccessMode access_mode,
75 LanguageMode language_mode, 79 LanguageMode language_mode,
76 Node* index = nullptr); 80 Node* index = nullptr);
77 81
78 struct ScriptContextTableLookupResult; 82 struct ScriptContextTableLookupResult;
79 bool LookupInScriptContextTable(Handle<Name> name, 83 bool LookupInScriptContextTable(Handle<Name> name,
80 ScriptContextTableLookupResult* result); 84 ScriptContextTableLookupResult* result);
81 85
82 // Adds stability dependencies on all prototypes of every class in 86 // Adds stability dependencies on all prototypes of every class in
83 // {receiver_type} up to (and including) the {holder}. 87 // {receiver_type} up to (and including) the {holder}.
84 void AssumePrototypesStable(Type* receiver_type, Handle<JSObject> holder); 88 void AssumePrototypesStable(Type* receiver_type, Handle<JSObject> holder);
85 89
86 Graph* graph() const; 90 Graph* graph() const;
87 JSGraph* jsgraph() const { return jsgraph_; } 91 JSGraph* jsgraph() const { return jsgraph_; }
88 Isolate* isolate() const; 92 Isolate* isolate() const;
89 Factory* factory() const; 93 Factory* factory() const;
90 CommonOperatorBuilder* common() const; 94 CommonOperatorBuilder* common() const;
91 JSOperatorBuilder* javascript() const; 95 JSOperatorBuilder* javascript() const;
92 SimplifiedOperatorBuilder* simplified() const; 96 SimplifiedOperatorBuilder* simplified() const;
93 MachineOperatorBuilder* machine() const; 97 MachineOperatorBuilder* machine() const;
94 Flags flags() const { return flags_; } 98 Flags flags() const { return flags_; }
95 Handle<JSGlobalObject> global_object() const { return global_object_; } 99 Handle<JSGlobalObject> global_object() const { return global_object_; }
96 Handle<Context> native_context() const { return native_context_; } 100 Handle<Context> native_context() const { return native_context_; }
97 CompilationDependencies* dependencies() const { return dependencies_; } 101 CompilationDependencies* dependencies() const { return dependencies_; }
98 Zone* zone() const { return zone_; } 102 Zone* zone() const { return zone_; }
99 PropertyAccessInfoFactory& access_info_factory() { 103 AccessInfoFactory& access_info_factory() { return access_info_factory_; }
100 return access_info_factory_;
101 }
102 104
103 JSGraph* const jsgraph_; 105 JSGraph* const jsgraph_;
104 Flags const flags_; 106 Flags const flags_;
105 Handle<JSGlobalObject> global_object_; 107 Handle<JSGlobalObject> global_object_;
106 Handle<Context> native_context_; 108 Handle<Context> native_context_;
107 CompilationDependencies* const dependencies_; 109 CompilationDependencies* const dependencies_;
108 Zone* const zone_; 110 Zone* const zone_;
109 TypeCache const& type_cache_; 111 TypeCache const& type_cache_;
110 PropertyAccessInfoFactory access_info_factory_; 112 AccessInfoFactory access_info_factory_;
111 113
112 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); 114 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization);
113 }; 115 };
114 116
115 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) 117 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags)
116 118
117 } // namespace compiler 119 } // namespace compiler
118 } // namespace internal 120 } // namespace internal
119 } // namespace v8 121 } // namespace v8
120 122
121 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ 123 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_
OLDNEW
« no previous file with comments | « src/compiler/access-info.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698