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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 2573573004: [stubs] Enable graph verification for builtins. (Closed)
Patch Set: Created 4 years 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 #include "src/compiler/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 } 1977 }
1978 1978
1979 void InstructionSelector::VisitReturn(Node* ret) { 1979 void InstructionSelector::VisitReturn(Node* ret) {
1980 OperandGenerator g(this); 1980 OperandGenerator g(this);
1981 const int input_count = linkage()->GetIncomingDescriptor()->ReturnCount() == 0 1981 const int input_count = linkage()->GetIncomingDescriptor()->ReturnCount() == 0
1982 ? 1 1982 ? 1
1983 : ret->op()->ValueInputCount(); 1983 : ret->op()->ValueInputCount();
1984 DCHECK_GE(input_count, 1); 1984 DCHECK_GE(input_count, 1);
1985 auto value_locations = zone()->NewArray<InstructionOperand>(input_count); 1985 auto value_locations = zone()->NewArray<InstructionOperand>(input_count);
1986 Node* pop_count = ret->InputAt(0); 1986 Node* pop_count = ret->InputAt(0);
1987 value_locations[0] = pop_count->opcode() == IrOpcode::kInt32Constant 1987 value_locations[0] = (pop_count->opcode() == IrOpcode::kInt32Constant ||
1988 pop_count->opcode() == IrOpcode::kInt64Constant)
1988 ? g.UseImmediate(pop_count) 1989 ? g.UseImmediate(pop_count)
1989 : g.UseRegister(pop_count); 1990 : g.UseRegister(pop_count);
1990 for (int i = 1; i < input_count; ++i) { 1991 for (int i = 1; i < input_count; ++i) {
1991 value_locations[i] = 1992 value_locations[i] =
1992 g.UseLocation(ret->InputAt(i), linkage()->GetReturnLocation(i - 1)); 1993 g.UseLocation(ret->InputAt(i), linkage()->GetReturnLocation(i - 1));
1993 } 1994 }
1994 Emit(kArchRet, 0, nullptr, input_count, value_locations); 1995 Emit(kArchRet, 0, nullptr, input_count, value_locations);
1995 } 1996 }
1996 1997
1997 Instruction* InstructionSelector::EmitDeoptimize(InstructionCode opcode, 1998 Instruction* InstructionSelector::EmitDeoptimize(InstructionCode opcode,
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 return new (instruction_zone()) FrameStateDescriptor( 2125 return new (instruction_zone()) FrameStateDescriptor(
2125 instruction_zone(), state_info.type(), state_info.bailout_id(), 2126 instruction_zone(), state_info.type(), state_info.bailout_id(),
2126 state_info.state_combine(), parameters, locals, stack, 2127 state_info.state_combine(), parameters, locals, stack,
2127 state_info.shared_info(), outer_state); 2128 state_info.shared_info(), outer_state);
2128 } 2129 }
2129 2130
2130 2131
2131 } // namespace compiler 2132 } // namespace compiler
2132 } // namespace internal 2133 } // namespace internal
2133 } // namespace v8 2134 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698