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

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

Issue 2941643002: Check for a passed-in type argument vector in the prolog of generic functions. (Closed)
Patch Set: address review comments Created 3 years, 6 months 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/il_printer.cc ('k') | runtime/vm/intrinsifier.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" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2342 __ LoadObject(EDI, type_arguments()); 2342 __ LoadObject(EDI, type_arguments());
2343 __ movl(EDI, FieldAddress(EDI, TypeArguments::instantiations_offset())); 2343 __ movl(EDI, FieldAddress(EDI, TypeArguments::instantiations_offset()));
2344 __ leal(EDI, FieldAddress(EDI, Array::data_offset())); 2344 __ leal(EDI, FieldAddress(EDI, Array::data_offset()));
2345 // The instantiations cache is initialized with Object::zero_array() and is 2345 // The instantiations cache is initialized with Object::zero_array() and is
2346 // therefore guaranteed to contain kNoInstantiator. No length check needed. 2346 // therefore guaranteed to contain kNoInstantiator. No length check needed.
2347 Label loop, next, found, slow_case; 2347 Label loop, next, found, slow_case;
2348 __ Bind(&loop); 2348 __ Bind(&loop);
2349 __ movl(EDX, Address(EDI, 0 * kWordSize)); // Cached instantiator type args. 2349 __ movl(EDX, Address(EDI, 0 * kWordSize)); // Cached instantiator type args.
2350 __ cmpl(EDX, instantiator_type_args_reg); 2350 __ cmpl(EDX, instantiator_type_args_reg);
2351 __ j(NOT_EQUAL, &next, Assembler::kNearJump); 2351 __ j(NOT_EQUAL, &next, Assembler::kNearJump);
2352 __ movl(ECX, Address(EDI, 1 * kWordSize)); // Cached function type args. 2352 __ movl(EBX, Address(EDI, 1 * kWordSize)); // Cached function type args.
2353 __ cmpl(ECX, function_type_args_reg); 2353 __ cmpl(EBX, function_type_args_reg);
2354 __ j(EQUAL, &found, Assembler::kNearJump); 2354 __ j(EQUAL, &found, Assembler::kNearJump);
2355 __ Bind(&next); 2355 __ Bind(&next);
2356 __ addl(EDI, Immediate(StubCode::kInstantiationSizeInWords * kWordSize)); 2356 __ addl(EDI, Immediate(StubCode::kInstantiationSizeInWords * kWordSize));
2357 __ cmpl(EDX, Immediate(Smi::RawValue(StubCode::kNoInstantiator))); 2357 __ cmpl(EDX, Immediate(Smi::RawValue(StubCode::kNoInstantiator)));
2358 __ j(NOT_EQUAL, &loop, Assembler::kNearJump); 2358 __ j(NOT_EQUAL, &loop, Assembler::kNearJump);
2359 __ jmp(&slow_case, Assembler::kNearJump); 2359 __ jmp(&slow_case, Assembler::kNearJump);
2360 __ Bind(&found); 2360 __ Bind(&found);
2361 __ movl(result_reg, Address(EDI, 2 * kWordSize)); // Cached instantiated ta. 2361 __ movl(result_reg, Address(EDI, 2 * kWordSize)); // Cached instantiated ta.
2362 __ jmp(&type_arguments_instantiated, Assembler::kNearJump); 2362 __ jmp(&type_arguments_instantiated, Assembler::kNearJump);
2363 2363
(...skipping 4557 matching lines...) Expand 10 before | Expand all | Expand 10 after
6921 __ Drop(1); 6921 __ Drop(1);
6922 __ popl(result); 6922 __ popl(result);
6923 } 6923 }
6924 6924
6925 6925
6926 } // namespace dart 6926 } // namespace dart
6927 6927
6928 #undef __ 6928 #undef __
6929 6929
6930 #endif // defined TARGET_ARCH_IA32 6930 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intrinsifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698