| 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_; | |
| 102 std::unique_ptr<CodeStubAssembler> assembler_; | 101 std::unique_ptr<CodeStubAssembler> assembler_; |
| 103 | 102 |
| 104 // To prevent exposing the RMA internals to the outside world, we'll map | 103 // To prevent exposing the RMA internals to the outside world, we'll map |
| 105 // Node + Label pointers integers wrapped in ValueId and LabelId instances. | 104 // Node + Label pointers integers wrapped in ValueId and LabelId instances. |
| 106 // These vectors maintain this mapping. | 105 // These vectors maintain this mapping. |
| 107 std::vector<compiler::Node*> nodes_; | 106 std::vector<compiler::Node*> nodes_; |
| 108 std::vector<CodeStubAssembler::Label*> labels_; | 107 std::vector<CodeStubAssembler::Label*> labels_; |
| 109 | 108 |
| 110 // Remember the current state for easy error checking. (We prefer to be | 109 // Remember the current state for easy error checking. (We prefer to be |
| 111 // strict as this class will be exposed at the API.) | 110 // strict as this class will be exposed at the API.) |
| 112 enum { kBuilding, kBuilt, kError } state_; | 111 enum { kBuilding, kBuilt, kError } state_; |
| 113 | 112 |
| 114 DISALLOW_COPY_AND_ASSIGN(FastAccessorAssembler); | 113 DISALLOW_COPY_AND_ASSIGN(FastAccessorAssembler); |
| 115 }; | 114 }; |
| 116 | 115 |
| 117 } // namespace internal | 116 } // namespace internal |
| 118 } // namespace v8 | 117 } // namespace v8 |
| 119 | 118 |
| 120 #endif // V8_FAST_ACCESSOR_ASSEMBLER_H_ | 119 #endif // V8_FAST_ACCESSOR_ASSEMBLER_H_ |
| OLD | NEW |