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

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

Issue 10885039: Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This … (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
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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 locs->set_out(Location::RegisterLocation(RAX)); 279 locs->set_out(Location::RegisterLocation(RAX));
280 return locs; 280 return locs;
281 } 281 }
282 282
283 283
284 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler, 284 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler,
285 intptr_t deopt_id, 285 intptr_t deopt_id,
286 intptr_t token_pos, 286 intptr_t token_pos,
287 Token::Kind kind, 287 Token::Kind kind,
288 LocationSummary* locs) { 288 LocationSummary* locs) {
289 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 289 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
290 deopt_id, 290 deopt_id,
291 token_pos); 291 token_pos);
292 const String& operator_name = String::ZoneHandle(Symbols::New("==")); 292 const String& operator_name = String::ZoneHandle(Symbols::New("=="));
293 const int kNumberOfArguments = 2; 293 const int kNumberOfArguments = 2;
294 const Array& kNoArgumentNames = Array::Handle(); 294 const Array& kNoArgumentNames = Array::Handle();
295 const int kNumArgumentsChecked = 2; 295 const int kNumArgumentsChecked = 2;
296 296
297 Label done, false_label, true_label; 297 Label done, false_label, true_label;
298 Register left = locs->in(0).reg(); 298 Register left = locs->in(0).reg();
299 Register right = locs->in(1).reg(); 299 Register right = locs->in(1).reg();
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 kNumArguments, 747 kNumArguments,
748 Array::Handle(), // No named arguments. 748 Array::Handle(), // No named arguments.
749 deopt, // Deoptimize target. 749 deopt, // Deoptimize target.
750 deopt_id(), 750 deopt_id(),
751 token_pos(), 751 token_pos(),
752 locs()); 752 locs());
753 return; 753 return;
754 } 754 }
755 const String& function_name = 755 const String& function_name =
756 String::ZoneHandle(Symbols::New(Token::Str(kind()))); 756 String::ZoneHandle(Symbols::New(Token::Str(kind())));
757 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 757 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
758 deopt_id(), 758 deopt_id(),
759 token_pos()); 759 token_pos());
760 const intptr_t kNumArguments = 2; 760 const intptr_t kNumArguments = 2;
761 const intptr_t kNumArgsChecked = 2; // Type-feedback. 761 const intptr_t kNumArgsChecked = 2; // Type-feedback.
762 compiler->GenerateInstanceCall(deopt_id(), 762 compiler->GenerateInstanceCall(deopt_id(),
763 token_pos(), 763 token_pos(),
764 function_name, 764 function_name,
765 kNumArguments, 765 kNumArguments,
766 Array::ZoneHandle(), // No optional arguments. 766 Array::ZoneHandle(), // No optional arguments.
767 kNumArgsChecked, 767 kNumArgsChecked,
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 } 2233 }
2234 __ j(ABOVE_EQUAL, deopt); 2234 __ j(ABOVE_EQUAL, deopt);
2235 } 2235 }
2236 2236
2237 2237
2238 } // namespace dart 2238 } // namespace dart
2239 2239
2240 #undef __ 2240 #undef __
2241 2241
2242 #endif // defined TARGET_ARCH_X64 2242 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698