Chromium Code Reviews| 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 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1215 __ popl(EAX); // Pop argument (type arguments of object). | 1215 __ popl(EAX); // Pop argument (type arguments of object). |
| 1216 __ popl(EAX); // Pop argument (class of object). | 1216 __ popl(EAX); // Pop argument (class of object). |
| 1217 __ popl(EAX); // Pop result (newly allocated object). | 1217 __ popl(EAX); // Pop result (newly allocated object). |
| 1218 // EAX: new object | 1218 // EAX: new object |
| 1219 // Restore the frame pointer. | 1219 // Restore the frame pointer. |
| 1220 __ LeaveFrame(); | 1220 __ LeaveFrame(); |
| 1221 __ ret(); | 1221 __ ret(); |
| 1222 } | 1222 } |
| 1223 | 1223 |
| 1224 | 1224 |
| 1225 // TODO(regis): This stub is not called anymore to allocate regular closures, | |
| 1226 // but only implicit instance closures. Simplify. | |
|
Florian Schneider
2014/02/24 09:29:00
I noticed that as well after I changed the way reg
| |
| 1227 | |
| 1225 // Called for inline allocation of closures. | 1228 // Called for inline allocation of closures. |
| 1226 // Input parameters: | 1229 // Input parameters: |
| 1227 // ESP + 8 : receiver (null if not an implicit instance closure). | 1230 // ESP + 8 : receiver (null if not an implicit instance closure). |
| 1228 // ESP + 4 : type arguments object (null if class is no parameterized). | 1231 // ESP + 4 : type arguments object (null if class is no parameterized). |
| 1229 // ESP : points to return address. | 1232 // ESP : points to return address. |
| 1230 // Uses EAX, EBX, ECX, EDX as temporary registers. | 1233 // Uses EAX, EBX, ECX, EDX as temporary registers. |
| 1231 void StubCode::GenerateAllocationStubForClosure(Assembler* assembler, | 1234 void StubCode::GenerateAllocationStubForClosure(Assembler* assembler, |
| 1232 const Function& func) { | 1235 const Function& func) { |
| 1233 const Immediate& raw_null = | 1236 const Immediate& raw_null = |
| 1234 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1237 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2116 const Register temp = ECX; | 2119 const Register temp = ECX; |
| 2117 __ movl(left, Address(ESP, 2 * kWordSize)); | 2120 __ movl(left, Address(ESP, 2 * kWordSize)); |
| 2118 __ movl(right, Address(ESP, 1 * kWordSize)); | 2121 __ movl(right, Address(ESP, 1 * kWordSize)); |
| 2119 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2122 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 2120 __ ret(); | 2123 __ ret(); |
| 2121 } | 2124 } |
| 2122 | 2125 |
| 2123 } // namespace dart | 2126 } // namespace dart |
| 2124 | 2127 |
| 2125 #endif // defined TARGET_ARCH_IA32 | 2128 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |