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 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 scratch1, | 1926 scratch1, |
1927 scratch2); | 1927 scratch2); |
1928 } | 1928 } |
1929 | 1929 |
1930 | 1930 |
1931 void MacroAssembler::AllocateAsciiConsString(Register result, | 1931 void MacroAssembler::AllocateAsciiConsString(Register result, |
1932 Register length, | 1932 Register length, |
1933 Register scratch1, | 1933 Register scratch1, |
1934 Register scratch2, | 1934 Register scratch2, |
1935 Label* gc_required) { | 1935 Label* gc_required) { |
1936 Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required, | 1936 Label allocate_new_space, install_map; |
1937 TAG_OBJECT); | 1937 AllocationFlags flags = TAG_OBJECT; |
| 1938 |
| 1939 ExternalReference high_promotion_mode = ExternalReference:: |
| 1940 new_space_high_promotion_mode_active_address(isolate()); |
| 1941 mov(scratch1, Operand(high_promotion_mode)); |
| 1942 ldr(scratch1, MemOperand(r4, 0)); |
| 1943 cmp(scratch1, Operand::Zero()); |
| 1944 b(eq, &allocate_new_space); |
| 1945 |
| 1946 Allocate(ConsString::kSize, |
| 1947 result, |
| 1948 scratch1, |
| 1949 scratch2, |
| 1950 gc_required, |
| 1951 static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE)); |
| 1952 |
| 1953 jmp(&install_map); |
| 1954 |
| 1955 bind(&allocate_new_space); |
| 1956 Allocate(ConsString::kSize, |
| 1957 result, |
| 1958 scratch1, |
| 1959 scratch2, |
| 1960 gc_required, |
| 1961 flags); |
| 1962 |
| 1963 bind(&install_map); |
1938 | 1964 |
1939 InitializeNewString(result, | 1965 InitializeNewString(result, |
1940 length, | 1966 length, |
1941 Heap::kConsAsciiStringMapRootIndex, | 1967 Heap::kConsAsciiStringMapRootIndex, |
1942 scratch1, | 1968 scratch1, |
1943 scratch2); | 1969 scratch2); |
1944 } | 1970 } |
1945 | 1971 |
1946 | 1972 |
1947 void MacroAssembler::AllocateTwoByteSlicedString(Register result, | 1973 void MacroAssembler::AllocateTwoByteSlicedString(Register result, |
(...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3832 void CodePatcher::EmitCondition(Condition cond) { | 3858 void CodePatcher::EmitCondition(Condition cond) { |
3833 Instr instr = Assembler::instr_at(masm_.pc_); | 3859 Instr instr = Assembler::instr_at(masm_.pc_); |
3834 instr = (instr & ~kCondMask) | cond; | 3860 instr = (instr & ~kCondMask) | cond; |
3835 masm_.emit(instr); | 3861 masm_.emit(instr); |
3836 } | 3862 } |
3837 | 3863 |
3838 | 3864 |
3839 } } // namespace v8::internal | 3865 } } // namespace v8::internal |
3840 | 3866 |
3841 #endif // V8_TARGET_ARCH_ARM | 3867 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |