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

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

Issue 10114010: Fix potential problem with mismatch between ICData inloine cache miss handler in optimizing compile… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/opt_code_generator.h" 8 #include "vm/opt_code_generator.h"
9 9
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 // in optimized code and mark them for reoptimization since type feedback was 2677 // in optimized code and mark them for reoptimization since type feedback was
2678 // collected in the meantime. 2678 // collected in the meantime.
2679 void OptimizingCodeGenerator::GenerateInlineCacheCall( 2679 void OptimizingCodeGenerator::GenerateInlineCacheCall(
2680 intptr_t node_id, 2680 intptr_t node_id,
2681 intptr_t token_index, 2681 intptr_t token_index,
2682 const ICData& ic_data, 2682 const ICData& ic_data,
2683 intptr_t num_args, 2683 intptr_t num_args,
2684 const Array& optional_arguments_names) { 2684 const Array& optional_arguments_names) {
2685 __ LoadObject(ECX, ic_data); 2685 __ LoadObject(ECX, ic_data);
2686 __ LoadObject(EDX, ArgumentsDescriptor(num_args, optional_arguments_names)); 2686 __ LoadObject(EDX, ArgumentsDescriptor(num_args, optional_arguments_names));
2687 ExternalLabel target_label( 2687
2688 "InlineCache", StubCode::OneArgCheckInlineCacheEntryPoint()); 2688 uword label_address = 0;
2689 switch (ic_data.num_args_tested()) {
2690 case 1:
2691 label_address = StubCode::OneArgCheckInlineCacheEntryPoint();
2692 break;
2693 case 2:
2694 label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint();
2695 break;
2696 default:
2697 UNIMPLEMENTED();
2698 }
2699
2700 ExternalLabel target_label("InlineCache", label_address);
2689 2701
2690 __ call(&target_label); 2702 __ call(&target_label);
2691 AddCurrentDescriptor(PcDescriptors::kIcCall, 2703 AddCurrentDescriptor(PcDescriptors::kIcCall,
2692 node_id, 2704 node_id,
2693 token_index); 2705 token_index);
2694 __ addl(ESP, Immediate(num_args * kWordSize)); 2706 __ addl(ESP, Immediate(num_args * kWordSize));
2695 } 2707 }
2696 2708
2697 2709
2698 // Normalizes the ic_data class/target pairs: 2710 // Normalizes the ic_data class/target pairs:
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
3072 } 3084 }
3073 } 3085 }
3074 // TODO(srdjan): Implement unary kSUB (negate) Mint. 3086 // TODO(srdjan): Implement unary kSUB (negate) Mint.
3075 CodeGenerator::VisitUnaryOpNode(node); 3087 CodeGenerator::VisitUnaryOpNode(node);
3076 } 3088 }
3077 3089
3078 3090
3079 } // namespace dart 3091 } // namespace dart
3080 3092
3081 #endif // defined TARGET_ARCH_IA32 3093 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698