OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4677 // If the inherited property could induce readonly-ness, bail out. | 4677 // If the inherited property could induce readonly-ness, bail out. |
4678 if (proto_result.IsReadOnly() || !proto_result.IsCacheable()) { | 4678 if (proto_result.IsReadOnly() || !proto_result.IsCacheable()) { |
4679 Bailout("improper object on prototype chain for store"); | 4679 Bailout("improper object on prototype chain for store"); |
4680 return NULL; | 4680 return NULL; |
4681 } | 4681 } |
4682 // We only need to check up to the preexisting property. | 4682 // We only need to check up to the preexisting property. |
4683 proto = proto_result.holder(); | 4683 proto = proto_result.holder(); |
4684 } else { | 4684 } else { |
4685 // Otherwise, find the top prototype. | 4685 // Otherwise, find the top prototype. |
4686 while (proto->GetPrototype()->IsJSObject()) proto = proto->GetPrototype(); | 4686 while (proto->GetPrototype()->IsJSObject()) proto = proto->GetPrototype(); |
| 4687 ASSERT(proto->GetPrototype()->IsNull()); |
4687 } | 4688 } |
4688 ASSERT(proto->IsJSObject()); | 4689 ASSERT(proto->IsJSObject()); |
4689 AddInstruction(new(zone()) HCheckPrototypeMaps( | 4690 AddInstruction(new(zone()) HCheckPrototypeMaps( |
4690 Handle<JSObject>(JSObject::cast(type->prototype())), | 4691 Handle<JSObject>(JSObject::cast(type->prototype())), |
4691 Handle<JSObject>(JSObject::cast(proto)))); | 4692 Handle<JSObject>(JSObject::cast(proto)))); |
4692 } | 4693 } |
4693 | 4694 |
4694 int index = ComputeLoadStoreFieldIndex(type, name, lookup); | 4695 int index = ComputeLoadStoreFieldIndex(type, name, lookup); |
4695 bool is_in_object = index < 0; | 4696 bool is_in_object = index < 0; |
4696 int offset = index * kPointerSize; | 4697 int offset = index * kPointerSize; |
(...skipping 4429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9126 } | 9127 } |
9127 } | 9128 } |
9128 | 9129 |
9129 #ifdef DEBUG | 9130 #ifdef DEBUG |
9130 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 9131 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
9131 if (allocator_ != NULL) allocator_->Verify(); | 9132 if (allocator_ != NULL) allocator_->Verify(); |
9132 #endif | 9133 #endif |
9133 } | 9134 } |
9134 | 9135 |
9135 } } // namespace v8::internal | 9136 } } // namespace v8::internal |
OLD | NEW |