| 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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 __ movl(EAX, FieldAddress(EBX, EDI, TIMES_4, | 2106 __ movl(EAX, FieldAddress(EBX, EDI, TIMES_4, |
| 2107 JSRegExp::function_offset(kOneByteStringCid))); | 2107 JSRegExp::function_offset(kOneByteStringCid))); |
| 2108 | 2108 |
| 2109 // Registers are now set up for the lazy compile stub. It expects the function | 2109 // Registers are now set up for the lazy compile stub. It expects the function |
| 2110 // in EAX, the argument descriptor in EDX, and IC-Data in ECX. | 2110 // in EAX, the argument descriptor in EDX, and IC-Data in ECX. |
| 2111 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount; | 2111 static const intptr_t arg_count = RegExpMacroAssembler::kParamCount; |
| 2112 __ LoadObject(EDX, Array::ZoneHandle(ArgumentsDescriptor::New(arg_count))); | 2112 __ LoadObject(EDX, Array::ZoneHandle(ArgumentsDescriptor::New(arg_count))); |
| 2113 __ xorl(ECX, ECX); | 2113 __ xorl(ECX, ECX); |
| 2114 | 2114 |
| 2115 // Tail-call the function. | 2115 // Tail-call the function. |
| 2116 __ movl(EDI, FieldAddress(EAX, Function::instructions_offset())); | 2116 __ movl(EDI, FieldAddress(EAX, Function::entry_point_offset())); |
| 2117 __ addl(EDI, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); | |
| 2118 __ jmp(EDI); | 2117 __ jmp(EDI); |
| 2119 } | 2118 } |
| 2120 | 2119 |
| 2121 | 2120 |
| 2122 // On stack: user tag (+1), return-address (+0). | 2121 // On stack: user tag (+1), return-address (+0). |
| 2123 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { | 2122 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { |
| 2124 // RDI: Isolate. | 2123 // RDI: Isolate. |
| 2125 __ LoadIsolate(EDI); | 2124 __ LoadIsolate(EDI); |
| 2126 // EAX: Current user tag. | 2125 // EAX: Current user tag. |
| 2127 __ movl(EAX, Address(EDI, Isolate::current_tag_offset())); | 2126 __ movl(EAX, Address(EDI, Isolate::current_tag_offset())); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2147 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2146 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
| 2148 __ LoadIsolate(EAX); | 2147 __ LoadIsolate(EAX); |
| 2149 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); | 2148 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); |
| 2150 __ ret(); | 2149 __ ret(); |
| 2151 } | 2150 } |
| 2152 | 2151 |
| 2153 #undef __ | 2152 #undef __ |
| 2154 } // namespace dart | 2153 } // namespace dart |
| 2155 | 2154 |
| 2156 #endif // defined TARGET_ARCH_IA32 | 2155 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |