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 3975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3986 } | 3986 } |
3987 return r; | 3987 return r; |
3988 } | 3988 } |
3989 | 3989 |
3990 | 3990 |
3991 // Returns a representation if all uses agree on the same representation. | 3991 // Returns a representation if all uses agree on the same representation. |
3992 // Integer32 is also returned when some uses are Smi but others are Integer32. | 3992 // Integer32 is also returned when some uses are Smi but others are Integer32. |
3993 Representation HValue::RepresentationFromUseRequirements() { | 3993 Representation HValue::RepresentationFromUseRequirements() { |
3994 Representation rep = Representation::None(); | 3994 Representation rep = Representation::None(); |
3995 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { | 3995 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
| 3996 // Ignore the use requirement from never run code |
| 3997 if (it.value()->block()->IsDeoptimizing()) continue; |
| 3998 |
3996 // We check for observed_input_representation elsewhere. | 3999 // We check for observed_input_representation elsewhere. |
3997 Representation use_rep = | 4000 Representation use_rep = |
3998 it.value()->RequiredInputRepresentation(it.index()); | 4001 it.value()->RequiredInputRepresentation(it.index()); |
3999 if (rep.IsNone()) { | 4002 if (rep.IsNone()) { |
4000 rep = use_rep; | 4003 rep = use_rep; |
4001 continue; | 4004 continue; |
4002 } | 4005 } |
4003 if (use_rep.IsNone() || rep.Equals(use_rep)) continue; | 4006 if (use_rep.IsNone() || rep.Equals(use_rep)) continue; |
4004 if (rep.generalize(use_rep).IsInteger32()) { | 4007 if (rep.generalize(use_rep).IsInteger32()) { |
4005 rep = Representation::Integer32(); | 4008 rep = Representation::Integer32(); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4225 break; | 4228 break; |
4226 case kExternalMemory: | 4229 case kExternalMemory: |
4227 stream->Add("[external-memory]"); | 4230 stream->Add("[external-memory]"); |
4228 break; | 4231 break; |
4229 } | 4232 } |
4230 | 4233 |
4231 stream->Add("@%d", offset()); | 4234 stream->Add("@%d", offset()); |
4232 } | 4235 } |
4233 | 4236 |
4234 } } // namespace v8::internal | 4237 } } // namespace v8::internal |
OLD | NEW |