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

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

Issue 623433002: Don't perform OSR on intrinsified methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 | 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/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 DartFrameIterator iterator; 1202 DartFrameIterator iterator;
1203 StackFrame* frame = iterator.NextFrame(); 1203 StackFrame* frame = iterator.NextFrame();
1204 ASSERT(frame != NULL); 1204 ASSERT(frame != NULL);
1205 const Code& code = Code::ZoneHandle(frame->LookupDartCode()); 1205 const Code& code = Code::ZoneHandle(frame->LookupDartCode());
1206 ASSERT(!code.IsNull()); 1206 ASSERT(!code.IsNull());
1207 const Function& function = Function::Handle(code.function()); 1207 const Function& function = Function::Handle(code.function());
1208 ASSERT(!function.IsNull()); 1208 ASSERT(!function.IsNull());
1209 // Since the code is referenced from the frame and the ZoneHandle, 1209 // Since the code is referenced from the frame and the ZoneHandle,
1210 // it cannot have been removed from the function. 1210 // it cannot have been removed from the function.
1211 ASSERT(function.HasCode()); 1211 ASSERT(function.HasCode());
1212 if (!CanOptimizeFunction(function, isolate)) { 1212 // Don't do OSR on intrinsified functions: The intrinsic code expects to be
1213 // called like a regular function and can't be entered via OSR.
1214 if (!CanOptimizeFunction(function, isolate) || function.is_intrinsic()) {
1213 return; 1215 return;
1214 } 1216 }
1215 intptr_t osr_id = 1217 intptr_t osr_id =
1216 Code::Handle(function.unoptimized_code()).GetDeoptIdForOsr(frame->pc()); 1218 Code::Handle(function.unoptimized_code()).GetDeoptIdForOsr(frame->pc());
1217 if (FLAG_trace_osr) { 1219 if (FLAG_trace_osr) {
1218 OS::Print("Attempting OSR for %s at id=%" Pd ", count=%" Pd "\n", 1220 OS::Print("Attempting OSR for %s at id=%" Pd ", count=%" Pd "\n",
1219 function.ToFullyQualifiedCString(), 1221 function.ToFullyQualifiedCString(),
1220 osr_id, 1222 osr_id,
1221 function.usage_counter()); 1223 function.usage_counter());
1222 } 1224 }
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 field.RecordStore(value); 1626 field.RecordStore(value);
1625 } 1627 }
1626 1628
1627 1629
1628 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { 1630 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) {
1629 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); 1631 const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
1630 field.EvaluateInitializer(); 1632 field.EvaluateInitializer();
1631 } 1633 }
1632 1634
1633 } // namespace dart 1635 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intrinsifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698