| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // The intrinsic code below is executed before a method has built its frame. | 5 // The intrinsic code below is executed before a method has built its frame. |
| 6 // The return address is on the stack and the arguments below it. | 6 // The return address is on the stack and the arguments below it. |
| 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. | 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. |
| 8 // Each intrinsification method returns true if the corresponding | 8 // Each intrinsification method returns true if the corresponding |
| 9 // Dart method was intrinsified. | 9 // Dart method was intrinsified. |
| 10 | 10 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 case 4: return TIMES_4; | 287 case 4: return TIMES_4; |
| 288 case 8: return TIMES_8; | 288 case 8: return TIMES_8; |
| 289 case 16: return TIMES_16; | 289 case 16: return TIMES_16; |
| 290 } | 290 } |
| 291 UNREACHABLE(); | 291 UNREACHABLE(); |
| 292 return static_cast<ScaleFactor>(0); | 292 return static_cast<ScaleFactor>(0); |
| 293 } | 293 } |
| 294 | 294 |
| 295 | 295 |
| 296 #define TYPED_DATA_ALLOCATOR(clazz) \ | 296 #define TYPED_DATA_ALLOCATOR(clazz) \ |
| 297 void Intrinsifier::TypedData_##clazz##_new(Assembler* assembler) { \ | |
| 298 intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \ | |
| 299 intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \ | |
| 300 ScaleFactor scale = GetScaleFactor(size); \ | |
| 301 TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale); \ | |
| 302 } \ | |
| 303 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) { \ | 297 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) { \ |
| 304 intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \ | 298 intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \ |
| 305 intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \ | 299 intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \ |
| 306 ScaleFactor scale = GetScaleFactor(size); \ | 300 ScaleFactor scale = GetScaleFactor(size); \ |
| 307 TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale); \ | 301 TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale); \ |
| 308 } | 302 } |
| 309 CLASS_LIST_TYPED_DATA(TYPED_DATA_ALLOCATOR) | 303 CLASS_LIST_TYPED_DATA(TYPED_DATA_ALLOCATOR) |
| 310 #undef TYPED_DATA_ALLOCATOR | 304 #undef TYPED_DATA_ALLOCATOR |
| 311 | 305 |
| 312 | 306 |
| (...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2148 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2142 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
| 2149 __ LoadIsolate(EAX); | 2143 __ LoadIsolate(EAX); |
| 2150 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); | 2144 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); |
| 2151 __ ret(); | 2145 __ ret(); |
| 2152 } | 2146 } |
| 2153 | 2147 |
| 2154 #undef __ | 2148 #undef __ |
| 2155 } // namespace dart | 2149 } // namespace dart |
| 2156 | 2150 |
| 2157 #endif // defined TARGET_ARCH_IA32 | 2151 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |