| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 BinaryOpIC::TypeInfo result_type = static_cast<BinaryOpIC::TypeInfo>( | 361 BinaryOpIC::TypeInfo result_type = static_cast<BinaryOpIC::TypeInfo>( |
| 362 code->binary_op_result_type()); | 362 code->binary_op_result_type()); |
| 363 | 363 |
| 364 switch (type) { | 364 switch (type) { |
| 365 case BinaryOpIC::UNINITIALIZED: | 365 case BinaryOpIC::UNINITIALIZED: |
| 366 // Uninitialized means never executed. | 366 // Uninitialized means never executed. |
| 367 return TypeInfo::Uninitialized(); | 367 return TypeInfo::Uninitialized(); |
| 368 case BinaryOpIC::SMI: | 368 case BinaryOpIC::SMI: |
| 369 switch (result_type) { | 369 switch (result_type) { |
| 370 case BinaryOpIC::UNINITIALIZED: | 370 case BinaryOpIC::UNINITIALIZED: |
| 371 if (expr->op() == Token::DIV) { |
| 372 return TypeInfo::Double(); |
| 373 } |
| 374 return TypeInfo::Smi(); |
| 371 case BinaryOpIC::SMI: | 375 case BinaryOpIC::SMI: |
| 372 return TypeInfo::Smi(); | 376 return TypeInfo::Smi(); |
| 373 case BinaryOpIC::INT32: | 377 case BinaryOpIC::INT32: |
| 374 return TypeInfo::Integer32(); | 378 return TypeInfo::Integer32(); |
| 375 case BinaryOpIC::HEAP_NUMBER: | 379 case BinaryOpIC::HEAP_NUMBER: |
| 376 return TypeInfo::Double(); | 380 return TypeInfo::Double(); |
| 377 default: | 381 default: |
| 378 return unknown; | 382 return unknown; |
| 379 } | 383 } |
| 380 case BinaryOpIC::INT32: | 384 case BinaryOpIC::INT32: |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 USE(maybe_result); | 686 USE(maybe_result); |
| 683 #ifdef DEBUG | 687 #ifdef DEBUG |
| 684 Object* result = NULL; | 688 Object* result = NULL; |
| 685 // Dictionary has been allocated with sufficient size for all elements. | 689 // Dictionary has been allocated with sufficient size for all elements. |
| 686 ASSERT(maybe_result->ToObject(&result)); | 690 ASSERT(maybe_result->ToObject(&result)); |
| 687 ASSERT(*dictionary_ == result); | 691 ASSERT(*dictionary_ == result); |
| 688 #endif | 692 #endif |
| 689 } | 693 } |
| 690 | 694 |
| 691 } } // namespace v8::internal | 695 } } // namespace v8::internal |
| OLD | NEW |