| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 __ movq(rcx, Operand(rsp, 4 * kPointerSize)); | 1046 __ movq(rcx, Operand(rsp, 4 * kPointerSize)); |
| 1047 __ cmpq(rdx, FieldOperand(rcx, HeapObject::kMapOffset)); | 1047 __ cmpq(rdx, FieldOperand(rcx, HeapObject::kMapOffset)); |
| 1048 __ j(equal, &update_each); | 1048 __ j(equal, &update_each); |
| 1049 | 1049 |
| 1050 // Convert the entry to a string or null if it isn't a property | 1050 // Convert the entry to a string or null if it isn't a property |
| 1051 // anymore. If the property has been removed while iterating, we | 1051 // anymore. If the property has been removed while iterating, we |
| 1052 // just skip it. | 1052 // just skip it. |
| 1053 __ push(rcx); // Enumerable. | 1053 __ push(rcx); // Enumerable. |
| 1054 __ push(rbx); // Current entry. | 1054 __ push(rbx); // Current entry. |
| 1055 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); | 1055 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); |
| 1056 __ CompareRoot(rax, Heap::kNullValueRootIndex); | 1056 __ SmiCompare(rax, Smi::FromInt(0)); |
| 1057 __ j(equal, loop_statement.continue_target()); | 1057 __ j(equal, loop_statement.continue_target()); |
| 1058 __ movq(rbx, rax); | 1058 __ movq(rbx, rax); |
| 1059 | 1059 |
| 1060 // Update the 'each' property or variable from the possibly filtered | 1060 // Update the 'each' property or variable from the possibly filtered |
| 1061 // entry in register rbx. | 1061 // entry in register rbx. |
| 1062 __ bind(&update_each); | 1062 __ bind(&update_each); |
| 1063 __ movq(result_register(), rbx); | 1063 __ movq(result_register(), rbx); |
| 1064 // Perform the assignment as if via '='. | 1064 // Perform the assignment as if via '='. |
| 1065 EmitAssignment(stmt->each()); | 1065 EmitAssignment(stmt->each()); |
| 1066 | 1066 |
| (...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3327 __ ret(0); | 3327 __ ret(0); |
| 3328 } | 3328 } |
| 3329 | 3329 |
| 3330 | 3330 |
| 3331 #undef __ | 3331 #undef __ |
| 3332 | 3332 |
| 3333 | 3333 |
| 3334 } } // namespace v8::internal | 3334 } } // namespace v8::internal |
| 3335 | 3335 |
| 3336 #endif // V8_TARGET_ARCH_X64 | 3336 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |