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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 150 } |
151 return Token::ILLEGAL; | 151 return Token::ILLEGAL; |
152 } | 152 } |
153 | 153 |
154 | 154 |
155 bool FunctionLiteral::AllowsLazyCompilation() { | 155 bool FunctionLiteral::AllowsLazyCompilation() { |
156 return scope()->AllowsLazyCompilation(); | 156 return scope()->AllowsLazyCompilation(); |
157 } | 157 } |
158 | 158 |
159 | 159 |
| 160 int FunctionLiteral::start_position() const { |
| 161 return scope()->start_position(); |
| 162 } |
| 163 |
| 164 |
| 165 int FunctionLiteral::end_position() const { |
| 166 return scope()->end_position(); |
| 167 } |
| 168 |
| 169 |
| 170 StrictModeFlag FunctionLiteral::strict_mode_flag() const { |
| 171 return scope()->strict_mode_flag(); |
| 172 } |
| 173 |
| 174 |
160 ObjectLiteral::Property::Property(Literal* key, Expression* value) { | 175 ObjectLiteral::Property::Property(Literal* key, Expression* value) { |
161 emit_store_ = true; | 176 emit_store_ = true; |
162 key_ = key; | 177 key_ = key; |
163 value_ = value; | 178 value_ = value; |
164 Object* k = *key->handle(); | 179 Object* k = *key->handle(); |
165 if (k->IsSymbol() && HEAP->Proto_symbol()->Equals(String::cast(k))) { | 180 if (k->IsSymbol() && HEAP->Proto_symbol()->Equals(String::cast(k))) { |
166 kind_ = PROTOTYPE; | 181 kind_ = PROTOTYPE; |
167 } else if (value_->AsMaterializedLiteral() != NULL) { | 182 } else if (value_->AsMaterializedLiteral() != NULL) { |
168 kind_ = MATERIALIZED_LITERAL; | 183 kind_ = MATERIALIZED_LITERAL; |
169 } else if (value_->AsLiteral() != NULL) { | 184 } else if (value_->AsLiteral() != NULL) { |
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 int pos) | 1206 int pos) |
1192 : label_(label), | 1207 : label_(label), |
1193 statements_(statements), | 1208 statements_(statements), |
1194 position_(pos), | 1209 position_(pos), |
1195 compare_type_(NONE), | 1210 compare_type_(NONE), |
1196 compare_id_(AstNode::GetNextId(isolate)), | 1211 compare_id_(AstNode::GetNextId(isolate)), |
1197 entry_id_(AstNode::GetNextId(isolate)) { | 1212 entry_id_(AstNode::GetNextId(isolate)) { |
1198 } | 1213 } |
1199 | 1214 |
1200 } } // namespace v8::internal | 1215 } } // namespace v8::internal |
OLD | NEW |