Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: runtime/vm/stub_code_ia32.cc

Issue 1429303005: Add fast Smi op version of switchable instance calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 const Register left = EAX; 2015 const Register left = EAX;
2016 const Register right = EDX; 2016 const Register right = EDX;
2017 const Register temp = ECX; 2017 const Register temp = ECX;
2018 __ movl(left, Address(ESP, 2 * kWordSize)); 2018 __ movl(left, Address(ESP, 2 * kWordSize));
2019 __ movl(right, Address(ESP, 1 * kWordSize)); 2019 __ movl(right, Address(ESP, 1 * kWordSize));
2020 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 2020 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
2021 __ ret(); 2021 __ ret();
2022 } 2022 }
2023 2023
2024 2024
2025 // Called from megamorphic calls.
2026 // EBX: receiver
2027 // ECX: MegamorphicCache (preserved)
2028 // Result:
2029 // EBX: target entry point
2030 // EDX: argument descriptor
2025 void StubCode::EmitMegamorphicLookup(Assembler* assembler) { 2031 void StubCode::EmitMegamorphicLookup(Assembler* assembler) {
2026 __ LoadTaggedClassIdMayBeSmi(EAX, EBX); 2032 __ LoadTaggedClassIdMayBeSmi(EAX, EBX);
2027 // EAX: class ID of the receiver (smi). 2033 // EAX: class ID of the receiver (smi).
2028 __ movl(EDI, FieldAddress(ECX, MegamorphicCache::buckets_offset())); 2034 __ movl(EDI, FieldAddress(ECX, MegamorphicCache::buckets_offset()));
2029 __ movl(EBX, FieldAddress(ECX, MegamorphicCache::mask_offset())); 2035 __ movl(EBX, FieldAddress(ECX, MegamorphicCache::mask_offset()));
2030 // EDI: cache buckets array. 2036 // EDI: cache buckets array.
2031 // EBX: mask. 2037 // EBX: mask.
2032 __ pushl(ECX); // Spill MegamorphicCache. 2038 __ pushl(ECX); // Spill MegamorphicCache.
2033 __ movl(ECX, EAX); 2039 __ movl(ECX, EAX);
2034 // ECX: probe. 2040 // ECX: probe.
(...skipping 21 matching lines...) Expand all
2056 // illegal class id was found, the target is a cache miss handler that can 2062 // illegal class id was found, the target is a cache miss handler that can
2057 // be invoked as a normal Dart function. 2063 // be invoked as a normal Dart function.
2058 __ movl(EAX, FieldAddress(EDI, ECX, TIMES_4, base + kWordSize)); 2064 __ movl(EAX, FieldAddress(EDI, ECX, TIMES_4, base + kWordSize));
2059 __ popl(ECX); // Restore MegamorphicCache. 2065 __ popl(ECX); // Restore MegamorphicCache.
2060 __ movl(EDX, 2066 __ movl(EDX,
2061 FieldAddress(ECX, MegamorphicCache::arguments_descriptor_offset())); 2067 FieldAddress(ECX, MegamorphicCache::arguments_descriptor_offset()));
2062 __ movl(EBX, FieldAddress(EAX, Function::entry_point_offset())); 2068 __ movl(EBX, FieldAddress(EAX, Function::entry_point_offset()));
2063 } 2069 }
2064 2070
2065 2071
2066 // Called from megamorphic calls.
2067 // EBX: receiver
2068 // ECX: MegamorphicCache (preserved)
2069 // Result:
2070 // EBX: target entry point
2071 // EDX: argument descriptor
2072 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { 2072 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) {
2073 EmitMegamorphicLookup(assembler); 2073 EmitMegamorphicLookup(assembler);
2074 __ ret(); 2074 __ ret();
2075 } 2075 }
2076 2076
2077 2077
2078 // Called from switchable IC calls. 2078 // Called from switchable IC calls.
2079 // EBX: receiver 2079 // EBX: receiver
2080 // ECX: ICData (preserved) 2080 // ECX: ICData (preserved)
2081 // Result: 2081 // Result:
2082 // EBX: target entry point 2082 // EBX: target entry point
2083 // EDX: arguments descriptor 2083 // EDX: arguments descriptor
2084 void StubCode::GenerateICLookupStub(Assembler* assembler) { 2084 void StubCode::GenerateICLookupStub(Assembler* assembler) {
2085 __ int3(); 2085 __ int3();
2086 } 2086 }
2087 2087
2088
2089 void StubCode::GenerateICSmiAddLookupStub(Assembler* assembler) {
2090 __ int3();
2091 }
2092
2093
2094 void StubCode::GenerateICSmiSubLookupStub(Assembler* assembler) {
2095 __ int3();
2096 }
2097
2098
2099 void StubCode::GenerateICSmiEqualLookupStub(Assembler* assembler) {
2100 __ int3();
2101 }
2102
2088 } // namespace dart 2103 } // namespace dart
2089 2104
2090 #endif // defined TARGET_ARCH_IA32 2105 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698