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 #ifndef V8_COMPILER_REPRESENTATION_CHANGE_H_ | 5 #ifndef V8_COMPILER_REPRESENTATION_CHANGE_H_ |
6 #define V8_COMPILER_REPRESENTATION_CHANGE_H_ | 6 #define V8_COMPILER_REPRESENTATION_CHANGE_H_ |
7 | 7 |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 const Operator* Uint32OperatorFor(IrOpcode::Value opcode) { | 324 const Operator* Uint32OperatorFor(IrOpcode::Value opcode) { |
325 switch (opcode) { | 325 switch (opcode) { |
326 case IrOpcode::kNumberAdd: | 326 case IrOpcode::kNumberAdd: |
327 return machine()->Int32Add(); | 327 return machine()->Int32Add(); |
328 case IrOpcode::kNumberSubtract: | 328 case IrOpcode::kNumberSubtract: |
329 return machine()->Int32Sub(); | 329 return machine()->Int32Sub(); |
330 case IrOpcode::kNumberMultiply: | 330 case IrOpcode::kNumberMultiply: |
331 return machine()->Int32Mul(); | 331 return machine()->Int32Mul(); |
332 case IrOpcode::kNumberDivide: | 332 case IrOpcode::kNumberDivide: |
333 return machine()->Int32UDiv(); | 333 return machine()->Uint32Div(); |
334 case IrOpcode::kNumberModulus: | 334 case IrOpcode::kNumberModulus: |
335 return machine()->Int32UMod(); | 335 return machine()->Uint32Mod(); |
336 case IrOpcode::kNumberEqual: | 336 case IrOpcode::kNumberEqual: |
337 return machine()->Word32Equal(); | 337 return machine()->Word32Equal(); |
338 case IrOpcode::kNumberLessThan: | 338 case IrOpcode::kNumberLessThan: |
339 return machine()->Uint32LessThan(); | 339 return machine()->Uint32LessThan(); |
340 case IrOpcode::kNumberLessThanOrEqual: | 340 case IrOpcode::kNumberLessThanOrEqual: |
341 return machine()->Uint32LessThanOrEqual(); | 341 return machine()->Uint32LessThanOrEqual(); |
342 default: | 342 default: |
343 UNREACHABLE(); | 343 UNREACHABLE(); |
344 return NULL; | 344 return NULL; |
345 } | 345 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 Isolate* isolate() { return isolate_; } | 425 Isolate* isolate() { return isolate_; } |
426 SimplifiedOperatorBuilder* simplified() { return simplified_; } | 426 SimplifiedOperatorBuilder* simplified() { return simplified_; } |
427 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } | 427 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } |
428 }; | 428 }; |
429 | 429 |
430 } // namespace compiler | 430 } // namespace compiler |
431 } // namespace internal | 431 } // namespace internal |
432 } // namespace v8 | 432 } // namespace v8 |
433 | 433 |
434 #endif // V8_COMPILER_REPRESENTATION_CHANGE_H_ | 434 #endif // V8_COMPILER_REPRESENTATION_CHANGE_H_ |
OLD | NEW |