| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 JSObject::kElementsOffset)); | 985 JSObject::kElementsOffset)); |
| 986 Cmp(current_object, empty_fixed_array_value); | 986 Cmp(current_object, empty_fixed_array_value); |
| 987 B(ne, call_runtime); | 987 B(ne, call_runtime); |
| 988 | 988 |
| 989 Ldr(current_object, FieldMemOperand(map, Map::kPrototypeOffset)); | 989 Ldr(current_object, FieldMemOperand(map, Map::kPrototypeOffset)); |
| 990 Cmp(current_object, null_value); | 990 Cmp(current_object, null_value); |
| 991 B(ne, &next); | 991 B(ne, &next); |
| 992 } | 992 } |
| 993 | 993 |
| 994 | 994 |
| 995 void MacroAssembler::TestJSArrayForAllocationSiteInfo(Register receiver, | 995 void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver, |
| 996 Register scratch1, | 996 Register scratch1, |
| 997 Register scratch2) { | 997 Register scratch2) { |
| 998 Label no_info_available; | 998 Label no_memento_available; |
| 999 ExternalReference new_space_start = | 999 ExternalReference new_space_start = |
| 1000 ExternalReference::new_space_start(isolate()); | 1000 ExternalReference::new_space_start(isolate()); |
| 1001 ExternalReference new_space_allocation_top = | 1001 ExternalReference new_space_allocation_top = |
| 1002 ExternalReference::new_space_allocation_top_address(isolate()); | 1002 ExternalReference::new_space_allocation_top_address(isolate()); |
| 1003 | 1003 |
| 1004 Add(scratch1, receiver, | 1004 Add(scratch1, receiver, |
| 1005 JSArray::kSize + AllocationSiteInfo::kSize - kHeapObjectTag); | 1005 JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag); |
| 1006 Cmp(scratch1, Operand(new_space_start)); | 1006 Cmp(scratch1, Operand(new_space_start)); |
| 1007 B(lt, &no_info_available); | 1007 B(lt, &no_memento_available); |
| 1008 | 1008 |
| 1009 Mov(scratch2, Operand(new_space_allocation_top)); | 1009 Mov(scratch2, Operand(new_space_allocation_top)); |
| 1010 Ldr(scratch2, MemOperand(scratch2)); | 1010 Ldr(scratch2, MemOperand(scratch2)); |
| 1011 Cmp(scratch1, scratch2); | 1011 Cmp(scratch1, scratch2); |
| 1012 B(gt, &no_info_available); | 1012 B(gt, &no_memento_available); |
| 1013 | 1013 |
| 1014 Ldr(scratch1, MemOperand(scratch1, -AllocationSiteInfo::kSize)); | 1014 Ldr(scratch1, MemOperand(scratch1, -AllocationMemento::kSize)); |
| 1015 Cmp(scratch1, | 1015 Cmp(scratch1, |
| 1016 Operand(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); | 1016 Operand(Handle<Map>(isolate()->heap()->allocation_memento_map()))); |
| 1017 | 1017 |
| 1018 Bind(&no_info_available); | 1018 Bind(&no_memento_available); |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 | 1021 |
| 1022 void MacroAssembler::JumpToHandlerEntry(Register exception, | 1022 void MacroAssembler::JumpToHandlerEntry(Register exception, |
| 1023 Register object, | 1023 Register object, |
| 1024 Register state, | 1024 Register state, |
| 1025 Register scratch1, | 1025 Register scratch1, |
| 1026 Register scratch2) { | 1026 Register scratch2) { |
| 1027 // Handler expects argument in x0. | 1027 // Handler expects argument in x0. |
| 1028 ASSERT(exception.Is(x0)); | 1028 ASSERT(exception.Is(x0)); |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 And(scratch2, second, kFlatAsciiStringMask); | 2133 And(scratch2, second, kFlatAsciiStringMask); |
| 2134 Cmp(scratch1, kFlatAsciiStringTag); | 2134 Cmp(scratch1, kFlatAsciiStringTag); |
| 2135 Ccmp(scratch2, kFlatAsciiStringTag, NoFlag, eq); | 2135 Ccmp(scratch2, kFlatAsciiStringTag, NoFlag, eq); |
| 2136 B(ne, failure); | 2136 B(ne, failure); |
| 2137 } | 2137 } |
| 2138 | 2138 |
| 2139 | 2139 |
| 2140 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, | 2140 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, |
| 2141 Register scratch, | 2141 Register scratch, |
| 2142 Label* failure) { | 2142 Label* failure) { |
| 2143 static const int kFlatAsciiStringMask = | 2143 const int kFlatAsciiStringMask = |
| 2144 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; | 2144 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
| 2145 static const int kFlatAsciiStringTag = ASCII_STRING_TYPE; | 2145 const int kFlatAsciiStringTag = |
| 2146 kStringTag | kOneByteStringTag | kSeqStringTag; |
| 2146 And(scratch, type, kFlatAsciiStringMask); | 2147 And(scratch, type, kFlatAsciiStringMask); |
| 2147 Cmp(scratch, kFlatAsciiStringTag); | 2148 Cmp(scratch, kFlatAsciiStringTag); |
| 2148 B(ne, failure); | 2149 B(ne, failure); |
| 2149 } | 2150 } |
| 2150 | 2151 |
| 2151 | 2152 |
| 2152 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( | 2153 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( |
| 2153 Register first, | 2154 Register first, |
| 2154 Register second, | 2155 Register second, |
| 2155 Register scratch1, | 2156 Register scratch1, |
| 2156 Register scratch2, | 2157 Register scratch2, |
| 2157 Label* failure) { | 2158 Label* failure) { |
| 2158 ASSERT(!AreAliased(first, second, scratch1, scratch2)); | 2159 ASSERT(!AreAliased(first, second, scratch1, scratch2)); |
| 2159 static const int kFlatAsciiStringMask = | 2160 const int kFlatAsciiStringMask = |
| 2160 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; | 2161 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
| 2161 static const int kFlatAsciiStringTag = ASCII_STRING_TYPE; | 2162 const int kFlatAsciiStringTag = |
| 2163 kStringTag | kOneByteStringTag | kSeqStringTag; |
| 2162 And(scratch1, first, kFlatAsciiStringMask); | 2164 And(scratch1, first, kFlatAsciiStringMask); |
| 2163 And(scratch2, second, kFlatAsciiStringMask); | 2165 And(scratch2, second, kFlatAsciiStringMask); |
| 2164 Cmp(scratch1, kFlatAsciiStringTag); | 2166 Cmp(scratch1, kFlatAsciiStringTag); |
| 2165 Ccmp(scratch2, kFlatAsciiStringTag, NoFlag, eq); | 2167 Ccmp(scratch2, kFlatAsciiStringTag, NoFlag, eq); |
| 2166 B(ne, failure); | 2168 B(ne, failure); |
| 2167 } | 2169 } |
| 2168 | 2170 |
| 2169 | 2171 |
| 2170 void MacroAssembler::JumpIfNotUniqueName(Register type, | 2172 void MacroAssembler::JumpIfNotUniqueName(Register type, |
| 2171 Label* not_unique_name) { | 2173 Label* not_unique_name) { |
| 2172 STATIC_ASSERT(((SYMBOL_TYPE - 1) & kIsInternalizedMask) == kInternalizedTag); | 2174 STATIC_ASSERT((kInternalizedTag == 0) && (kStringTag == 0)); |
| 2173 // if ((type < kInternalizedTag) || (type > SYMBOL_TYPE)) { | 2175 // if ((type is string && type is internalized) || type == SYMBOL_TYPE) { |
| 2174 // goto not_unique_name; | 2176 // continue |
| 2177 // } else { |
| 2178 // goto not_unique_name |
| 2175 // } | 2179 // } |
| 2176 Cmp(type, kInternalizedTag); | 2180 Tst(type, kIsNotStringMask | kIsNotInternalizedMask); |
| 2177 Ccmp(type, SYMBOL_TYPE, NVFlag, ge); | 2181 Ccmp(type, SYMBOL_TYPE, ZFlag, ne); |
| 2178 B(gt, not_unique_name); | 2182 B(ne, not_unique_name); |
| 2179 } | 2183 } |
| 2180 | 2184 |
| 2181 | 2185 |
| 2182 void MacroAssembler::GenerateNumberUnaryOperation(Token::Value op, | 2186 void MacroAssembler::GenerateNumberUnaryOperation(Token::Value op, |
| 2183 InvokeFlag flag) { | 2187 InvokeFlag flag) { |
| 2184 Runtime::FunctionId fid; | 2188 Runtime::FunctionId fid; |
| 2185 switch (op) { | 2189 switch (op) { |
| 2186 case Token::ADD: | 2190 case Token::ADD: |
| 2187 // A unary add on a number (or SMI) does nothing. | 2191 // A unary add on a number (or SMI) does nothing. |
| 2188 if (flag == JUMP_FUNCTION) { | 2192 if (flag == JUMP_FUNCTION) { |
| (...skipping 2515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4704 } | 4708 } |
| 4705 } | 4709 } |
| 4706 | 4710 |
| 4707 | 4711 |
| 4708 #undef __ | 4712 #undef __ |
| 4709 | 4713 |
| 4710 | 4714 |
| 4711 } } // namespace v8::internal | 4715 } } // namespace v8::internal |
| 4712 | 4716 |
| 4713 #endif // V8_TARGET_ARCH_A64 | 4717 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |