| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 | 73 |
| 74 VariableProxy::VariableProxy(Handle<String> name, | 74 VariableProxy::VariableProxy(Handle<String> name, |
| 75 bool is_this, | 75 bool is_this, |
| 76 bool inside_with) | 76 bool inside_with) |
| 77 : name_(name), | 77 : name_(name), |
| 78 var_(NULL), | 78 var_(NULL), |
| 79 is_this_(is_this), | 79 is_this_(is_this), |
| 80 inside_with_(inside_with), | 80 inside_with_(inside_with), |
| 81 is_trivial_(false) { | 81 is_trivial_(false), |
| 82 reaching_definitions_(NULL) { |
| 82 // names must be canonicalized for fast equality checks | 83 // names must be canonicalized for fast equality checks |
| 83 ASSERT(name->IsSymbol()); | 84 ASSERT(name->IsSymbol()); |
| 84 } | 85 } |
| 85 | 86 |
| 86 | 87 |
| 87 VariableProxy::VariableProxy(bool is_this) | 88 VariableProxy::VariableProxy(bool is_this) |
| 88 : is_this_(is_this) { | 89 : is_this_(is_this), |
| 90 reaching_definitions_(NULL) { |
| 89 } | 91 } |
| 90 | 92 |
| 91 | 93 |
| 92 void VariableProxy::BindTo(Variable* var) { | 94 void VariableProxy::BindTo(Variable* var) { |
| 93 ASSERT(var_ == NULL); // must be bound only once | 95 ASSERT(var_ == NULL); // must be bound only once |
| 94 ASSERT(var != NULL); // must bind | 96 ASSERT(var != NULL); // must bind |
| 95 ASSERT((is_this() && var->is_this()) || name_.is_identical_to(var->name())); | 97 ASSERT((is_this() && var->is_this()) || name_.is_identical_to(var->name())); |
| 96 // Ideally CONST-ness should match. However, this is very hard to achieve | 98 // Ideally CONST-ness should match. However, this is very hard to achieve |
| 97 // because we don't know the exact semantics of conflicting (const and | 99 // because we don't know the exact semantics of conflicting (const and |
| 98 // non-const) multiple variable declarations, const vars introduced via | 100 // non-const) multiple variable declarations, const vars introduced via |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 return true; | 586 return true; |
| 585 } | 587 } |
| 586 } | 588 } |
| 587 | 589 |
| 588 | 590 |
| 589 // Compare operations always express Boolean values. | 591 // Compare operations always express Boolean values. |
| 590 bool CompareOperation::IsPrimitive() { return true; } | 592 bool CompareOperation::IsPrimitive() { return true; } |
| 591 | 593 |
| 592 | 594 |
| 593 } } // namespace v8::internal | 595 } } // namespace v8::internal |
| OLD | NEW |