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 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2101 // string CIDs as well as stored function pointers are in sequence. | 2101 // string CIDs as well as stored function pointers are in sequence. |
2102 __ movl(EBX, Address(ESP, kRegExpParamOffset)); | 2102 __ movl(EBX, Address(ESP, kRegExpParamOffset)); |
2103 __ movl(EDI, Address(ESP, kStringParamOffset)); | 2103 __ movl(EDI, Address(ESP, kStringParamOffset)); |
2104 __ LoadClassId(EDI, EDI); | 2104 __ LoadClassId(EDI, EDI); |
2105 __ SubImmediate(EDI, Immediate(kOneByteStringCid)); | 2105 __ SubImmediate(EDI, Immediate(kOneByteStringCid)); |
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; | |
2112 __ LoadObject(EDX, Array::ZoneHandle(ArgumentsDescriptor::New(arg_count))); | |
2113 __ xorl(ECX, ECX); | 2111 __ xorl(ECX, ECX); |
2114 | 2112 |
2115 // Tail-call the function. | 2113 // Tail-call the function. |
2116 __ movl(EDI, FieldAddress(EAX, Function::entry_point_offset())); | 2114 __ movl(EDI, FieldAddress(EAX, Function::entry_point_offset())); |
2117 __ jmp(EDI); | 2115 __ jmp(EDI); |
2118 } | 2116 } |
2119 | 2117 |
2120 | 2118 |
2121 // On stack: user tag (+1), return-address (+0). | 2119 // On stack: user tag (+1), return-address (+0). |
2122 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { | 2120 void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) { |
(...skipping 23 matching lines...) Expand all Loading... |
2146 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2144 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
2147 __ LoadIsolate(EAX); | 2145 __ LoadIsolate(EAX); |
2148 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); | 2146 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); |
2149 __ ret(); | 2147 __ ret(); |
2150 } | 2148 } |
2151 | 2149 |
2152 #undef __ | 2150 #undef __ |
2153 } // namespace dart | 2151 } // namespace dart |
2154 | 2152 |
2155 #endif // defined TARGET_ARCH_IA32 | 2153 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |