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 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2346 } | 2346 } |
2347 UNREACHABLE(); | 2347 UNREACHABLE(); |
2348 return NULL; | 2348 return NULL; |
2349 } | 2349 } |
2350 | 2350 |
2351 | 2351 |
2352 // static | 2352 // static |
2353 Type* BinaryOpIC::State::KindToType(Kind kind, Zone* zone) { | 2353 Type* BinaryOpIC::State::KindToType(Kind kind, Zone* zone) { |
2354 switch (kind) { | 2354 switch (kind) { |
2355 case NONE: return Type::None(zone); | 2355 case NONE: return Type::None(zone); |
2356 case SMI: return Type::Smi(zone); | 2356 case SMI: return Type::SignedSmall(zone); |
2357 case INT32: return Type::Signed32(zone); | 2357 case INT32: return Type::Signed32(zone); |
2358 case NUMBER: return Type::Number(zone); | 2358 case NUMBER: return Type::Number(zone); |
2359 case STRING: return Type::String(zone); | 2359 case STRING: return Type::String(zone); |
2360 case GENERIC: return Type::Any(zone); | 2360 case GENERIC: return Type::Any(zone); |
2361 } | 2361 } |
2362 UNREACHABLE(); | 2362 UNREACHABLE(); |
2363 return NULL; | 2363 return NULL; |
2364 } | 2364 } |
2365 | 2365 |
2366 | 2366 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 return NULL; | 2489 return NULL; |
2490 } | 2490 } |
2491 | 2491 |
2492 | 2492 |
2493 Type* CompareIC::StateToType( | 2493 Type* CompareIC::StateToType( |
2494 Zone* zone, | 2494 Zone* zone, |
2495 CompareIC::State state, | 2495 CompareIC::State state, |
2496 Handle<Map> map) { | 2496 Handle<Map> map) { |
2497 switch (state) { | 2497 switch (state) { |
2498 case CompareIC::UNINITIALIZED: return Type::None(zone); | 2498 case CompareIC::UNINITIALIZED: return Type::None(zone); |
2499 case CompareIC::SMI: return Type::Smi(zone); | 2499 case CompareIC::SMI: return Type::SignedSmall(zone); |
2500 case CompareIC::NUMBER: return Type::Number(zone); | 2500 case CompareIC::NUMBER: return Type::Number(zone); |
2501 case CompareIC::STRING: return Type::String(zone); | 2501 case CompareIC::STRING: return Type::String(zone); |
2502 case CompareIC::INTERNALIZED_STRING: return Type::InternalizedString(zone); | 2502 case CompareIC::INTERNALIZED_STRING: return Type::InternalizedString(zone); |
2503 case CompareIC::UNIQUE_NAME: return Type::UniqueName(zone); | 2503 case CompareIC::UNIQUE_NAME: return Type::UniqueName(zone); |
2504 case CompareIC::OBJECT: return Type::Receiver(zone); | 2504 case CompareIC::OBJECT: return Type::Receiver(zone); |
2505 case CompareIC::KNOWN_OBJECT: | 2505 case CompareIC::KNOWN_OBJECT: |
2506 return map.is_null() ? Type::Receiver(zone) : Type::Class(map, zone); | 2506 return map.is_null() ? Type::Receiver(zone) : Type::Class(map, zone); |
2507 case CompareIC::GENERIC: return Type::Any(zone); | 2507 case CompareIC::GENERIC: return Type::Any(zone); |
2508 } | 2508 } |
2509 UNREACHABLE(); | 2509 UNREACHABLE(); |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2813 #undef ADDR | 2813 #undef ADDR |
2814 }; | 2814 }; |
2815 | 2815 |
2816 | 2816 |
2817 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2817 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2818 return IC_utilities[id]; | 2818 return IC_utilities[id]; |
2819 } | 2819 } |
2820 | 2820 |
2821 | 2821 |
2822 } } // namespace v8::internal | 2822 } } // namespace v8::internal |
OLD | NEW |