| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // because we don't know the exact semantics of conflicting (const and | 84 // because we don't know the exact semantics of conflicting (const and |
| 85 // non-const) multiple variable declarations, const vars introduced via | 85 // non-const) multiple variable declarations, const vars introduced via |
| 86 // eval() etc. Const-ness and variable declarations are a complete mess | 86 // eval() etc. Const-ness and variable declarations are a complete mess |
| 87 // in JS. Sigh... | 87 // in JS. Sigh... |
| 88 var_ = var; | 88 var_ = var; |
| 89 var->var_uses()->RecordUses(&var_uses_); | 89 var->var_uses()->RecordUses(&var_uses_); |
| 90 var->obj_uses()->RecordUses(&obj_uses_); | 90 var->obj_uses()->RecordUses(&obj_uses_); |
| 91 } | 91 } |
| 92 | 92 |
| 93 | 93 |
| 94 #ifdef DEBUG | |
| 95 | |
| 96 const char* LoopStatement::OperatorString() const { | |
| 97 switch (type()) { | |
| 98 case DO_LOOP: return "DO"; | |
| 99 case FOR_LOOP: return "FOR"; | |
| 100 case WHILE_LOOP: return "WHILE"; | |
| 101 } | |
| 102 return NULL; | |
| 103 } | |
| 104 | |
| 105 #endif // DEBUG | |
| 106 | |
| 107 | |
| 108 Token::Value Assignment::binary_op() const { | 94 Token::Value Assignment::binary_op() const { |
| 109 switch (op_) { | 95 switch (op_) { |
| 110 case Token::ASSIGN_BIT_OR: return Token::BIT_OR; | 96 case Token::ASSIGN_BIT_OR: return Token::BIT_OR; |
| 111 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; | 97 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; |
| 112 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; | 98 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; |
| 113 case Token::ASSIGN_SHL: return Token::SHL; | 99 case Token::ASSIGN_SHL: return Token::SHL; |
| 114 case Token::ASSIGN_SAR: return Token::SAR; | 100 case Token::ASSIGN_SAR: return Token::SAR; |
| 115 case Token::ASSIGN_SHR: return Token::SHR; | 101 case Token::ASSIGN_SHR: return Token::SHR; |
| 116 case Token::ASSIGN_ADD: return Token::ADD; | 102 case Token::ASSIGN_ADD: return Token::ADD; |
| 117 case Token::ASSIGN_SUB: return Token::SUB; | 103 case Token::ASSIGN_SUB: return Token::SUB; |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 if (kInfinity - max_match_ < node_max_match) { | 488 if (kInfinity - max_match_ < node_max_match) { |
| 503 max_match_ = kInfinity; | 489 max_match_ = kInfinity; |
| 504 } else { | 490 } else { |
| 505 max_match_ += node->max_match(); | 491 max_match_ += node->max_match(); |
| 506 } | 492 } |
| 507 } | 493 } |
| 508 } | 494 } |
| 509 | 495 |
| 510 | 496 |
| 511 } } // namespace v8::internal | 497 } } // namespace v8::internal |
| OLD | NEW |