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 4753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4764 } | 4764 } |
4765 private: | 4765 private: |
4766 static const int kMaxCount = 4; | 4766 static const int kMaxCount = 4; |
4767 int count_; | 4767 int count_; |
4768 Handle<Map> find_[kMaxCount]; | 4768 Handle<Map> find_[kMaxCount]; |
4769 Handle<Object> replace_[kMaxCount]; | 4769 Handle<Object> replace_[kMaxCount]; |
4770 friend class Code; | 4770 friend class Code; |
4771 }; | 4771 }; |
4772 | 4772 |
4773 | 4773 |
| 4774 bool Code::IsWeakObjectInIC(Object* object) { |
| 4775 ASSERT(is_weak_stub()); |
| 4776 return object->IsMap() && Map::cast(object)->CanTransition() && |
| 4777 FLAG_collect_maps && |
| 4778 FLAG_weak_embedded_maps_in_ic; |
| 4779 } |
| 4780 |
| 4781 |
4774 Object* Map::prototype() { | 4782 Object* Map::prototype() { |
4775 return READ_FIELD(this, kPrototypeOffset); | 4783 return READ_FIELD(this, kPrototypeOffset); |
4776 } | 4784 } |
4777 | 4785 |
4778 | 4786 |
4779 void Map::set_prototype(Object* value, WriteBarrierMode mode) { | 4787 void Map::set_prototype(Object* value, WriteBarrierMode mode) { |
4780 ASSERT(value->IsNull() || value->IsJSReceiver()); | 4788 ASSERT(value->IsNull() || value->IsJSReceiver()); |
4781 WRITE_FIELD(this, kPrototypeOffset, value); | 4789 WRITE_FIELD(this, kPrototypeOffset, value); |
4782 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kPrototypeOffset, value, mode); | 4790 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kPrototypeOffset, value, mode); |
4783 } | 4791 } |
(...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6941 #undef READ_UINT32_FIELD | 6949 #undef READ_UINT32_FIELD |
6942 #undef WRITE_UINT32_FIELD | 6950 #undef WRITE_UINT32_FIELD |
6943 #undef READ_SHORT_FIELD | 6951 #undef READ_SHORT_FIELD |
6944 #undef WRITE_SHORT_FIELD | 6952 #undef WRITE_SHORT_FIELD |
6945 #undef READ_BYTE_FIELD | 6953 #undef READ_BYTE_FIELD |
6946 #undef WRITE_BYTE_FIELD | 6954 #undef WRITE_BYTE_FIELD |
6947 | 6955 |
6948 } } // namespace v8::internal | 6956 } } // namespace v8::internal |
6949 | 6957 |
6950 #endif // V8_OBJECTS_INL_H_ | 6958 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |