| 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 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1912 #if defined(DEBUG) | 1912 #if defined(DEBUG) |
| 1913 { Label ok; | 1913 { Label ok; |
| 1914 __ movl(EAX, FieldAddress(ECX, ICData::num_args_tested_offset())); | 1914 __ movl(EAX, FieldAddress(ECX, ICData::num_args_tested_offset())); |
| 1915 __ cmpl(EAX, Immediate(kNumArgsTested)); | 1915 __ cmpl(EAX, Immediate(kNumArgsTested)); |
| 1916 __ j(EQUAL, &ok, Assembler::kNearJump); | 1916 __ j(EQUAL, &ok, Assembler::kNearJump); |
| 1917 __ Stop("Incorrect ICData for equality"); | 1917 __ Stop("Incorrect ICData for equality"); |
| 1918 __ Bind(&ok); | 1918 __ Bind(&ok); |
| 1919 } | 1919 } |
| 1920 #endif // DEBUG | 1920 #endif // DEBUG |
| 1921 // Check IC data, update if needed. | 1921 // Check IC data, update if needed. |
| 1922 // EBX: IC data object (preserved). | 1922 // ECX: IC data object (preserved). |
| 1923 __ movl(EBX, FieldAddress(ECX, ICData::ic_data_offset())); | 1923 __ movl(EBX, FieldAddress(ECX, ICData::ic_data_offset())); |
| 1924 // EBX: ic_data_array with check entries: classes and target functions. | 1924 // EBX: ic_data_array with check entries: classes and target functions. |
| 1925 __ leal(EBX, FieldAddress(EBX, Array::data_offset())); | 1925 __ leal(EBX, FieldAddress(EBX, Array::data_offset())); |
| 1926 // EBX: points directly to the first ic data array element. | 1926 // EBX: points directly to the first ic data array element. |
| 1927 | 1927 |
| 1928 Label get_class_id_as_smi, no_match, loop, compute_result, found; | 1928 Label get_class_id_as_smi, no_match, loop, compute_result, found; |
| 1929 __ Bind(&loop); | 1929 __ Bind(&loop); |
| 1930 // Check left. | 1930 // Check left. |
| 1931 __ movl(EAX, Address(ESP, 2 * kWordSize)); | 1931 __ movl(EAX, Address(ESP, 2 * kWordSize)); |
| 1932 __ call(&get_class_id_as_smi); | 1932 __ call(&get_class_id_as_smi); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2101 __ Bind(&done); | 2101 __ Bind(&done); |
| 2102 __ popl(temp); | 2102 __ popl(temp); |
| 2103 __ popl(right); | 2103 __ popl(right); |
| 2104 __ popl(left); | 2104 __ popl(left); |
| 2105 __ ret(); | 2105 __ ret(); |
| 2106 } | 2106 } |
| 2107 | 2107 |
| 2108 } // namespace dart | 2108 } // namespace dart |
| 2109 | 2109 |
| 2110 #endif // defined TARGET_ARCH_IA32 | 2110 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |