| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 PositionRecordingType current_position_recording_type_; | 622 PositionRecordingType current_position_recording_type_; |
| 623 int written_position_; | 623 int written_position_; |
| 624 | 624 |
| 625 int current_statement_position_; | 625 int current_statement_position_; |
| 626 int written_statement_position_; | 626 int written_statement_position_; |
| 627 }; | 627 }; |
| 628 | 628 |
| 629 | 629 |
| 630 class PreserveStatementPositionScope BASE_EMBEDDED { | 630 class PreserveStatementPositionScope BASE_EMBEDDED { |
| 631 public: | 631 public: |
| 632 PreserveStatementPositionScope(PositionsRecorder* positions_recorder) | 632 explicit PreserveStatementPositionScope(PositionsRecorder* positions_recorder) |
| 633 : positions_recorder_(positions_recorder), | 633 : positions_recorder_(positions_recorder), |
| 634 statement_position_(positions_recorder->current_statement_position()) {} | 634 statement_position_(positions_recorder->current_statement_position()) {} |
| 635 | 635 |
| 636 ~PreserveStatementPositionScope() { | 636 ~PreserveStatementPositionScope() { |
| 637 if (statement_position_ != RelocInfo::kNoPosition) { | 637 if (statement_position_ != RelocInfo::kNoPosition) { |
| 638 positions_recorder_->RecordStatementPosition(statement_position_); | 638 positions_recorder_->RecordStatementPosition(statement_position_); |
| 639 } | 639 } |
| 640 } | 640 } |
| 641 | 641 |
| 642 private: | 642 private: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 unsigned int num_bits_set; | 678 unsigned int num_bits_set; |
| 679 for (num_bits_set = 0; x; x >>= 1) { | 679 for (num_bits_set = 0; x; x >>= 1) { |
| 680 num_bits_set += x & 1; | 680 num_bits_set += x & 1; |
| 681 } | 681 } |
| 682 return num_bits_set; | 682 return num_bits_set; |
| 683 } | 683 } |
| 684 | 684 |
| 685 } } // namespace v8::internal | 685 } } // namespace v8::internal |
| 686 | 686 |
| 687 #endif // V8_ASSEMBLER_H_ | 687 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |