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 4019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4030 return r; | 4030 return r; |
4031 } | 4031 } |
4032 | 4032 |
4033 | 4033 |
4034 // Returns a representation if all uses agree on the same representation. | 4034 // Returns a representation if all uses agree on the same representation. |
4035 // Integer32 is also returned when some uses are Smi but others are Integer32. | 4035 // Integer32 is also returned when some uses are Smi but others are Integer32. |
4036 Representation HValue::RepresentationFromUseRequirements() { | 4036 Representation HValue::RepresentationFromUseRequirements() { |
4037 Representation rep = Representation::None(); | 4037 Representation rep = Representation::None(); |
4038 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { | 4038 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
4039 // Ignore the use requirement from never run code | 4039 // Ignore the use requirement from never run code |
4040 if (it.value()->block()->IsDeoptimizing()) continue; | 4040 if (it.value()->block()->IsUnreachable()) continue; |
4041 | 4041 |
4042 // We check for observed_input_representation elsewhere. | 4042 // We check for observed_input_representation elsewhere. |
4043 Representation use_rep = | 4043 Representation use_rep = |
4044 it.value()->RequiredInputRepresentation(it.index()); | 4044 it.value()->RequiredInputRepresentation(it.index()); |
4045 if (rep.IsNone()) { | 4045 if (rep.IsNone()) { |
4046 rep = use_rep; | 4046 rep = use_rep; |
4047 continue; | 4047 continue; |
4048 } | 4048 } |
4049 if (use_rep.IsNone() || rep.Equals(use_rep)) continue; | 4049 if (use_rep.IsNone() || rep.Equals(use_rep)) continue; |
4050 if (rep.generalize(use_rep).IsInteger32()) { | 4050 if (rep.generalize(use_rep).IsInteger32()) { |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4271 break; | 4271 break; |
4272 case kExternalMemory: | 4272 case kExternalMemory: |
4273 stream->Add("[external-memory]"); | 4273 stream->Add("[external-memory]"); |
4274 break; | 4274 break; |
4275 } | 4275 } |
4276 | 4276 |
4277 stream->Add("@%d", offset()); | 4277 stream->Add("@%d", offset()); |
4278 } | 4278 } |
4279 | 4279 |
4280 } } // namespace v8::internal | 4280 } } // namespace v8::internal |
OLD | NEW |