| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 int HValue::LoopWeight() const { | 71 int HValue::LoopWeight() const { |
| 72 const int w = FLAG_loop_weight; | 72 const int w = FLAG_loop_weight; |
| 73 static const int weights[] = { 1, w, w*w, w*w*w, w*w*w*w }; | 73 static const int weights[] = { 1, w, w*w, w*w*w, w*w*w*w }; |
| 74 return weights[Min(block()->LoopNestingDepth(), | 74 return weights[Min(block()->LoopNestingDepth(), |
| 75 static_cast<int>(ARRAY_SIZE(weights)-1))]; | 75 static_cast<int>(ARRAY_SIZE(weights)-1))]; |
| 76 } | 76 } |
| 77 | 77 |
| 78 | 78 |
| 79 Isolate* HValue::isolate() const { | 79 Isolate* HValue::isolate() const { |
| 80 ASSERT(block() != NULL); | 80 ASSERT(block() != NULL); |
| 81 return block()->graph()->isolate(); | 81 return block()->isolate(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 | 84 |
| 85 void HValue::AssumeRepresentation(Representation r) { | 85 void HValue::AssumeRepresentation(Representation r) { |
| 86 if (CheckFlag(kFlexibleRepresentation)) { | 86 if (CheckFlag(kFlexibleRepresentation)) { |
| 87 ChangeRepresentation(r); | 87 ChangeRepresentation(r); |
| 88 // The representation of the value is dictated by type feedback and | 88 // The representation of the value is dictated by type feedback and |
| 89 // will not be changed later. | 89 // will not be changed later. |
| 90 ClearFlag(kFlexibleRepresentation); | 90 ClearFlag(kFlexibleRepresentation); |
| 91 } | 91 } |
| (...skipping 3175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3267 | 3267 |
| 3268 | 3268 |
| 3269 void HCheckFunction::Verify() { | 3269 void HCheckFunction::Verify() { |
| 3270 HInstruction::Verify(); | 3270 HInstruction::Verify(); |
| 3271 ASSERT(HasNoUses()); | 3271 ASSERT(HasNoUses()); |
| 3272 } | 3272 } |
| 3273 | 3273 |
| 3274 #endif | 3274 #endif |
| 3275 | 3275 |
| 3276 } } // namespace v8::internal | 3276 } } // namespace v8::internal |
| OLD | NEW |