| 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 4012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4023 if (!use_rep.IsNone() && | 4023 if (!use_rep.IsNone() && |
| 4024 !use_rep.IsSmi() && | 4024 !use_rep.IsSmi() && |
| 4025 !use_rep.IsTagged()) { | 4025 !use_rep.IsTagged()) { |
| 4026 return true; | 4026 return true; |
| 4027 } | 4027 } |
| 4028 } | 4028 } |
| 4029 return false; | 4029 return false; |
| 4030 } | 4030 } |
| 4031 | 4031 |
| 4032 | 4032 |
| 4033 bool HValue::UsedBy(HValue* value) { |
| 4034 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
| 4035 if (it.value() == value) return true; |
| 4036 } |
| 4037 return false; |
| 4038 } |
| 4039 |
| 4040 |
| 4033 // Node-specific verification code is only included in debug mode. | 4041 // Node-specific verification code is only included in debug mode. |
| 4034 #ifdef DEBUG | 4042 #ifdef DEBUG |
| 4035 | 4043 |
| 4036 void HPhi::Verify() { | 4044 void HPhi::Verify() { |
| 4037 ASSERT(OperandCount() == block()->predecessors()->length()); | 4045 ASSERT(OperandCount() == block()->predecessors()->length()); |
| 4038 for (int i = 0; i < OperandCount(); ++i) { | 4046 for (int i = 0; i < OperandCount(); ++i) { |
| 4039 HValue* value = OperandAt(i); | 4047 HValue* value = OperandAt(i); |
| 4040 HBasicBlock* defining_block = value->block(); | 4048 HBasicBlock* defining_block = value->block(); |
| 4041 HBasicBlock* predecessor_block = block()->predecessors()->at(i); | 4049 HBasicBlock* predecessor_block = block()->predecessors()->at(i); |
| 4042 ASSERT(defining_block == predecessor_block || | 4050 ASSERT(defining_block == predecessor_block || |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4229 break; | 4237 break; |
| 4230 case kExternalMemory: | 4238 case kExternalMemory: |
| 4231 stream->Add("[external-memory]"); | 4239 stream->Add("[external-memory]"); |
| 4232 break; | 4240 break; |
| 4233 } | 4241 } |
| 4234 | 4242 |
| 4235 stream->Add("@%d", offset()); | 4243 stream->Add("@%d", offset()); |
| 4236 } | 4244 } |
| 4237 | 4245 |
| 4238 } } // namespace v8::internal | 4246 } } // namespace v8::internal |
| OLD | NEW |