| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1740 expected_arguments); | 1740 expected_arguments); |
| 1741 } | 1741 } |
| 1742 break; | 1742 break; |
| 1743 } | 1743 } |
| 1744 | 1744 |
| 1745 case LookupIterator::DATA: { | 1745 case LookupIterator::DATA: { |
| 1746 if (lookup->is_dictionary_holder()) { | 1746 if (lookup->is_dictionary_holder()) { |
| 1747 if (holder->IsGlobalObject()) { | 1747 if (holder->IsGlobalObject()) { |
| 1748 Handle<PropertyCell> cell = lookup->GetPropertyCell(); | 1748 Handle<PropertyCell> cell = lookup->GetPropertyCell(); |
| 1749 Handle<HeapType> union_type = PropertyCell::UpdatedType(cell, value); | 1749 Handle<HeapType> union_type = PropertyCell::UpdatedType(cell, value); |
| 1750 DCHECK(holder.is_identical_to(receiver) || |
| 1751 receiver->map()->prototype() == *holder); |
| 1750 StoreGlobalStub stub(isolate(), union_type->IsConstant(), | 1752 StoreGlobalStub stub(isolate(), union_type->IsConstant(), |
| 1751 receiver->IsJSGlobalProxy()); | 1753 receiver->IsJSGlobalProxy()); |
| 1752 Handle<Code> code = stub.GetCodeCopyFromTemplate( | 1754 Handle<Code> code = stub.GetCodeCopyFromTemplate( |
| 1753 Handle<GlobalObject>::cast(holder), cell); | 1755 Handle<GlobalObject>::cast(holder), cell); |
| 1754 // TODO(verwaest): Move caching of these NORMAL stubs outside as well. | 1756 // TODO(verwaest): Move caching of these NORMAL stubs outside as well. |
| 1755 HeapObject::UpdateMapCodeCache(receiver, lookup->name(), code); | 1757 HeapObject::UpdateMapCodeCache(receiver, lookup->name(), code); |
| 1756 return code; | 1758 return code; |
| 1757 } | 1759 } |
| 1758 DCHECK(holder.is_identical_to(receiver)); | 1760 DCHECK(holder.is_identical_to(receiver)); |
| 1759 return isolate()->builtins()->StoreIC_Normal(); | 1761 return isolate()->builtins()->StoreIC_Normal(); |
| (...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3000 static const Address IC_utilities[] = { | 3002 static const Address IC_utilities[] = { |
| 3001 #define ADDR(name) FUNCTION_ADDR(name), | 3003 #define ADDR(name) FUNCTION_ADDR(name), |
| 3002 IC_UTIL_LIST(ADDR) NULL | 3004 IC_UTIL_LIST(ADDR) NULL |
| 3003 #undef ADDR | 3005 #undef ADDR |
| 3004 }; | 3006 }; |
| 3005 | 3007 |
| 3006 | 3008 |
| 3007 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 3009 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
| 3008 } | 3010 } |
| 3009 } // namespace v8::internal | 3011 } // namespace v8::internal |
| OLD | NEW |