OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 var_(NULL), | 77 var_(NULL), |
78 is_this_(is_this), | 78 is_this_(is_this), |
79 inside_with_(inside_with), | 79 inside_with_(inside_with), |
80 is_trivial_(false) { | 80 is_trivial_(false) { |
81 // names must be canonicalized for fast equality checks | 81 // names must be canonicalized for fast equality checks |
82 ASSERT(name->IsSymbol()); | 82 ASSERT(name->IsSymbol()); |
83 } | 83 } |
84 | 84 |
85 | 85 |
86 VariableProxy::VariableProxy(bool is_this) | 86 VariableProxy::VariableProxy(bool is_this) |
87 : is_this_(is_this) { | 87 : var_(NULL), |
| 88 is_this_(is_this), |
| 89 inside_with_(false), |
| 90 is_trivial_(false) { |
88 } | 91 } |
89 | 92 |
90 | 93 |
91 void VariableProxy::BindTo(Variable* var) { | 94 void VariableProxy::BindTo(Variable* var) { |
92 ASSERT(var_ == NULL); // must be bound only once | 95 ASSERT(var_ == NULL); // must be bound only once |
93 ASSERT(var != NULL); // must bind | 96 ASSERT(var != NULL); // must bind |
94 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())); |
95 // 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 |
96 // 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 |
97 // non-const) multiple variable declarations, const vars introduced via | 100 // non-const) multiple variable declarations, const vars introduced via |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 cond_(NULL), | 632 cond_(NULL), |
630 may_have_function_literal_(true) { | 633 may_have_function_literal_(true) { |
631 } | 634 } |
632 | 635 |
633 | 636 |
634 CaseClause::CaseClause(Expression* label, ZoneList<Statement*>* statements) | 637 CaseClause::CaseClause(Expression* label, ZoneList<Statement*>* statements) |
635 : label_(label), statements_(statements) { | 638 : label_(label), statements_(statements) { |
636 } | 639 } |
637 | 640 |
638 } } // namespace v8::internal | 641 } } // namespace v8::internal |
OLD | NEW |