| 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 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2314 current = | 2314 current = |
| 2315 Handle<HeapObject>(HeapObject::cast(current->map()->prototype())); | 2315 Handle<HeapObject>(HeapObject::cast(current->map()->prototype())); |
| 2316 } | 2316 } |
| 2317 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 2317 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); |
| 2318 } | 2318 } |
| 2319 } | 2319 } |
| 2320 | 2320 |
| 2321 | 2321 |
| 2322 // Check for cases where EmitLoadFieldOrConstantFunction needs to walk the | 2322 // Check for cases where EmitLoadFieldOrConstantFunction needs to walk the |
| 2323 // prototype chain, which causes unbounded code generation. | 2323 // prototype chain, which causes unbounded code generation. |
| 2324 static bool CompactEmit( | 2324 static bool CompactEmit(SmallMapList* list, |
| 2325 SmallMapList* list, Handle<String> name, int i, Isolate* isolate) { | 2325 Handle<String> name, |
| 2326 int i, |
| 2327 Isolate* isolate) { |
| 2328 Handle<Map> map = list->at(i); |
| 2329 // If the map has ElementsKind transitions, we will generate map checks |
| 2330 // for each kind in __ CompareMap(..., ALLOW_ELEMENTS_TRANSITION_MAPS). |
| 2331 if (map->elements_transition_map() != NULL) return false; |
| 2326 LookupResult lookup(isolate); | 2332 LookupResult lookup(isolate); |
| 2327 Handle<Map> map = list->at(i); | |
| 2328 map->LookupInDescriptors(NULL, *name, &lookup); | 2333 map->LookupInDescriptors(NULL, *name, &lookup); |
| 2329 return lookup.IsField() || lookup.IsConstantFunction(); | 2334 return lookup.IsField() || lookup.IsConstantFunction(); |
| 2330 } | 2335 } |
| 2331 | 2336 |
| 2332 | 2337 |
| 2333 void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) { | 2338 void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) { |
| 2334 Register object = ToRegister(instr->object()); | 2339 Register object = ToRegister(instr->object()); |
| 2335 Register result = ToRegister(instr->result()); | 2340 Register result = ToRegister(instr->result()); |
| 2336 | 2341 |
| 2337 int map_count = instr->hydrogen()->types()->length(); | 2342 int map_count = instr->hydrogen()->types()->length(); |
| (...skipping 2692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5030 FixedArray::kHeaderSize - kPointerSize)); | 5035 FixedArray::kHeaderSize - kPointerSize)); |
| 5031 __ bind(&done); | 5036 __ bind(&done); |
| 5032 } | 5037 } |
| 5033 | 5038 |
| 5034 | 5039 |
| 5035 #undef __ | 5040 #undef __ |
| 5036 | 5041 |
| 5037 } } // namespace v8::internal | 5042 } } // namespace v8::internal |
| 5038 | 5043 |
| 5039 #endif // V8_TARGET_ARCH_X64 | 5044 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |