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_FAST_ACCESSOR_ASSEMBLER_H_ | 5 #ifndef V8_FAST_ACCESSOR_ASSEMBLER_H_ |
6 #define V8_FAST_ACCESSOR_ASSEMBLER_H_ | 6 #define V8_FAST_ACCESSOR_ASSEMBLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 CodeStubAssembler::Label* FromId(LabelId value) const; | 91 CodeStubAssembler::Label* FromId(LabelId value) const; |
92 | 92 |
93 void CheckIsJSObjectOrJump(ValueId value, LabelId label_id); | 93 void CheckIsJSObjectOrJump(ValueId value, LabelId label_id); |
94 | 94 |
95 void Clear(); | 95 void Clear(); |
96 Zone* zone() { return &zone_; } | 96 Zone* zone() { return &zone_; } |
97 Isolate* isolate() const { return isolate_; } | 97 Isolate* isolate() const { return isolate_; } |
98 | 98 |
99 Zone zone_; | 99 Zone zone_; |
100 Isolate* isolate_; | 100 Isolate* isolate_; |
| 101 compiler::CodeAssemblerState assembler_state_; |
101 std::unique_ptr<CodeStubAssembler> assembler_; | 102 std::unique_ptr<CodeStubAssembler> assembler_; |
102 | 103 |
103 // To prevent exposing the RMA internals to the outside world, we'll map | 104 // To prevent exposing the RMA internals to the outside world, we'll map |
104 // Node + Label pointers integers wrapped in ValueId and LabelId instances. | 105 // Node + Label pointers integers wrapped in ValueId and LabelId instances. |
105 // These vectors maintain this mapping. | 106 // These vectors maintain this mapping. |
106 std::vector<compiler::Node*> nodes_; | 107 std::vector<compiler::Node*> nodes_; |
107 std::vector<CodeStubAssembler::Label*> labels_; | 108 std::vector<CodeStubAssembler::Label*> labels_; |
108 | 109 |
109 // Remember the current state for easy error checking. (We prefer to be | 110 // Remember the current state for easy error checking. (We prefer to be |
110 // strict as this class will be exposed at the API.) | 111 // strict as this class will be exposed at the API.) |
111 enum { kBuilding, kBuilt, kError } state_; | 112 enum { kBuilding, kBuilt, kError } state_; |
112 | 113 |
113 DISALLOW_COPY_AND_ASSIGN(FastAccessorAssembler); | 114 DISALLOW_COPY_AND_ASSIGN(FastAccessorAssembler); |
114 }; | 115 }; |
115 | 116 |
116 } // namespace internal | 117 } // namespace internal |
117 } // namespace v8 | 118 } // namespace v8 |
118 | 119 |
119 #endif // V8_FAST_ACCESSOR_ASSEMBLER_H_ | 120 #endif // V8_FAST_ACCESSOR_ASSEMBLER_H_ |
OLD | NEW |