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 #include "src/compiler/fast-accessor-assembler.h" | 5 #include "src/compiler/fast-accessor-assembler.h" |
6 | 6 |
7 #include "src/base/logging.h" | 7 #include "src/base/logging.h" |
8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/pipeline.h" | 10 #include "src/compiler/pipeline.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 | 169 |
170 MaybeHandle<Code> FastAccessorAssembler::Build() { | 170 MaybeHandle<Code> FastAccessorAssembler::Build() { |
171 CHECK_EQ(kBuilding, state_); | 171 CHECK_EQ(kBuilding, state_); |
172 | 172 |
173 // Cleanup: We no longer need this. | 173 // Cleanup: We no longer need this. |
174 nodes_.clear(); | 174 nodes_.clear(); |
175 labels_.clear(); | 175 labels_.clear(); |
176 | 176 |
177 // Export the schedule and call the compiler. | 177 // Export the schedule and call the compiler. |
178 CompilationInfo info("FastAccessorAssembler", assembler_->isolate(), zone()); | |
179 Schedule* schedule = assembler_->Export(); | 178 Schedule* schedule = assembler_->Export(); |
180 | 179 MaybeHandle<Code> code = Pipeline::GenerateCodeForCodeStub( |
181 // TODO(vogelheim): Pipeline should have a dedicated entry point for this | 180 assembler_->isolate(), assembler_->call_descriptor(), assembler_->graph(), |
182 // assembler. | 181 schedule, Code::STUB, "FastAccessorAssembler"); |
183 MaybeHandle<Code> code = Pipeline::GenerateCodeForTesting( | |
184 &info, assembler_->call_descriptor(), assembler_->graph(), schedule); | |
185 | 182 |
186 // Update state & return. | 183 // Update state & return. |
187 state_ = !code.is_null() ? kBuilt : kError; | 184 state_ = !code.is_null() ? kBuilt : kError; |
188 return code; | 185 return code; |
189 } | 186 } |
190 | 187 |
191 | 188 |
192 FastAccessorAssembler::ValueId FastAccessorAssembler::FromRaw(Node* node) { | 189 FastAccessorAssembler::ValueId FastAccessorAssembler::FromRaw(Node* node) { |
193 nodes_.push_back(node); | 190 nodes_.push_back(node); |
194 ValueId value = {nodes_.size() - 1}; | 191 ValueId value = {nodes_.size() - 1}; |
(...skipping 19 matching lines...) Expand all Loading... |
214 RawMachineLabel* FastAccessorAssembler::FromId(LabelId label) const { | 211 RawMachineLabel* FastAccessorAssembler::FromId(LabelId label) const { |
215 CHECK_LT(label.label_id, labels_.size()); | 212 CHECK_LT(label.label_id, labels_.size()); |
216 CHECK_NOT_NULL(labels_.at(label.label_id)); | 213 CHECK_NOT_NULL(labels_.at(label.label_id)); |
217 return labels_.at(label.label_id); | 214 return labels_.at(label.label_id); |
218 } | 215 } |
219 | 216 |
220 | 217 |
221 } // namespace compiler | 218 } // namespace compiler |
222 } // namespace internal | 219 } // namespace internal |
223 } // namespace v8 | 220 } // namespace v8 |
OLD | NEW |