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 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1833 // Calls to the runtime to optimize the given function. | 1833 // Calls to the runtime to optimize the given function. |
1834 // EBX: function to be reoptimized. | 1834 // EBX: function to be reoptimized. |
1835 // EDX: argument descriptor (preserved). | 1835 // EDX: argument descriptor (preserved). |
1836 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { | 1836 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
1837 __ EnterStubFrame(); | 1837 __ EnterStubFrame(); |
1838 __ pushl(EDX); | 1838 __ pushl(EDX); |
1839 __ pushl(Immediate(0)); // Setup space on stack for return value. | 1839 __ pushl(Immediate(0)); // Setup space on stack for return value. |
1840 __ pushl(EBX); | 1840 __ pushl(EBX); |
1841 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1); | 1841 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1); |
1842 __ popl(EAX); // Discard argument. | 1842 __ popl(EAX); // Discard argument. |
1843 __ popl(EAX); // Get Code object | 1843 __ popl(EAX); // Get Function object |
1844 __ popl(EDX); // Restore argument descriptor. | 1844 __ popl(EDX); // Restore argument descriptor. |
1845 __ movl(EAX, FieldAddress(EAX, Code::entry_point_offset())); | |
1846 __ LeaveFrame(); | 1845 __ LeaveFrame(); |
| 1846 __ movl(CODE_REG, FieldAddress(EAX, Function::code_offset())); |
| 1847 __ movl(EAX, FieldAddress(EAX, Function::entry_point_offset())); |
1847 __ jmp(EAX); | 1848 __ jmp(EAX); |
1848 __ int3(); | 1849 __ int3(); |
1849 } | 1850 } |
1850 | 1851 |
1851 | 1852 |
1852 // Does identical check (object references are equal or not equal) with special | 1853 // Does identical check (object references are equal or not equal) with special |
1853 // checks for boxed numbers. | 1854 // checks for boxed numbers. |
1854 // Return ZF set. | 1855 // Return ZF set. |
1855 // Note: A Mint cannot contain a value that would fit in Smi, a Bigint | 1856 // Note: A Mint cannot contain a value that would fit in Smi, a Bigint |
1856 // cannot contain a value that fits in Mint or Smi. | 1857 // cannot contain a value that fits in Mint or Smi. |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2064 } | 2065 } |
2065 | 2066 |
2066 | 2067 |
2067 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2068 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
2068 __ int3(); | 2069 __ int3(); |
2069 } | 2070 } |
2070 | 2071 |
2071 } // namespace dart | 2072 } // namespace dart |
2072 | 2073 |
2073 #endif // defined TARGET_ARCH_IA32 | 2074 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |