| 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 Handle<Object> placeholer_value(Smi::FromInt(0), isolate()); | 846 Handle<Object> placeholer_value(Smi::FromInt(0), isolate()); |
| 847 Handle<PropertyCell> placeholder_cell = | 847 Handle<PropertyCell> placeholder_cell = |
| 848 isolate()->factory()->NewPropertyCell(placeholer_value); | 848 isolate()->factory()->NewPropertyCell(placeholer_value); |
| 849 | 849 |
| 850 HParameter* receiver = GetParameter(0); | 850 HParameter* receiver = GetParameter(0); |
| 851 HParameter* value = GetParameter(2); | 851 HParameter* value = GetParameter(2); |
| 852 | 852 |
| 853 // Check that the map of the global has not changed: use a placeholder map | 853 // Check that the map of the global has not changed: use a placeholder map |
| 854 // that will be replaced later with the global object's map. | 854 // that will be replaced later with the global object's map. |
| 855 Handle<Map> placeholder_map = isolate()->factory()->meta_map(); | 855 Handle<Map> placeholder_map = isolate()->factory()->meta_map(); |
| 856 AddInstruction(HCheckMaps::New(receiver, placeholder_map, zone())); | 856 AddInstruction(HCheckMaps::New( |
| 857 receiver, placeholder_map, zone(), top_info())); |
| 857 | 858 |
| 858 HValue* cell = Add<HConstant>(placeholder_cell, Representation::Tagged()); | 859 HValue* cell = Add<HConstant>(placeholder_cell, Representation::Tagged()); |
| 859 HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); | 860 HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); |
| 860 HValue* cell_contents = Add<HLoadNamedField>(cell, access); | 861 HValue* cell_contents = Add<HLoadNamedField>(cell, access); |
| 861 | 862 |
| 862 if (stub->is_constant()) { | 863 if (stub->is_constant()) { |
| 863 IfBuilder builder(this); | 864 IfBuilder builder(this); |
| 864 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); | 865 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); |
| 865 builder.Then(); | 866 builder.Then(); |
| 866 builder.ElseDeopt(); | 867 builder.ElseDeopt(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 return value; | 918 return value; |
| 918 } | 919 } |
| 919 | 920 |
| 920 | 921 |
| 921 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() { | 922 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() { |
| 922 return DoGenerateCode(this); | 923 return DoGenerateCode(this); |
| 923 } | 924 } |
| 924 | 925 |
| 925 | 926 |
| 926 } } // namespace v8::internal | 927 } } // namespace v8::internal |
| OLD | NEW |