OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 __ ldr(r2, MemOperand(sp, 3 * kPointerSize)); | 949 __ ldr(r2, MemOperand(sp, 3 * kPointerSize)); |
950 | 950 |
951 // Check if the expected map still matches that of the enumerable. | 951 // Check if the expected map still matches that of the enumerable. |
952 // If not, we have to filter the key. | 952 // If not, we have to filter the key. |
953 Label update_each; | 953 Label update_each; |
954 __ ldr(r1, MemOperand(sp, 4 * kPointerSize)); | 954 __ ldr(r1, MemOperand(sp, 4 * kPointerSize)); |
955 __ ldr(r4, FieldMemOperand(r1, HeapObject::kMapOffset)); | 955 __ ldr(r4, FieldMemOperand(r1, HeapObject::kMapOffset)); |
956 __ cmp(r4, Operand(r2)); | 956 __ cmp(r4, Operand(r2)); |
957 __ b(eq, &update_each); | 957 __ b(eq, &update_each); |
958 | 958 |
959 // Convert the entry to a string or null if it isn't a property | 959 // Convert the entry to a string or (smi) 0 if it isn't a property |
960 // anymore. If the property has been removed while iterating, we | 960 // any more. If the property has been removed while iterating, we |
961 // just skip it. | 961 // just skip it. |
962 __ push(r1); // Enumerable. | 962 __ push(r1); // Enumerable. |
963 __ push(r3); // Current entry. | 963 __ push(r3); // Current entry. |
964 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_JS); | 964 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_JS); |
965 __ mov(r3, Operand(r0)); | 965 __ mov(r3, Operand(r0), SetCC); |
966 __ LoadRoot(ip, Heap::kNullValueRootIndex); | |
967 __ cmp(r3, ip); | |
968 __ b(eq, loop_statement.continue_target()); | 966 __ b(eq, loop_statement.continue_target()); |
969 | 967 |
970 // Update the 'each' property or variable from the possibly filtered | 968 // Update the 'each' property or variable from the possibly filtered |
971 // entry in register r3. | 969 // entry in register r3. |
972 __ bind(&update_each); | 970 __ bind(&update_each); |
973 __ mov(result_register(), r3); | 971 __ mov(result_register(), r3); |
974 // Perform the assignment as if via '='. | 972 // Perform the assignment as if via '='. |
975 EmitAssignment(stmt->each()); | 973 EmitAssignment(stmt->each()); |
976 | 974 |
977 // Generate code for the body of the loop. | 975 // Generate code for the body of the loop. |
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3221 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 3219 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
3222 __ add(pc, r1, Operand(masm_->CodeObject())); | 3220 __ add(pc, r1, Operand(masm_->CodeObject())); |
3223 } | 3221 } |
3224 | 3222 |
3225 | 3223 |
3226 #undef __ | 3224 #undef __ |
3227 | 3225 |
3228 } } // namespace v8::internal | 3226 } } // namespace v8::internal |
3229 | 3227 |
3230 #endif // V8_TARGET_ARCH_ARM | 3228 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |