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 3145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3156 } | 3156 } |
3157 | 3157 |
3158 | 3158 |
3159 // Check for cases where EmitLoadFieldOrConstantFunction needs to walk the | 3159 // Check for cases where EmitLoadFieldOrConstantFunction needs to walk the |
3160 // prototype chain, which causes unbounded code generation. | 3160 // prototype chain, which causes unbounded code generation. |
3161 static bool CompactEmit(SmallMapList* list, | 3161 static bool CompactEmit(SmallMapList* list, |
3162 Handle<String> name, | 3162 Handle<String> name, |
3163 int i, | 3163 int i, |
3164 Isolate* isolate) { | 3164 Isolate* isolate) { |
3165 Handle<Map> map = list->at(i); | 3165 Handle<Map> map = list->at(i); |
3166 // If the map has ElementsKind transitions, we will generate map checks | |
3167 // for each kind in __ CompareMap(..., ALLOW_ELEMENTS_TRANSITION_MAPS). | |
3168 if (map->HasElementsTransition()) return false; | |
3169 LookupResult lookup(isolate); | 3166 LookupResult lookup(isolate); |
3170 map->LookupDescriptor(NULL, *name, &lookup); | 3167 map->LookupDescriptor(NULL, *name, &lookup); |
3171 return lookup.IsField() || lookup.IsConstant(); | 3168 return lookup.IsField() || lookup.IsConstant(); |
3172 } | 3169 } |
3173 | 3170 |
3174 | 3171 |
3175 void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) { | 3172 void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) { |
3176 Register object = ToRegister(instr->object()); | 3173 Register object = ToRegister(instr->object()); |
3177 Register result = ToRegister(instr->result()); | 3174 Register result = ToRegister(instr->result()); |
3178 | 3175 |
(...skipping 3344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6523 FixedArray::kHeaderSize - kPointerSize)); | 6520 FixedArray::kHeaderSize - kPointerSize)); |
6524 __ bind(&done); | 6521 __ bind(&done); |
6525 } | 6522 } |
6526 | 6523 |
6527 | 6524 |
6528 #undef __ | 6525 #undef __ |
6529 | 6526 |
6530 } } // namespace v8::internal | 6527 } } // namespace v8::internal |
6531 | 6528 |
6532 #endif // V8_TARGET_ARCH_IA32 | 6529 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |