| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 bool Assignment::IsInlineable() const { | 574 bool Assignment::IsInlineable() const { |
| 575 return target()->IsInlineable() && value()->IsInlineable(); | 575 return target()->IsInlineable() && value()->IsInlineable(); |
| 576 } | 576 } |
| 577 | 577 |
| 578 | 578 |
| 579 bool Property::IsInlineable() const { | 579 bool Property::IsInlineable() const { |
| 580 return obj()->IsInlineable() && key()->IsInlineable(); | 580 return obj()->IsInlineable() && key()->IsInlineable(); |
| 581 } | 581 } |
| 582 | 582 |
| 583 | 583 |
| 584 bool Call::IsInlineable() const { | 584 bool CallBase::IsInlineable() const { |
| 585 if (!expression()->IsInlineable()) return false; | 585 if (!expression()->IsInlineable()) return false; |
| 586 const int count = arguments()->length(); | 586 const int count = arguments()->length(); |
| 587 for (int i = 0; i < count; ++i) { | 587 for (int i = 0; i < count; ++i) { |
| 588 if (!arguments()->at(i)->IsInlineable()) return false; | |
| 589 } | |
| 590 return true; | |
| 591 } | |
| 592 | |
| 593 | |
| 594 bool CallNew::IsInlineable() const { | |
| 595 if (!expression()->IsInlineable()) return false; | |
| 596 const int count = arguments()->length(); | |
| 597 for (int i = 0; i < count; ++i) { | |
| 598 if (!arguments()->at(i)->IsInlineable()) return false; | 588 if (!arguments()->at(i)->IsInlineable()) return false; |
| 599 } | 589 } |
| 600 return true; | 590 return true; |
| 601 } | 591 } |
| 602 | 592 |
| 603 | 593 |
| 604 bool CallRuntime::IsInlineable() const { | 594 bool CallRuntime::IsInlineable() const { |
| 605 // Don't try to inline JS runtime calls because we don't (currently) even | 595 // Don't try to inline JS runtime calls because we don't (currently) even |
| 606 // optimize them. | 596 // optimize them. |
| 607 if (is_jsruntime()) return false; | 597 if (is_jsruntime()) return false; |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 int pos) | 1198 int pos) |
| 1209 : label_(label), | 1199 : label_(label), |
| 1210 statements_(statements), | 1200 statements_(statements), |
| 1211 position_(pos), | 1201 position_(pos), |
| 1212 compare_type_(NONE), | 1202 compare_type_(NONE), |
| 1213 compare_id_(AstNode::GetNextId(isolate)), | 1203 compare_id_(AstNode::GetNextId(isolate)), |
| 1214 entry_id_(AstNode::GetNextId(isolate)) { | 1204 entry_id_(AstNode::GetNextId(isolate)) { |
| 1215 } | 1205 } |
| 1216 | 1206 |
| 1217 } } // namespace v8::internal | 1207 } } // namespace v8::internal |
| OLD | NEW |