| 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 21 matching lines...) Expand all Loading... |
| 32 // if the intrinsified method always executes a return. | 32 // if the intrinsified method always executes a return. |
| 33 // The EBP register should not be modified, because it is used by the profiler. | 33 // The EBP register should not be modified, because it is used by the profiler. |
| 34 // The THR register (see constants_ia32.h) must be preserved. | 34 // The THR register (see constants_ia32.h) must be preserved. |
| 35 | 35 |
| 36 #define __ assembler-> | 36 #define __ assembler-> |
| 37 | 37 |
| 38 | 38 |
| 39 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; } | 39 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; } |
| 40 | 40 |
| 41 | 41 |
| 42 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) { |
| 43 assembler->Comment("IntrinsicCallPrologue"); |
| 44 assembler->movl(CALLEE_SAVED_TEMP, ICREG); |
| 45 assembler->movl(CALLEE_SAVED_TEMP2, ARGS_DESC_REG); |
| 46 } |
| 47 |
| 48 |
| 49 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { |
| 50 assembler->Comment("IntrinsicCallEpilogue"); |
| 51 assembler->movl(ICREG, CALLEE_SAVED_TEMP); |
| 52 assembler->movl(ARGS_DESC_REG, CALLEE_SAVED_TEMP2); |
| 53 } |
| 54 |
| 55 |
| 42 static intptr_t ComputeObjectArrayTypeArgumentsOffset() { | 56 static intptr_t ComputeObjectArrayTypeArgumentsOffset() { |
| 43 const Library& core_lib = Library::Handle(Library::CoreLibrary()); | 57 const Library& core_lib = Library::Handle(Library::CoreLibrary()); |
| 44 const Class& cls = Class::Handle( | 58 const Class& cls = Class::Handle( |
| 45 core_lib.LookupClassAllowPrivate(Symbols::_List())); | 59 core_lib.LookupClassAllowPrivate(Symbols::_List())); |
| 46 ASSERT(!cls.IsNull()); | 60 ASSERT(!cls.IsNull()); |
| 47 ASSERT(cls.NumTypeArguments() == 1); | 61 ASSERT(cls.NumTypeArguments() == 1); |
| 48 const intptr_t field_offset = cls.type_arguments_field_offset(); | 62 const intptr_t field_offset = cls.type_arguments_field_offset(); |
| 49 ASSERT(field_offset != Class::kNoTypeArguments); | 63 ASSERT(field_offset != Class::kNoTypeArguments); |
| 50 return field_offset; | 64 return field_offset; |
| 51 } | 65 } |
| (...skipping 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2147 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2161 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
| 2148 __ LoadIsolate(EAX); | 2162 __ LoadIsolate(EAX); |
| 2149 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); | 2163 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); |
| 2150 __ ret(); | 2164 __ ret(); |
| 2151 } | 2165 } |
| 2152 | 2166 |
| 2153 #undef __ | 2167 #undef __ |
| 2154 } // namespace dart | 2168 } // namespace dart |
| 2155 | 2169 |
| 2156 #endif // defined TARGET_ARCH_IA32 | 2170 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |