OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/adapters.h" | 10 #include "src/base/adapters.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 info()->isolate(), instruction_zone(), instruction_blocks); | 267 info()->isolate(), instruction_zone(), instruction_blocks); |
268 } | 268 } |
269 | 269 |
270 void InitializeRegisterAllocationData(const RegisterConfiguration* config, | 270 void InitializeRegisterAllocationData(const RegisterConfiguration* config, |
271 CallDescriptor* descriptor, | 271 CallDescriptor* descriptor, |
272 const char* debug_name) { | 272 const char* debug_name) { |
273 DCHECK(frame_ == nullptr); | 273 DCHECK(frame_ == nullptr); |
274 DCHECK(register_allocation_data_ == nullptr); | 274 DCHECK(register_allocation_data_ == nullptr); |
275 int fixed_frame_size = 0; | 275 int fixed_frame_size = 0; |
276 if (descriptor != nullptr) { | 276 if (descriptor != nullptr) { |
277 fixed_frame_size = (descriptor->kind() == CallDescriptor::kCallAddress) | 277 fixed_frame_size = (descriptor->IsCFunctionCall()) |
278 ? StandardFrameConstants::kFixedSlotCountAboveFp + | 278 ? StandardFrameConstants::kFixedSlotCountAboveFp + |
279 StandardFrameConstants::kCPSlotCount | 279 StandardFrameConstants::kCPSlotCount |
280 : StandardFrameConstants::kFixedSlotCount; | 280 : StandardFrameConstants::kFixedSlotCount; |
281 } | 281 } |
282 frame_ = new (instruction_zone()) Frame(fixed_frame_size); | 282 frame_ = new (instruction_zone()) Frame(fixed_frame_size, descriptor); |
283 register_allocation_data_ = new (register_allocation_zone()) | 283 register_allocation_data_ = new (register_allocation_zone()) |
284 RegisterAllocationData(config, register_allocation_zone(), frame(), | 284 RegisterAllocationData(config, register_allocation_zone(), frame(), |
285 sequence(), debug_name); | 285 sequence(), debug_name); |
286 } | 286 } |
287 | 287 |
288 private: | 288 private: |
289 Isolate* isolate_; | 289 Isolate* isolate_; |
290 CompilationInfo* info_; | 290 CompilationInfo* info_; |
291 Zone* outer_zone_; | 291 Zone* outer_zone_; |
292 ZonePool* const zone_pool_; | 292 ZonePool* const zone_pool_; |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 tcf << AsC1VRegisterAllocationData("CodeGen", | 1426 tcf << AsC1VRegisterAllocationData("CodeGen", |
1427 data->register_allocation_data()); | 1427 data->register_allocation_data()); |
1428 } | 1428 } |
1429 | 1429 |
1430 data->DeleteRegisterAllocationZone(); | 1430 data->DeleteRegisterAllocationZone(); |
1431 } | 1431 } |
1432 | 1432 |
1433 } // namespace compiler | 1433 } // namespace compiler |
1434 } // namespace internal | 1434 } // namespace internal |
1435 } // namespace v8 | 1435 } // namespace v8 |
OLD | NEW |