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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 __ push(rax); // Map. | 962 __ push(rax); // Map. |
963 __ push(rdx); // Enumeration cache. | 963 __ push(rdx); // Enumeration cache. |
964 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset)); | 964 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset)); |
965 __ push(rax); // Enumeration cache length (as smi). | 965 __ push(rax); // Enumeration cache length (as smi). |
966 __ Push(Smi::FromInt(0)); // Initial index. | 966 __ Push(Smi::FromInt(0)); // Initial index. |
967 __ jmp(&loop); | 967 __ jmp(&loop); |
968 | 968 |
969 // We got a fixed array in register rax. Iterate through that. | 969 // We got a fixed array in register rax. Iterate through that. |
970 Label non_proxy; | 970 Label non_proxy; |
971 __ bind(&fixed_array); | 971 __ bind(&fixed_array); |
| 972 |
| 973 Handle<JSGlobalPropertyCell> cell = |
| 974 isolate()->factory()->NewJSGlobalPropertyCell( |
| 975 Handle<Object>( |
| 976 Smi::FromInt(TypeFeedbackCells::kForInFastCaseMarker))); |
| 977 RecordTypeFeedbackCell(stmt->PrepareId(), cell); |
| 978 __ LoadHeapObject(rbx, cell); |
| 979 __ Move(FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset), |
| 980 Smi::FromInt(TypeFeedbackCells::kForInSlowCaseMarker)); |
| 981 |
972 __ Move(rbx, Smi::FromInt(1)); // Smi indicates slow check | 982 __ Move(rbx, Smi::FromInt(1)); // Smi indicates slow check |
973 __ movq(rcx, Operand(rsp, 0 * kPointerSize)); // Get enumerated object | 983 __ movq(rcx, Operand(rsp, 0 * kPointerSize)); // Get enumerated object |
974 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 984 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
975 __ CmpObjectType(rcx, LAST_JS_PROXY_TYPE, rcx); | 985 __ CmpObjectType(rcx, LAST_JS_PROXY_TYPE, rcx); |
976 __ j(above, &non_proxy); | 986 __ j(above, &non_proxy); |
977 __ Move(rbx, Smi::FromInt(0)); // Zero indicates proxy | 987 __ Move(rbx, Smi::FromInt(0)); // Zero indicates proxy |
978 __ bind(&non_proxy); | 988 __ bind(&non_proxy); |
979 __ push(rbx); // Smi | 989 __ push(rbx); // Smi |
980 __ push(rax); // Array | 990 __ push(rax); // Array |
981 __ movq(rax, FieldOperand(rax, FixedArray::kLengthOffset)); | 991 __ movq(rax, FieldOperand(rax, FixedArray::kLengthOffset)); |
(...skipping 3371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4353 *context_length = 0; | 4363 *context_length = 0; |
4354 return previous_; | 4364 return previous_; |
4355 } | 4365 } |
4356 | 4366 |
4357 | 4367 |
4358 #undef __ | 4368 #undef __ |
4359 | 4369 |
4360 } } // namespace v8::internal | 4370 } } // namespace v8::internal |
4361 | 4371 |
4362 #endif // V8_TARGET_ARCH_X64 | 4372 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |