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

Side by Side Diff: src/fast-accessor-assembler.h

Issue 2175233003: Replace SmartPointer<T> with unique_ptr<T> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@smart-array
Patch Set: Created 4 years, 5 months 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
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_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 <vector> 10 #include <vector>
10 11
11 #include "include/v8-experimental.h" 12 #include "include/v8-experimental.h"
12 #include "src/base/macros.h" 13 #include "src/base/macros.h"
13 #include "src/base/smart-pointers.h"
14 #include "src/handles.h" 14 #include "src/handles.h"
15 15
16 // For CodeStubAssembler::Label. (We cannot forward-declare inner classes.) 16 // For CodeStubAssembler::Label. (We cannot forward-declare inner classes.)
17 #include "src/code-stub-assembler.h" 17 #include "src/code-stub-assembler.h"
18 18
19 namespace v8 { 19 namespace v8 {
20 namespace internal { 20 namespace internal {
21 21
22 class Code; 22 class Code;
23 class Isolate; 23 class Isolate;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 LabelId FromRaw(CodeStubAssembler::Label* label); 76 LabelId FromRaw(CodeStubAssembler::Label* label);
77 compiler::Node* FromId(ValueId value) const; 77 compiler::Node* FromId(ValueId value) const;
78 CodeStubAssembler::Label* FromId(LabelId value) const; 78 CodeStubAssembler::Label* FromId(LabelId value) const;
79 79
80 void Clear(); 80 void Clear();
81 Zone* zone() { return &zone_; } 81 Zone* zone() { return &zone_; }
82 Isolate* isolate() const { return isolate_; } 82 Isolate* isolate() const { return isolate_; }
83 83
84 Zone zone_; 84 Zone zone_;
85 Isolate* isolate_; 85 Isolate* isolate_;
86 base::SmartPointer<CodeStubAssembler> assembler_; 86 std::unique_ptr<CodeStubAssembler> assembler_;
87 87
88 // To prevent exposing the RMA internals to the outside world, we'll map 88 // To prevent exposing the RMA internals to the outside world, we'll map
89 // Node + Label pointers integers wrapped in ValueId and LabelId instances. 89 // Node + Label pointers integers wrapped in ValueId and LabelId instances.
90 // These vectors maintain this mapping. 90 // These vectors maintain this mapping.
91 std::vector<compiler::Node*> nodes_; 91 std::vector<compiler::Node*> nodes_;
92 std::vector<CodeStubAssembler::Label*> labels_; 92 std::vector<CodeStubAssembler::Label*> labels_;
93 93
94 // Remember the current state for easy error checking. (We prefer to be 94 // Remember the current state for easy error checking. (We prefer to be
95 // strict as this class will be exposed at the API.) 95 // strict as this class will be exposed at the API.)
96 enum { kBuilding, kBuilt, kError } state_; 96 enum { kBuilding, kBuilt, kError } state_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(FastAccessorAssembler); 98 DISALLOW_COPY_AND_ASSIGN(FastAccessorAssembler);
99 }; 99 };
100 100
101 } // namespace internal 101 } // namespace internal
102 } // namespace v8 102 } // namespace v8
103 103
104 #endif // V8_FAST_ACCESSOR_ASSEMBLER_H_ 104 #endif // V8_FAST_ACCESSOR_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698