OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 | 1066 |
1067 | 1067 |
1068 void CodeGenerator::AssembleArchJump(BasicBlock::RpoNumber target) { | 1068 void CodeGenerator::AssembleArchJump(BasicBlock::RpoNumber target) { |
1069 if (!IsNextInAssemblyOrder(target)) __ jmp(GetLabel(target)); | 1069 if (!IsNextInAssemblyOrder(target)) __ jmp(GetLabel(target)); |
1070 } | 1070 } |
1071 | 1071 |
1072 | 1072 |
1073 void CodeGenerator::AssembleArchSwitch(Instruction* instr) { | 1073 void CodeGenerator::AssembleArchSwitch(Instruction* instr) { |
1074 X64OperandConverter i(this, instr); | 1074 X64OperandConverter i(this, instr); |
1075 size_t const label_count = instr->InputCount() - 1; | 1075 size_t const label_count = instr->InputCount() - 1; |
1076 Label** labels = zone()->NewArray<Label*>(static_cast<int>(label_count)); | 1076 Label** labels = zone()->NewArray<Label*>(label_count); |
1077 for (size_t index = 0; index < label_count; ++index) { | 1077 for (size_t index = 0; index < label_count; ++index) { |
1078 labels[index] = GetLabel(i.InputRpo(static_cast<int>(index + 1))); | 1078 labels[index] = GetLabel(i.InputRpo(static_cast<int>(index + 1))); |
1079 } | 1079 } |
1080 Label* const table = AddJumpTable(labels, label_count); | 1080 Label* const table = AddJumpTable(labels, label_count); |
1081 __ leaq(kScratchRegister, Operand(table)); | 1081 __ leaq(kScratchRegister, Operand(table)); |
1082 __ jmp(Operand(kScratchRegister, i.InputRegister(0), times_8, 0)); | 1082 __ jmp(Operand(kScratchRegister, i.InputRegister(0), times_8, 0)); |
1083 } | 1083 } |
1084 | 1084 |
1085 | 1085 |
1086 // Assembles boolean materializations after this instruction. | 1086 // Assembles boolean materializations after this instruction. |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 } | 1418 } |
1419 } | 1419 } |
1420 MarkLazyDeoptSite(); | 1420 MarkLazyDeoptSite(); |
1421 } | 1421 } |
1422 | 1422 |
1423 #undef __ | 1423 #undef __ |
1424 | 1424 |
1425 } // namespace internal | 1425 } // namespace internal |
1426 } // namespace compiler | 1426 } // namespace compiler |
1427 } // namespace v8 | 1427 } // namespace v8 |
OLD | NEW |