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 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2773 } | 2773 } |
2774 | 2774 |
2775 | 2775 |
2776 // Check for cases where EmitLoadFieldOrConstantFunction needs to walk the | 2776 // Check for cases where EmitLoadFieldOrConstantFunction needs to walk the |
2777 // prototype chain, which causes unbounded code generation. | 2777 // prototype chain, which causes unbounded code generation. |
2778 static bool CompactEmit(SmallMapList* list, | 2778 static bool CompactEmit(SmallMapList* list, |
2779 Handle<String> name, | 2779 Handle<String> name, |
2780 int i, | 2780 int i, |
2781 Isolate* isolate) { | 2781 Isolate* isolate) { |
2782 Handle<Map> map = list->at(i); | 2782 Handle<Map> map = list->at(i); |
2783 // If the map has ElementsKind transitions, we will generate map checks | |
2784 // for each kind in __ CompareMap(..., ALLOW_ELEMENTS_TRANSITION_MAPS). | |
2785 if (map->HasElementsTransition()) return false; | |
2786 LookupResult lookup(isolate); | 2783 LookupResult lookup(isolate); |
2787 map->LookupDescriptor(NULL, *name, &lookup); | 2784 map->LookupDescriptor(NULL, *name, &lookup); |
2788 return lookup.IsField() || lookup.IsConstant(); | 2785 return lookup.IsField() || lookup.IsConstant(); |
2789 } | 2786 } |
2790 | 2787 |
2791 | 2788 |
2792 void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) { | 2789 void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) { |
2793 Register object = ToRegister(instr->object()); | 2790 Register object = ToRegister(instr->object()); |
2794 Register result = ToRegister(instr->result()); | 2791 Register result = ToRegister(instr->result()); |
2795 | 2792 |
(...skipping 2778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5574 FixedArray::kHeaderSize - kPointerSize)); | 5571 FixedArray::kHeaderSize - kPointerSize)); |
5575 __ bind(&done); | 5572 __ bind(&done); |
5576 } | 5573 } |
5577 | 5574 |
5578 | 5575 |
5579 #undef __ | 5576 #undef __ |
5580 | 5577 |
5581 } } // namespace v8::internal | 5578 } } // namespace v8::internal |
5582 | 5579 |
5583 #endif // V8_TARGET_ARCH_X64 | 5580 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |