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

Side by Side Diff: src/compiler/instruction-selector-impl.h

Issue 2177483002: [turbofan] Handle impossible types (Type::None()) in the backend. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix?? 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 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 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/compiler/instruction-selector.h" 9 #include "src/compiler/instruction-selector.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 template <typename FPRegType> 57 template <typename FPRegType>
58 InstructionOperand DefineAsFixed(Node* node, FPRegType reg) { 58 InstructionOperand DefineAsFixed(Node* node, FPRegType reg) {
59 return Define(node, 59 return Define(node,
60 UnallocatedOperand(UnallocatedOperand::FIXED_FP_REGISTER, 60 UnallocatedOperand(UnallocatedOperand::FIXED_FP_REGISTER,
61 reg.code(), GetVReg(node))); 61 reg.code(), GetVReg(node)));
62 } 62 }
63 63
64 InstructionOperand DefineAsConstant(Node* node) { 64 InstructionOperand DefineAsConstant(Node* node) {
65 return DefineAsConstant(node, ToConstant(node));
66 }
67
68 InstructionOperand DefineAsConstant(Node* node, Constant constant) {
65 selector()->MarkAsDefined(node); 69 selector()->MarkAsDefined(node);
66 int virtual_register = GetVReg(node); 70 int virtual_register = GetVReg(node);
67 sequence()->AddConstant(virtual_register, ToConstant(node)); 71 sequence()->AddConstant(virtual_register, constant);
68 return ConstantOperand(virtual_register); 72 return ConstantOperand(virtual_register);
69 } 73 }
70 74
71 InstructionOperand DefineAsLocation(Node* node, LinkageLocation location) { 75 InstructionOperand DefineAsLocation(Node* node, LinkageLocation location) {
72 return Define(node, ToUnallocatedOperand(location, GetVReg(node))); 76 return Define(node, ToUnallocatedOperand(location, GetVReg(node)));
73 } 77 }
74 78
75 InstructionOperand DefineAsDualLocation(Node* node, 79 InstructionOperand DefineAsDualLocation(Node* node,
76 LinkageLocation primary_location, 80 LinkageLocation primary_location,
77 LinkageLocation secondary_location) { 81 LinkageLocation secondary_location) {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // or mode_ == kFlags_set. 418 // or mode_ == kFlags_set.
415 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. 419 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch.
416 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch. 420 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch.
417 }; 421 };
418 422
419 } // namespace compiler 423 } // namespace compiler
420 } // namespace internal 424 } // namespace internal
421 } // namespace v8 425 } // namespace v8
422 426
423 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 427 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698