| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 CountOperation* ExpressionStatement::StatementAsCountOperation() { | 59 CountOperation* ExpressionStatement::StatementAsCountOperation() { |
| 60 return expression()->AsCountOperation(); | 60 return expression()->AsCountOperation(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 | 63 |
| 64 VariableProxy::VariableProxy(Isolate* isolate, Variable* var) | 64 VariableProxy::VariableProxy(Isolate* isolate, Variable* var) |
| 65 : Expression(isolate), | 65 : Expression(isolate), |
| 66 name_(var->name()), | 66 name_(var->name()), |
| 67 var_(NULL), // Will be set by the call to BindTo. | 67 var_(NULL), // Will be set by the call to BindTo. |
| 68 is_this_(var->is_this()), | 68 is_this_(var->is_this()), |
| 69 inside_with_(false), | |
| 70 is_trivial_(false), | 69 is_trivial_(false), |
| 71 position_(RelocInfo::kNoPosition) { | 70 position_(RelocInfo::kNoPosition) { |
| 72 BindTo(var); | 71 BindTo(var); |
| 73 } | 72 } |
| 74 | 73 |
| 75 | 74 |
| 76 VariableProxy::VariableProxy(Isolate* isolate, | 75 VariableProxy::VariableProxy(Isolate* isolate, |
| 77 Handle<String> name, | 76 Handle<String> name, |
| 78 bool is_this, | 77 bool is_this, |
| 79 bool inside_with, | |
| 80 int position) | 78 int position) |
| 81 : Expression(isolate), | 79 : Expression(isolate), |
| 82 name_(name), | 80 name_(name), |
| 83 var_(NULL), | 81 var_(NULL), |
| 84 is_this_(is_this), | 82 is_this_(is_this), |
| 85 inside_with_(inside_with), | |
| 86 is_trivial_(false), | 83 is_trivial_(false), |
| 87 position_(position) { | 84 position_(position) { |
| 88 // Names must be canonicalized for fast equality checks. | 85 // Names must be canonicalized for fast equality checks. |
| 89 ASSERT(name->IsSymbol()); | 86 ASSERT(name->IsSymbol()); |
| 90 } | 87 } |
| 91 | 88 |
| 92 | 89 |
| 93 void VariableProxy::BindTo(Variable* var) { | 90 void VariableProxy::BindTo(Variable* var) { |
| 94 ASSERT(var_ == NULL); // must be bound only once | 91 ASSERT(var_ == NULL); // must be bound only once |
| 95 ASSERT(var != NULL); // must bind | 92 ASSERT(var != NULL); // must bind |
| (...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 int pos) | 1166 int pos) |
| 1170 : label_(label), | 1167 : label_(label), |
| 1171 statements_(statements), | 1168 statements_(statements), |
| 1172 position_(pos), | 1169 position_(pos), |
| 1173 compare_type_(NONE), | 1170 compare_type_(NONE), |
| 1174 compare_id_(AstNode::GetNextId(isolate)), | 1171 compare_id_(AstNode::GetNextId(isolate)), |
| 1175 entry_id_(AstNode::GetNextId(isolate)) { | 1172 entry_id_(AstNode::GetNextId(isolate)) { |
| 1176 } | 1173 } |
| 1177 | 1174 |
| 1178 } } // namespace v8::internal | 1175 } } // namespace v8::internal |
| OLD | NEW |