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/ia32/assembler-ia32.h" | 10 #include "src/ia32/assembler-ia32.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 }; | 166 }; |
167 | 167 |
168 | 168 |
169 namespace { | 169 namespace { |
170 | 170 |
171 bool HasImmediateInput(Instruction* instr, size_t index) { | 171 bool HasImmediateInput(Instruction* instr, size_t index) { |
172 return instr->InputAt(index)->IsImmediate(); | 172 return instr->InputAt(index)->IsImmediate(); |
173 } | 173 } |
174 | 174 |
175 | 175 |
176 class OutOfLineLoadInteger FINAL : public OutOfLineCode { | 176 class OutOfLineLoadInteger final : public OutOfLineCode { |
177 public: | 177 public: |
178 OutOfLineLoadInteger(CodeGenerator* gen, Register result) | 178 OutOfLineLoadInteger(CodeGenerator* gen, Register result) |
179 : OutOfLineCode(gen), result_(result) {} | 179 : OutOfLineCode(gen), result_(result) {} |
180 | 180 |
181 void Generate() FINAL { __ xor_(result_, result_); } | 181 void Generate() final { __ xor_(result_, result_); } |
182 | 182 |
183 private: | 183 private: |
184 Register const result_; | 184 Register const result_; |
185 }; | 185 }; |
186 | 186 |
187 | 187 |
188 class OutOfLineLoadFloat FINAL : public OutOfLineCode { | 188 class OutOfLineLoadFloat final : public OutOfLineCode { |
189 public: | 189 public: |
190 OutOfLineLoadFloat(CodeGenerator* gen, XMMRegister result) | 190 OutOfLineLoadFloat(CodeGenerator* gen, XMMRegister result) |
191 : OutOfLineCode(gen), result_(result) {} | 191 : OutOfLineCode(gen), result_(result) {} |
192 | 192 |
193 void Generate() FINAL { __ pcmpeqd(result_, result_); } | 193 void Generate() final { __ pcmpeqd(result_, result_); } |
194 | 194 |
195 private: | 195 private: |
196 XMMRegister const result_; | 196 XMMRegister const result_; |
197 }; | 197 }; |
198 | 198 |
199 | 199 |
200 class OutOfLineTruncateDoubleToI FINAL : public OutOfLineCode { | 200 class OutOfLineTruncateDoubleToI final : public OutOfLineCode { |
201 public: | 201 public: |
202 OutOfLineTruncateDoubleToI(CodeGenerator* gen, Register result, | 202 OutOfLineTruncateDoubleToI(CodeGenerator* gen, Register result, |
203 XMMRegister input) | 203 XMMRegister input) |
204 : OutOfLineCode(gen), result_(result), input_(input) {} | 204 : OutOfLineCode(gen), result_(result), input_(input) {} |
205 | 205 |
206 void Generate() FINAL { | 206 void Generate() final { |
207 __ sub(esp, Immediate(kDoubleSize)); | 207 __ sub(esp, Immediate(kDoubleSize)); |
208 __ movsd(MemOperand(esp, 0), input_); | 208 __ movsd(MemOperand(esp, 0), input_); |
209 __ SlowTruncateToI(result_, esp, 0); | 209 __ SlowTruncateToI(result_, esp, 0); |
210 __ add(esp, Immediate(kDoubleSize)); | 210 __ add(esp, Immediate(kDoubleSize)); |
211 } | 211 } |
212 | 212 |
213 private: | 213 private: |
214 Register const result_; | 214 Register const result_; |
215 XMMRegister const input_; | 215 XMMRegister const input_; |
216 }; | 216 }; |
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1470 } | 1470 } |
1471 } | 1471 } |
1472 MarkLazyDeoptSite(); | 1472 MarkLazyDeoptSite(); |
1473 } | 1473 } |
1474 | 1474 |
1475 #undef __ | 1475 #undef __ |
1476 | 1476 |
1477 } // namespace compiler | 1477 } // namespace compiler |
1478 } // namespace internal | 1478 } // namespace internal |
1479 } // namespace v8 | 1479 } // namespace v8 |
OLD | NEW |