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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 return scope()->AllowsLazyCompilation(); | 128 return scope()->AllowsLazyCompilation(); |
129 } | 129 } |
130 | 130 |
131 | 131 |
132 ObjectLiteral::Property::Property(Literal* key, Expression* value) { | 132 ObjectLiteral::Property::Property(Literal* key, Expression* value) { |
133 key_ = key; | 133 key_ = key; |
134 value_ = value; | 134 value_ = value; |
135 Object* k = *key->handle(); | 135 Object* k = *key->handle(); |
136 if (k->IsSymbol() && Heap::Proto_symbol()->Equals(String::cast(k))) { | 136 if (k->IsSymbol() && Heap::Proto_symbol()->Equals(String::cast(k))) { |
137 kind_ = PROTOTYPE; | 137 kind_ = PROTOTYPE; |
138 } else if (value_->AsObjectLiteral() != NULL) { | 138 } else if (value_->AsMaterializedLiteral() != NULL) { |
139 kind_ = OBJECT_LITERAL; | 139 kind_ = MATERIALIZED_LITERAL; |
| 140 } else if (value_->AsLiteral() != NULL) { |
| 141 kind_ = CONSTANT; |
140 } else { | 142 } else { |
141 kind_ = value_->AsLiteral() == NULL ? COMPUTED : CONSTANT; | 143 kind_ = COMPUTED; |
142 } | 144 } |
143 } | 145 } |
144 | 146 |
145 | 147 |
146 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) { | 148 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) { |
147 key_ = new Literal(value->name()); | 149 key_ = new Literal(value->name()); |
148 value_ = value; | 150 value_ = value; |
149 kind_ = is_getter ? GETTER : SETTER; | 151 kind_ = is_getter ? GETTER : SETTER; |
150 } | 152 } |
151 | 153 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 if (kInfinity - max_match_ < node_max_match) { | 481 if (kInfinity - max_match_ < node_max_match) { |
480 max_match_ = kInfinity; | 482 max_match_ = kInfinity; |
481 } else { | 483 } else { |
482 max_match_ += node->max_match(); | 484 max_match_ += node->max_match(); |
483 } | 485 } |
484 } | 486 } |
485 } | 487 } |
486 | 488 |
487 | 489 |
488 } } // namespace v8::internal | 490 } } // namespace v8::internal |
OLD | NEW |