| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 if (v->CheckStackOverflow()) return; \ | 51 if (v->CheckStackOverflow()) return; \ |
| 52 v->Visit##type(this); \ | 52 v->Visit##type(this); \ |
| 53 } | 53 } |
| 54 AST_NODE_LIST(DECL_ACCEPT) | 54 AST_NODE_LIST(DECL_ACCEPT) |
| 55 #undef DECL_ACCEPT | 55 #undef DECL_ACCEPT |
| 56 | 56 |
| 57 | 57 |
| 58 // ---------------------------------------------------------------------------- | 58 // ---------------------------------------------------------------------------- |
| 59 // Implementation of other node functionality. | 59 // Implementation of other node functionality. |
| 60 | 60 |
| 61 Assignment* ExpressionStatement::StatementAsSimpleAssignment() { | |
| 62 return (expression()->AsAssignment() != NULL && | |
| 63 !expression()->AsAssignment()->is_compound()) | |
| 64 ? expression()->AsAssignment() | |
| 65 : NULL; | |
| 66 } | |
| 67 | |
| 68 | |
| 69 CountOperation* ExpressionStatement::StatementAsCountOperation() { | |
| 70 return expression()->AsCountOperation(); | |
| 71 } | |
| 72 | |
| 73 | |
| 74 VariableProxy::VariableProxy(Handle<String> name, | 61 VariableProxy::VariableProxy(Handle<String> name, |
| 75 bool is_this, | 62 bool is_this, |
| 76 bool inside_with) | 63 bool inside_with) |
| 77 : name_(name), | 64 : name_(name), |
| 78 var_(NULL), | 65 var_(NULL), |
| 79 is_this_(is_this), | 66 is_this_(is_this), |
| 80 inside_with_(inside_with), | 67 inside_with_(inside_with) { |
| 81 is_trivial_(false) { | |
| 82 // names must be canonicalized for fast equality checks | 68 // names must be canonicalized for fast equality checks |
| 83 ASSERT(name->IsSymbol()); | 69 ASSERT(name->IsSymbol()); |
| 84 } | 70 } |
| 85 | 71 |
| 86 | 72 |
| 87 VariableProxy::VariableProxy(bool is_this) | 73 VariableProxy::VariableProxy(bool is_this) |
| 88 : is_this_(is_this) { | 74 : is_this_(is_this) { |
| 89 } | 75 } |
| 90 | 76 |
| 91 | 77 |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 if (kInfinity - max_match_ < node_max_match) { | 479 if (kInfinity - max_match_ < node_max_match) { |
| 494 max_match_ = kInfinity; | 480 max_match_ = kInfinity; |
| 495 } else { | 481 } else { |
| 496 max_match_ += node->max_match(); | 482 max_match_ += node->max_match(); |
| 497 } | 483 } |
| 498 } | 484 } |
| 499 } | 485 } |
| 500 | 486 |
| 501 | 487 |
| 502 } } // namespace v8::internal | 488 } } // namespace v8::internal |
| OLD | NEW |