| 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 6955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6966 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); | 6966 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); |
| 6967 __ b(eq, &normal_sequence); | 6967 __ b(eq, &normal_sequence); |
| 6968 __ ldr(r5, FieldMemOperand(r2, Cell::kValueOffset)); | 6968 __ ldr(r5, FieldMemOperand(r2, Cell::kValueOffset)); |
| 6969 __ ldr(r5, FieldMemOperand(r5, 0)); | 6969 __ ldr(r5, FieldMemOperand(r5, 0)); |
| 6970 __ CompareRoot(r5, Heap::kAllocationSiteMapRootIndex); | 6970 __ CompareRoot(r5, Heap::kAllocationSiteMapRootIndex); |
| 6971 __ b(ne, &normal_sequence); | 6971 __ b(ne, &normal_sequence); |
| 6972 | 6972 |
| 6973 // Save the resulting elements kind in type info | 6973 // Save the resulting elements kind in type info |
| 6974 __ SmiTag(r3); | 6974 __ SmiTag(r3); |
| 6975 __ ldr(r5, FieldMemOperand(r2, Cell::kValueOffset)); | 6975 __ ldr(r5, FieldMemOperand(r2, Cell::kValueOffset)); |
| 6976 __ str(r3, FieldMemOperand(r5, AllocationSite::kPayloadOffset)); | 6976 __ str(r3, FieldMemOperand(r5, AllocationSite::kTransitionInfoOffset)); |
| 6977 __ SmiUntag(r3); | 6977 __ SmiUntag(r3); |
| 6978 | 6978 |
| 6979 __ bind(&normal_sequence); | 6979 __ bind(&normal_sequence); |
| 6980 int last_index = GetSequenceIndexFromFastElementsKind( | 6980 int last_index = GetSequenceIndexFromFastElementsKind( |
| 6981 TERMINAL_FAST_ELEMENTS_KIND); | 6981 TERMINAL_FAST_ELEMENTS_KIND); |
| 6982 for (int i = 0; i <= last_index; ++i) { | 6982 for (int i = 0; i <= last_index; ++i) { |
| 6983 Label next; | 6983 Label next; |
| 6984 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); | 6984 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); |
| 6985 __ cmp(r3, Operand(kind)); | 6985 __ cmp(r3, Operand(kind)); |
| 6986 __ b(ne, &next); | 6986 __ b(ne, &next); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7074 | 7074 |
| 7075 // The type cell may have undefined in its value. | 7075 // The type cell may have undefined in its value. |
| 7076 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); | 7076 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); |
| 7077 __ b(eq, &no_info); | 7077 __ b(eq, &no_info); |
| 7078 | 7078 |
| 7079 // The type cell has either an AllocationSite or a JSFunction | 7079 // The type cell has either an AllocationSite or a JSFunction |
| 7080 __ ldr(r4, FieldMemOperand(r3, 0)); | 7080 __ ldr(r4, FieldMemOperand(r3, 0)); |
| 7081 __ CompareRoot(r4, Heap::kAllocationSiteMapRootIndex); | 7081 __ CompareRoot(r4, Heap::kAllocationSiteMapRootIndex); |
| 7082 __ b(ne, &no_info); | 7082 __ b(ne, &no_info); |
| 7083 | 7083 |
| 7084 __ ldr(r3, FieldMemOperand(r3, AllocationSite::kPayloadOffset)); | 7084 __ ldr(r3, FieldMemOperand(r3, AllocationSite::kTransitionInfoOffset)); |
| 7085 __ SmiUntag(r3); | 7085 __ SmiUntag(r3); |
| 7086 __ jmp(&switch_ready); | 7086 __ jmp(&switch_ready); |
| 7087 __ bind(&no_info); | 7087 __ bind(&no_info); |
| 7088 __ mov(r3, Operand(GetInitialFastElementsKind())); | 7088 __ mov(r3, Operand(GetInitialFastElementsKind())); |
| 7089 __ bind(&switch_ready); | 7089 __ bind(&switch_ready); |
| 7090 | 7090 |
| 7091 if (argument_count_ == ANY) { | 7091 if (argument_count_ == ANY) { |
| 7092 Label not_zero_case, not_one_case; | 7092 Label not_zero_case, not_one_case; |
| 7093 __ tst(r0, r0); | 7093 __ tst(r0, r0); |
| 7094 __ b(ne, ¬_zero_case); | 7094 __ b(ne, ¬_zero_case); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7196 __ bind(&fast_elements_case); | 7196 __ bind(&fast_elements_case); |
| 7197 GenerateCase(masm, FAST_ELEMENTS); | 7197 GenerateCase(masm, FAST_ELEMENTS); |
| 7198 } | 7198 } |
| 7199 | 7199 |
| 7200 | 7200 |
| 7201 #undef __ | 7201 #undef __ |
| 7202 | 7202 |
| 7203 } } // namespace v8::internal | 7203 } } // namespace v8::internal |
| 7204 | 7204 |
| 7205 #endif // V8_TARGET_ARCH_ARM | 7205 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |