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

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

Issue 10979004: Emit kDeoptBefore only in unoptimzied code (target when switching from optimized to unoptimized cod… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 locs->set_out(Location::RegisterLocation(EAX)); 308 locs->set_out(Location::RegisterLocation(EAX));
309 return locs; 309 return locs;
310 } 310 }
311 311
312 312
313 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler, 313 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler,
314 intptr_t deopt_id, 314 intptr_t deopt_id,
315 intptr_t token_pos, 315 intptr_t token_pos,
316 Token::Kind kind, 316 Token::Kind kind,
317 LocationSummary* locs) { 317 LocationSummary* locs) {
318 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, 318 if (!compiler->is_optimizing()) {
319 deopt_id, 319 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
320 token_pos); 320 deopt_id,
321 token_pos);
322 }
321 const String& operator_name = String::ZoneHandle(Symbols::New("==")); 323 const String& operator_name = String::ZoneHandle(Symbols::New("=="));
322 const int kNumberOfArguments = 2; 324 const int kNumberOfArguments = 2;
323 const Array& kNoArgumentNames = Array::Handle(); 325 const Array& kNoArgumentNames = Array::Handle();
324 const int kNumArgumentsChecked = 2; 326 const int kNumArgumentsChecked = 2;
325 327
326 Label done, false_label, true_label; 328 Label done, false_label, true_label;
327 Register left = locs->in(0).reg(); 329 Register left = locs->in(0).reg();
328 Register right = locs->in(1).reg(); 330 Register right = locs->in(1).reg();
329 __ popl(right); 331 __ popl(right);
330 __ popl(left); 332 __ popl(left);
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 kNumArguments, 786 kNumArguments,
785 Array::Handle(), // No named arguments. 787 Array::Handle(), // No named arguments.
786 deopt, // Deoptimize target. 788 deopt, // Deoptimize target.
787 deopt_id(), 789 deopt_id(),
788 token_pos(), 790 token_pos(),
789 locs()); 791 locs());
790 return; 792 return;
791 } 793 }
792 const String& function_name = 794 const String& function_name =
793 String::ZoneHandle(Symbols::New(Token::Str(kind()))); 795 String::ZoneHandle(Symbols::New(Token::Str(kind())));
794 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, 796 if (!compiler->is_optimizing()) {
795 deopt_id(), 797 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
796 token_pos()); 798 deopt_id(),
799 token_pos());
800 }
797 const intptr_t kNumArguments = 2; 801 const intptr_t kNumArguments = 2;
798 const intptr_t kNumArgsChecked = 2; // Type-feedback. 802 const intptr_t kNumArgsChecked = 2; // Type-feedback.
799 compiler->GenerateInstanceCall(deopt_id(), 803 compiler->GenerateInstanceCall(deopt_id(),
800 token_pos(), 804 token_pos(),
801 function_name, 805 function_name,
802 kNumArguments, 806 kNumArguments,
803 Array::ZoneHandle(), // No optional arguments. 807 Array::ZoneHandle(), // No optional arguments.
804 kNumArgsChecked, 808 kNumArgsChecked,
805 locs()); 809 locs());
806 } 810 }
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
2219 __ j(ABOVE_EQUAL, deopt); 2223 __ j(ABOVE_EQUAL, deopt);
2220 } 2224 }
2221 } 2225 }
2222 2226
2223 2227
2224 } // namespace dart 2228 } // namespace dart
2225 2229
2226 #undef __ 2230 #undef __
2227 2231
2228 #endif // defined TARGET_ARCH_X64 2232 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698