| 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/simplified-operator.h" | 10 #include "src/compiler/simplified-operator.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 Handle<GlobalObject> global_object, | 43 Handle<GlobalObject> global_object, |
| 44 CompilationDependencies* dependencies, | 44 CompilationDependencies* dependencies, |
| 45 Zone* zone); | 45 Zone* zone); |
| 46 | 46 |
| 47 Reduction Reduce(Node* node) final; | 47 Reduction Reduce(Node* node) final; |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 Reduction ReduceJSLoadGlobal(Node* node); | 50 Reduction ReduceJSLoadGlobal(Node* node); |
| 51 Reduction ReduceJSStoreGlobal(Node* node); | 51 Reduction ReduceJSStoreGlobal(Node* node); |
| 52 Reduction ReduceJSLoadNamed(Node* node); | 52 Reduction ReduceJSLoadNamed(Node* node); |
| 53 Reduction ReduceJSStoreNamed(Node* node); |
| 53 | 54 |
| 54 Reduction Replace(Node* node, Node* value, Node* effect = nullptr, | 55 Reduction Replace(Node* node, Node* value, Node* effect = nullptr, |
| 55 Node* control = nullptr) { | 56 Node* control = nullptr) { |
| 56 ReplaceWithValue(node, value, effect, control); | 57 ReplaceWithValue(node, value, effect, control); |
| 57 return Changed(value); | 58 return Changed(value); |
| 58 } | 59 } |
| 59 Reduction Replace(Node* node, Handle<Object> value); | 60 Reduction Replace(Node* node, Handle<Object> value); |
| 60 | 61 |
| 62 enum PropertyAccessMode { kLoad, kStore }; |
| 61 class PropertyAccessInfo; | 63 class PropertyAccessInfo; |
| 62 bool ComputePropertyAccessInfo(Handle<Map> map, Handle<Name> name, | 64 bool ComputePropertyAccessInfo(Handle<Map> map, Handle<Name> name, |
| 65 PropertyAccessMode access_mode, |
| 63 PropertyAccessInfo* access_info); | 66 PropertyAccessInfo* access_info); |
| 64 bool ComputePropertyAccessInfos(MapHandleList const& maps, Handle<Name> name, | 67 bool ComputePropertyAccessInfos(MapHandleList const& maps, Handle<Name> name, |
| 68 PropertyAccessMode access_mode, |
| 65 ZoneVector<PropertyAccessInfo>* access_infos); | 69 ZoneVector<PropertyAccessInfo>* access_infos); |
| 66 | 70 |
| 67 struct ScriptContextTableLookupResult; | 71 struct ScriptContextTableLookupResult; |
| 68 bool LookupInScriptContextTable(Handle<Name> name, | 72 bool LookupInScriptContextTable(Handle<Name> name, |
| 69 ScriptContextTableLookupResult* result); | 73 ScriptContextTableLookupResult* result); |
| 70 | 74 |
| 71 Graph* graph() const; | 75 Graph* graph() const; |
| 72 JSGraph* jsgraph() const { return jsgraph_; } | 76 JSGraph* jsgraph() const { return jsgraph_; } |
| 73 Isolate* isolate() const; | 77 Isolate* isolate() const; |
| 74 Factory* factory() const; | 78 Factory* factory() const; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 90 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); | 94 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); |
| 91 }; | 95 }; |
| 92 | 96 |
| 93 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) | 97 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) |
| 94 | 98 |
| 95 } // namespace compiler | 99 } // namespace compiler |
| 96 } // namespace internal | 100 } // namespace internal |
| 97 } // namespace v8 | 101 } // namespace v8 |
| 98 | 102 |
| 99 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 103 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
| OLD | NEW |