| 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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 __ mov(ecx, Operand(esp, 4 * kPointerSize)); | 1041 __ mov(ecx, Operand(esp, 4 * kPointerSize)); |
| 1042 __ cmp(edx, FieldOperand(ecx, HeapObject::kMapOffset)); | 1042 __ cmp(edx, FieldOperand(ecx, HeapObject::kMapOffset)); |
| 1043 __ j(equal, &update_each); | 1043 __ j(equal, &update_each); |
| 1044 | 1044 |
| 1045 // Convert the entry to a string or null if it isn't a property | 1045 // Convert the entry to a string or null if it isn't a property |
| 1046 // anymore. If the property has been removed while iterating, we | 1046 // anymore. If the property has been removed while iterating, we |
| 1047 // just skip it. | 1047 // just skip it. |
| 1048 __ push(ecx); // Enumerable. | 1048 __ push(ecx); // Enumerable. |
| 1049 __ push(ebx); // Current entry. | 1049 __ push(ebx); // Current entry. |
| 1050 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); | 1050 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); |
| 1051 __ cmp(eax, Factory::null_value()); | 1051 __ test(eax, Operand(eax)); |
| 1052 __ j(equal, loop_statement.continue_target()); | 1052 __ j(equal, loop_statement.continue_target()); |
| 1053 __ mov(ebx, Operand(eax)); | 1053 __ mov(ebx, Operand(eax)); |
| 1054 | 1054 |
| 1055 // Update the 'each' property or variable from the possibly filtered | 1055 // Update the 'each' property or variable from the possibly filtered |
| 1056 // entry in register ebx. | 1056 // entry in register ebx. |
| 1057 __ bind(&update_each); | 1057 __ bind(&update_each); |
| 1058 __ mov(result_register(), ebx); | 1058 __ mov(result_register(), ebx); |
| 1059 // Perform the assignment as if via '='. | 1059 // Perform the assignment as if via '='. |
| 1060 EmitAssignment(stmt->each()); | 1060 EmitAssignment(stmt->each()); |
| 1061 | 1061 |
| (...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3336 // And return. | 3336 // And return. |
| 3337 __ ret(0); | 3337 __ ret(0); |
| 3338 } | 3338 } |
| 3339 | 3339 |
| 3340 | 3340 |
| 3341 #undef __ | 3341 #undef __ |
| 3342 | 3342 |
| 3343 } } // namespace v8::internal | 3343 } } // namespace v8::internal |
| 3344 | 3344 |
| 3345 #endif // V8_TARGET_ARCH_IA32 | 3345 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |