| 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 3414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3425 frame_->Push(&boilerplate); | 3425 frame_->Push(&boilerplate); |
| 3426 // Clone the boilerplate object. | 3426 // Clone the boilerplate object. |
| 3427 Result clone = | 3427 Result clone = |
| 3428 frame_->CallRuntime(Runtime::kCloneObjectLiteralBoilerplate, 1); | 3428 frame_->CallRuntime(Runtime::kCloneObjectLiteralBoilerplate, 1); |
| 3429 // Push the newly cloned literal object as the result. | 3429 // Push the newly cloned literal object as the result. |
| 3430 frame_->Push(&clone); | 3430 frame_->Push(&clone); |
| 3431 | 3431 |
| 3432 for (int i = 0; i < node->properties()->length(); i++) { | 3432 for (int i = 0; i < node->properties()->length(); i++) { |
| 3433 ObjectLiteral::Property* property = node->properties()->at(i); | 3433 ObjectLiteral::Property* property = node->properties()->at(i); |
| 3434 switch (property->kind()) { | 3434 switch (property->kind()) { |
| 3435 case ObjectLiteral::Property::CONSTANT: break; | 3435 case ObjectLiteral::Property::CONSTANT: |
| 3436 break; |
| 3437 case ObjectLiteral::Property::OBJECT_LITERAL: |
| 3438 if (property->value()->AsObjectLiteral()->is_simple()) break; |
| 3436 case ObjectLiteral::Property::COMPUTED: { | 3439 case ObjectLiteral::Property::COMPUTED: { |
| 3437 Handle<Object> key(property->key()->handle()); | 3440 Handle<Object> key(property->key()->handle()); |
| 3438 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); | 3441 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); |
| 3439 if (key->IsSymbol()) { | 3442 if (key->IsSymbol()) { |
| 3440 // Duplicate the object as the IC receiver. | 3443 // Duplicate the object as the IC receiver. |
| 3441 frame_->Dup(); | 3444 frame_->Dup(); |
| 3442 Load(property->value()); | 3445 Load(property->value()); |
| 3443 Result value = frame_->Pop(); | 3446 Result value = frame_->Pop(); |
| 3444 value.ToRegister(eax); | 3447 value.ToRegister(eax); |
| 3445 | 3448 |
| (...skipping 3370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6816 | 6819 |
| 6817 // Slow-case: Go through the JavaScript implementation. | 6820 // Slow-case: Go through the JavaScript implementation. |
| 6818 __ bind(&slow); | 6821 __ bind(&slow); |
| 6819 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 6822 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 6820 } | 6823 } |
| 6821 | 6824 |
| 6822 | 6825 |
| 6823 #undef __ | 6826 #undef __ |
| 6824 | 6827 |
| 6825 } } // namespace v8::internal | 6828 } } // namespace v8::internal |
| OLD | NEW |