| 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 4454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4465 if (CompileTimeValue::IsCompileTimeValue(property->value())) break; | 4465 if (CompileTimeValue::IsCompileTimeValue(property->value())) break; |
| 4466 // else fall through. | 4466 // else fall through. |
| 4467 case ObjectLiteral::Property::COMPUTED: { | 4467 case ObjectLiteral::Property::COMPUTED: { |
| 4468 Handle<Object> key(property->key()->handle()); | 4468 Handle<Object> key(property->key()->handle()); |
| 4469 if (key->IsSymbol()) { | 4469 if (key->IsSymbol()) { |
| 4470 // Duplicate the object as the IC receiver. | 4470 // Duplicate the object as the IC receiver. |
| 4471 frame_->Dup(); | 4471 frame_->Dup(); |
| 4472 Load(property->value()); | 4472 Load(property->value()); |
| 4473 frame_->Push(key); | 4473 frame_->Push(key); |
| 4474 Result ignored = frame_->CallStoreIC(); | 4474 Result ignored = frame_->CallStoreIC(); |
| 4475 // Drop the duplicated receiver and ignore the result. | |
| 4476 frame_->Drop(); | |
| 4477 break; | 4475 break; |
| 4478 } | 4476 } |
| 4479 // Fall through | 4477 // Fall through |
| 4480 } | 4478 } |
| 4481 case ObjectLiteral::Property::PROTOTYPE: { | 4479 case ObjectLiteral::Property::PROTOTYPE: { |
| 4482 // Duplicate the object as an argument to the runtime call. | 4480 // Duplicate the object as an argument to the runtime call. |
| 4483 frame_->Dup(); | 4481 frame_->Dup(); |
| 4484 Load(property->key()); | 4482 Load(property->key()); |
| 4485 Load(property->value()); | 4483 Load(property->value()); |
| 4486 Result ignored = frame_->CallRuntime(Runtime::kSetProperty, 3); | 4484 Result ignored = frame_->CallRuntime(Runtime::kSetProperty, 3); |
| (...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6708 cgen_->StoreToSlot(slot, init_state); | 6706 cgen_->StoreToSlot(slot, init_state); |
| 6709 cgen_->UnloadReference(this); | 6707 cgen_->UnloadReference(this); |
| 6710 break; | 6708 break; |
| 6711 } | 6709 } |
| 6712 | 6710 |
| 6713 case NAMED: { | 6711 case NAMED: { |
| 6714 Comment cmnt(masm, "[ Store to named Property"); | 6712 Comment cmnt(masm, "[ Store to named Property"); |
| 6715 cgen_->frame()->Push(GetName()); | 6713 cgen_->frame()->Push(GetName()); |
| 6716 Result answer = cgen_->frame()->CallStoreIC(); | 6714 Result answer = cgen_->frame()->CallStoreIC(); |
| 6717 cgen_->frame()->Push(&answer); | 6715 cgen_->frame()->Push(&answer); |
| 6718 cgen_->UnloadReference(this); | 6716 set_unloaded(); |
| 6719 break; | 6717 break; |
| 6720 } | 6718 } |
| 6721 | 6719 |
| 6722 case KEYED: { | 6720 case KEYED: { |
| 6723 Comment cmnt(masm, "[ Store to keyed Property"); | 6721 Comment cmnt(masm, "[ Store to keyed Property"); |
| 6724 | 6722 |
| 6725 // Generate inlined version of the keyed store if the code is in | 6723 // Generate inlined version of the keyed store if the code is in |
| 6726 // a loop and the key is likely to be a smi. | 6724 // a loop and the key is likely to be a smi. |
| 6727 Property* property = expression()->AsProperty(); | 6725 Property* property = expression()->AsProperty(); |
| 6728 ASSERT(property != NULL); | 6726 ASSERT(property != NULL); |
| (...skipping 3376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10105 | 10103 |
| 10106 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 10104 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
| 10107 // tagged as a small integer. | 10105 // tagged as a small integer. |
| 10108 __ bind(&runtime); | 10106 __ bind(&runtime); |
| 10109 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); | 10107 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); |
| 10110 } | 10108 } |
| 10111 | 10109 |
| 10112 #undef __ | 10110 #undef __ |
| 10113 | 10111 |
| 10114 } } // namespace v8::internal | 10112 } } // namespace v8::internal |
| OLD | NEW |