| 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) { |
| 139 kind_ = OBJECT_LITERAL; |
| 138 } else { | 140 } else { |
| 139 kind_ = value_->AsLiteral() == NULL ? COMPUTED : CONSTANT; | 141 kind_ = value_->AsLiteral() == NULL ? COMPUTED : CONSTANT; |
| 140 } | 142 } |
| 141 } | 143 } |
| 142 | 144 |
| 143 | 145 |
| 144 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) { | 146 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) { |
| 145 key_ = new Literal(value->name()); | 147 key_ = new Literal(value->name()); |
| 146 value_ = value; | 148 value_ = value; |
| 147 kind_ = is_getter ? GETTER : SETTER; | 149 kind_ = is_getter ? GETTER : SETTER; |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 if (kInfinity - max_match_ < node_max_match) { | 479 if (kInfinity - max_match_ < node_max_match) { |
| 478 max_match_ = kInfinity; | 480 max_match_ = kInfinity; |
| 479 } else { | 481 } else { |
| 480 max_match_ += node->max_match(); | 482 max_match_ += node->max_match(); |
| 481 } | 483 } |
| 482 } | 484 } |
| 483 } | 485 } |
| 484 | 486 |
| 485 | 487 |
| 486 } } // namespace v8::internal | 488 } } // namespace v8::internal |
| OLD | NEW |