OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 HValue* HGraphBuilder::BuildCreateAllocationMemento(HValue* previous_object, | 1824 HValue* HGraphBuilder::BuildCreateAllocationMemento(HValue* previous_object, |
1825 int previous_object_size, | 1825 int previous_object_size, |
1826 HValue* alloc_site) { | 1826 HValue* alloc_site) { |
1827 // TODO(mvstanton): ASSERT altered to CHECK to diagnose chromium bug 284577 | 1827 // TODO(mvstanton): ASSERT altered to CHECK to diagnose chromium bug 284577 |
1828 CHECK(alloc_site != NULL); | 1828 CHECK(alloc_site != NULL); |
1829 HInnerAllocatedObject* alloc_memento = Add<HInnerAllocatedObject>( | 1829 HInnerAllocatedObject* alloc_memento = Add<HInnerAllocatedObject>( |
1830 previous_object, previous_object_size); | 1830 previous_object, previous_object_size); |
1831 Handle<Map> alloc_memento_map( | 1831 Handle<Map> alloc_memento_map( |
1832 isolate()->heap()->allocation_memento_map()); | 1832 isolate()->heap()->allocation_memento_map()); |
1833 AddStoreMapConstant(alloc_memento, alloc_memento_map); | 1833 AddStoreMapConstant(alloc_memento, alloc_memento_map); |
| 1834 |
| 1835 // TODO(mvstanton): the code below is turned on to diagnose chromium bug |
| 1836 // 284577. |
| 1837 Handle<Map> alloc_site_map(isolate()->heap()->allocation_site_map()); |
| 1838 IfBuilder builder(this); |
| 1839 // Read the map |
| 1840 HValue* map_field = Add<HLoadNamedField>(alloc_site, |
| 1841 HObjectAccess::ForMap()); |
| 1842 HValue* alloc_site_map_value = Add<HConstant>(alloc_site_map); |
| 1843 builder.IfNot<HCompareObjectEqAndBranch>(map_field, alloc_site_map_value); |
| 1844 builder.Then(); |
| 1845 AddInstruction(new(zone()) HDebugBreak()); |
| 1846 builder.End(); |
| 1847 |
1834 HObjectAccess access = HObjectAccess::ForAllocationMementoSite(); | 1848 HObjectAccess access = HObjectAccess::ForAllocationMementoSite(); |
1835 Add<HStoreNamedField>(alloc_memento, access, alloc_site); | 1849 Add<HStoreNamedField>(alloc_memento, access, alloc_site); |
1836 return alloc_memento; | 1850 return alloc_memento; |
1837 } | 1851 } |
1838 | 1852 |
1839 | 1853 |
1840 HInstruction* HGraphBuilder::BuildGetNativeContext() { | 1854 HInstruction* HGraphBuilder::BuildGetNativeContext() { |
1841 // Get the global context, then the native context | 1855 // Get the global context, then the native context |
1842 HInstruction* global_object = Add<HGlobalObject>(); | 1856 HInstruction* global_object = Add<HGlobalObject>(); |
1843 HObjectAccess access = HObjectAccess::ForJSObjectOffset( | 1857 HObjectAccess access = HObjectAccess::ForJSObjectOffset( |
(...skipping 7836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9680 if (ShouldProduceTraceOutput()) { | 9694 if (ShouldProduceTraceOutput()) { |
9681 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9695 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9682 } | 9696 } |
9683 | 9697 |
9684 #ifdef DEBUG | 9698 #ifdef DEBUG |
9685 graph_->Verify(false); // No full verify. | 9699 graph_->Verify(false); // No full verify. |
9686 #endif | 9700 #endif |
9687 } | 9701 } |
9688 | 9702 |
9689 } } // namespace v8::internal | 9703 } } // namespace v8::internal |
OLD | NEW |