| 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 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2582 CompareIC::State CompareIC::ComputeState(Code* target) { | 2582 CompareIC::State CompareIC::ComputeState(Code* target) { |
| 2583 int key = target->major_key(); | 2583 int key = target->major_key(); |
| 2584 if (key == CodeStub::Compare) return GENERIC; | 2584 if (key == CodeStub::Compare) return GENERIC; |
| 2585 ASSERT(key == CodeStub::CompareIC); | 2585 ASSERT(key == CodeStub::CompareIC); |
| 2586 return static_cast<State>(target->compare_state()); | 2586 return static_cast<State>(target->compare_state()); |
| 2587 } | 2587 } |
| 2588 | 2588 |
| 2589 | 2589 |
| 2590 Token::Value CompareIC::ComputeOperation(Code* target) { | 2590 Token::Value CompareIC::ComputeOperation(Code* target) { |
| 2591 ASSERT(target->major_key() == CodeStub::CompareIC); | 2591 ASSERT(target->major_key() == CodeStub::CompareIC); |
| 2592 return static_cast<Token::Value>(target->compare_operation()); | 2592 return static_cast<Token::Value>( |
| 2593 target->compare_operation() + Token::EQ); |
| 2593 } | 2594 } |
| 2594 | 2595 |
| 2595 | 2596 |
| 2596 const char* CompareIC::GetStateName(State state) { | 2597 const char* CompareIC::GetStateName(State state) { |
| 2597 switch (state) { | 2598 switch (state) { |
| 2598 case UNINITIALIZED: return "UNINITIALIZED"; | 2599 case UNINITIALIZED: return "UNINITIALIZED"; |
| 2599 case SMIS: return "SMIS"; | 2600 case SMIS: return "SMIS"; |
| 2600 case HEAP_NUMBERS: return "HEAP_NUMBERS"; | 2601 case HEAP_NUMBERS: return "HEAP_NUMBERS"; |
| 2601 case OBJECTS: return "OBJECTS"; | 2602 case OBJECTS: return "OBJECTS"; |
| 2602 case KNOWN_OBJECTS: return "OBJECTS"; | 2603 case KNOWN_OBJECTS: return "OBJECTS"; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2704 #undef ADDR | 2705 #undef ADDR |
| 2705 }; | 2706 }; |
| 2706 | 2707 |
| 2707 | 2708 |
| 2708 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2709 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 2709 return IC_utilities[id]; | 2710 return IC_utilities[id]; |
| 2710 } | 2711 } |
| 2711 | 2712 |
| 2712 | 2713 |
| 2713 } } // namespace v8::internal | 2714 } } // namespace v8::internal |
| OLD | NEW |