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 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1082 __ bind(&call_runtime); | 1082 __ bind(&call_runtime); |
1083 __ push(eax); | 1083 __ push(eax); |
1084 __ CallRuntime(Runtime::kGetPropertyNamesFast, 1); | 1084 __ CallRuntime(Runtime::kGetPropertyNamesFast, 1); |
1085 __ cmp(FieldOperand(eax, HeapObject::kMapOffset), | 1085 __ cmp(FieldOperand(eax, HeapObject::kMapOffset), |
1086 isolate()->factory()->meta_map()); | 1086 isolate()->factory()->meta_map()); |
1087 __ j(not_equal, &fixed_array); | 1087 __ j(not_equal, &fixed_array); |
1088 | 1088 |
1089 | 1089 |
1090 // We got a map in register eax. Get the enumeration cache from it. | 1090 // We got a map in register eax. Get the enumeration cache from it. |
1091 __ bind(&use_cache); | 1091 __ bind(&use_cache); |
1092 | |
1093 Label no_descriptors; | |
Michael Starzinger
2012/08/06 15:06:22
Move this up above the __ bind() but below the com
Toon Verwaest
2012/08/07 10:49:47
Done.
| |
1094 | |
1095 __ EnumLength(edx, eax); | |
1096 __ cmp(edx, Immediate(0)); | |
1097 __ j(equal, &no_descriptors); | |
1098 | |
1092 __ LoadInstanceDescriptors(eax, ecx); | 1099 __ LoadInstanceDescriptors(eax, ecx); |
1093 __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumCacheOffset)); | 1100 __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumCacheOffset)); |
1094 __ mov(edx, FieldOperand(ecx, DescriptorArray::kEnumCacheBridgeCacheOffset)); | 1101 __ mov(ecx, FieldOperand(ecx, DescriptorArray::kEnumCacheBridgeCacheOffset)); |
1095 | 1102 |
1096 // Set up the four remaining stack slots. | 1103 // Set up the four remaining stack slots. |
1097 __ push(eax); // Map. | 1104 __ push(eax); // Map. |
1098 __ push(edx); // Enumeration cache. | 1105 __ push(ecx); // Enumeration cache. |
1099 __ mov(eax, FieldOperand(edx, FixedArray::kLengthOffset)); | 1106 __ SmiTag(edx); |
1100 __ push(eax); // Enumeration cache length (as smi). | 1107 __ push(edx); // Number of valid entries for the map in the enum cache. |
1101 __ push(Immediate(Smi::FromInt(0))); // Initial index. | 1108 __ push(Immediate(Smi::FromInt(0))); // Initial index. |
1102 __ jmp(&loop); | 1109 __ jmp(&loop); |
1103 | 1110 |
1111 __ bind(&no_descriptors); | |
1112 __ add(esp, Immediate(kPointerSize)); | |
1113 __ jmp(&exit); | |
1114 | |
1104 // We got a fixed array in register eax. Iterate through that. | 1115 // We got a fixed array in register eax. Iterate through that. |
1105 Label non_proxy; | 1116 Label non_proxy; |
1106 __ bind(&fixed_array); | 1117 __ bind(&fixed_array); |
1107 | 1118 |
1108 Handle<JSGlobalPropertyCell> cell = | 1119 Handle<JSGlobalPropertyCell> cell = |
1109 isolate()->factory()->NewJSGlobalPropertyCell( | 1120 isolate()->factory()->NewJSGlobalPropertyCell( |
1110 Handle<Object>( | 1121 Handle<Object>( |
1111 Smi::FromInt(TypeFeedbackCells::kForInFastCaseMarker))); | 1122 Smi::FromInt(TypeFeedbackCells::kForInFastCaseMarker))); |
1112 RecordTypeFeedbackCell(stmt->PrepareId(), cell); | 1123 RecordTypeFeedbackCell(stmt->PrepareId(), cell); |
1113 __ LoadHeapObject(ebx, cell); | 1124 __ LoadHeapObject(ebx, cell); |
(...skipping 3434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4548 *stack_depth = 0; | 4559 *stack_depth = 0; |
4549 *context_length = 0; | 4560 *context_length = 0; |
4550 return previous_; | 4561 return previous_; |
4551 } | 4562 } |
4552 | 4563 |
4553 #undef __ | 4564 #undef __ |
4554 | 4565 |
4555 } } // namespace v8::internal | 4566 } } // namespace v8::internal |
4556 | 4567 |
4557 #endif // V8_TARGET_ARCH_IA32 | 4568 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |