| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 157 } |
| 158 return Token::ILLEGAL; | 158 return Token::ILLEGAL; |
| 159 } | 159 } |
| 160 | 160 |
| 161 | 161 |
| 162 bool FunctionLiteral::AllowsLazyCompilation() { | 162 bool FunctionLiteral::AllowsLazyCompilation() { |
| 163 return scope()->AllowsLazyCompilation(); | 163 return scope()->AllowsLazyCompilation(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 | 166 |
| 167 bool FunctionLiteral::AllowOptimize() { | |
| 168 // We can't deal with heap-allocated locals. | |
| 169 return scope()->num_heap_slots() == 0; | |
| 170 } | |
| 171 | |
| 172 | |
| 173 ObjectLiteral::Property::Property(Literal* key, Expression* value) { | 167 ObjectLiteral::Property::Property(Literal* key, Expression* value) { |
| 174 emit_store_ = true; | 168 emit_store_ = true; |
| 175 key_ = key; | 169 key_ = key; |
| 176 value_ = value; | 170 value_ = value; |
| 177 Object* k = *key->handle(); | 171 Object* k = *key->handle(); |
| 178 if (k->IsSymbol() && Heap::Proto_symbol()->Equals(String::cast(k))) { | 172 if (k->IsSymbol() && Heap::Proto_symbol()->Equals(String::cast(k))) { |
| 179 kind_ = PROTOTYPE; | 173 kind_ = PROTOTYPE; |
| 180 } else if (value_->AsMaterializedLiteral() != NULL) { | 174 } else if (value_->AsMaterializedLiteral() != NULL) { |
| 181 kind_ = MATERIALIZED_LITERAL; | 175 kind_ = MATERIALIZED_LITERAL; |
| 182 } else if (value_->AsLiteral() != NULL) { | 176 } else if (value_->AsLiteral() != NULL) { |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 | 1028 |
| 1035 CaseClause::CaseClause(Expression* label, | 1029 CaseClause::CaseClause(Expression* label, |
| 1036 ZoneList<Statement*>* statements, | 1030 ZoneList<Statement*>* statements, |
| 1037 int pos) | 1031 int pos) |
| 1038 : label_(label), | 1032 : label_(label), |
| 1039 statements_(statements), | 1033 statements_(statements), |
| 1040 position_(pos), | 1034 position_(pos), |
| 1041 compare_type_(NONE) {} | 1035 compare_type_(NONE) {} |
| 1042 | 1036 |
| 1043 } } // namespace v8::internal | 1037 } } // namespace v8::internal |
| OLD | NEW |