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

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

Issue 2728163002: VM: Make use_osr an Isolate flag, similar to how we made use_field_guards. (Closed)
Patch Set: Created 3 years, 9 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
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 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 FLAG_stacktrace_every = saved_stacktrace_every; 1661 FLAG_stacktrace_every = saved_stacktrace_every;
1662 } 1662 }
1663 1663
1664 const Error& error = Error::Handle(thread->HandleInterrupts()); 1664 const Error& error = Error::Handle(thread->HandleInterrupts());
1665 if (!error.IsNull()) { 1665 if (!error.IsNull()) {
1666 Exceptions::PropagateError(error); 1666 Exceptions::PropagateError(error);
1667 UNREACHABLE(); 1667 UNREACHABLE();
1668 } 1668 }
1669 1669
1670 if ((stack_overflow_flags & Thread::kOsrRequest) != 0) { 1670 if ((stack_overflow_flags & Thread::kOsrRequest) != 0) {
1671 ASSERT(FLAG_use_osr); 1671 ASSERT(isolate->use_osr());
1672 DartFrameIterator iterator; 1672 DartFrameIterator iterator;
1673 StackFrame* frame = iterator.NextFrame(); 1673 StackFrame* frame = iterator.NextFrame();
1674 ASSERT(frame != NULL); 1674 ASSERT(frame != NULL);
1675 const Code& code = Code::ZoneHandle(frame->LookupDartCode()); 1675 const Code& code = Code::ZoneHandle(frame->LookupDartCode());
1676 ASSERT(!code.IsNull()); 1676 ASSERT(!code.IsNull());
1677 ASSERT(!code.is_optimized()); 1677 ASSERT(!code.is_optimized());
1678 const Function& function = Function::Handle(code.function()); 1678 const Function& function = Function::Handle(code.function());
1679 ASSERT(!function.IsNull()); 1679 ASSERT(!function.IsNull());
1680 1680
1681 // If the code of the frame does not match the function's unoptimized code, 1681 // If the code of the frame does not match the function's unoptimized code,
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 const intptr_t elm_size = old_data.ElementSizeInBytes(); 2261 const intptr_t elm_size = old_data.ElementSizeInBytes();
2262 const TypedData& new_data = 2262 const TypedData& new_data =
2263 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 2263 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
2264 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 2264 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
2265 typed_data_cell.SetAt(0, new_data); 2265 typed_data_cell.SetAt(0, new_data);
2266 arguments.SetReturn(new_data); 2266 arguments.SetReturn(new_data);
2267 } 2267 }
2268 2268
2269 2269
2270 } // namespace dart 2270 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart.cc » ('j') | runtime/vm/dart.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698