OLD | NEW |
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/compiler/property-access-info.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 TypeCache; | 20 class TypeCache; |
20 | 21 |
21 | 22 |
22 namespace compiler { | 23 namespace compiler { |
23 | 24 |
24 // Forward declarations. | 25 // Forward declarations. |
25 class CommonOperatorBuilder; | 26 class CommonOperatorBuilder; |
26 class JSGraph; | 27 class JSGraph; |
27 class JSOperatorBuilder; | 28 class JSOperatorBuilder; |
28 class MachineOperatorBuilder; | 29 class MachineOperatorBuilder; |
(...skipping 18 matching lines...) Expand all Loading... |
47 Zone* zone); | 48 Zone* zone); |
48 | 49 |
49 Reduction Reduce(Node* node) final; | 50 Reduction Reduce(Node* node) final; |
50 | 51 |
51 private: | 52 private: |
52 Reduction ReduceJSCallFunction(Node* node); | 53 Reduction ReduceJSCallFunction(Node* node); |
53 Reduction ReduceJSLoadGlobal(Node* node); | 54 Reduction ReduceJSLoadGlobal(Node* node); |
54 Reduction ReduceJSStoreGlobal(Node* node); | 55 Reduction ReduceJSStoreGlobal(Node* node); |
55 Reduction ReduceJSLoadNamed(Node* node); | 56 Reduction ReduceJSLoadNamed(Node* node); |
56 Reduction ReduceJSStoreNamed(Node* node); | 57 Reduction ReduceJSStoreNamed(Node* node); |
| 58 Reduction ReduceJSLoadProperty(Node* node); |
| 59 Reduction ReduceJSStoreProperty(Node* node); |
57 | 60 |
58 Reduction Replace(Node* node, Node* value, Node* effect = nullptr, | 61 Reduction Replace(Node* node, Node* value, Node* effect = nullptr, |
59 Node* control = nullptr) { | 62 Node* control = nullptr) { |
60 ReplaceWithValue(node, value, effect, control); | 63 ReplaceWithValue(node, value, effect, control); |
61 return Changed(value); | 64 return Changed(value); |
62 } | 65 } |
63 Reduction Replace(Node* node, Handle<Object> value); | 66 Reduction Replace(Node* node, Handle<Object> value); |
64 | 67 |
| 68 Reduction ReduceKeyedAccess(Node* node, Node* index, Node* value, |
| 69 FeedbackNexus const& nexus, |
| 70 PropertyAccessMode access_mode, |
| 71 LanguageMode language_mode); |
65 Reduction ReduceNamedAccess(Node* node, Node* value, | 72 Reduction ReduceNamedAccess(Node* node, Node* value, |
66 MapHandleList const& receiver_maps, | 73 MapHandleList const& receiver_maps, |
67 Handle<Name> name, PropertyAccessMode access_mode, | 74 Handle<Name> name, PropertyAccessMode access_mode, |
68 LanguageMode language_mode); | 75 LanguageMode language_mode, |
| 76 Node* index = nullptr); |
69 | 77 |
70 struct ScriptContextTableLookupResult; | 78 struct ScriptContextTableLookupResult; |
71 bool LookupInScriptContextTable(Handle<Name> name, | 79 bool LookupInScriptContextTable(Handle<Name> name, |
72 ScriptContextTableLookupResult* result); | 80 ScriptContextTableLookupResult* result); |
73 | 81 |
74 // Adds stability dependencies on all prototypes of every class in | 82 // Adds stability dependencies on all prototypes of every class in |
75 // {receiver_type} up to (and including) the {holder}. | 83 // {receiver_type} up to (and including) the {holder}. |
76 void AssumePrototypesStable(Type* receiver_type, Handle<JSObject> holder); | 84 void AssumePrototypesStable(Type* receiver_type, Handle<JSObject> holder); |
77 | 85 |
78 Graph* graph() const; | 86 Graph* graph() const; |
(...skipping 25 matching lines...) Expand all Loading... |
104 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); | 112 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); |
105 }; | 113 }; |
106 | 114 |
107 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) | 115 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) |
108 | 116 |
109 } // namespace compiler | 117 } // namespace compiler |
110 } // namespace internal | 118 } // namespace internal |
111 } // namespace v8 | 119 } // namespace v8 |
112 | 120 |
113 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 121 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
OLD | NEW |