Index: runtime/vm/object.cc |
=================================================================== |
--- runtime/vm/object.cc (revision 44959) |
+++ runtime/vm/object.cc (working copy) |
@@ -59,8 +59,6 @@ |
DEFINE_FLAG(bool, show_internal_names, false, |
"Show names of internal classes (e.g. \"OneByteString\") in error messages " |
"instead of showing the corresponding interface names (e.g. \"String\")"); |
-DEFINE_FLAG(bool, trace_disabling_optimized_code, false, |
- "Trace disabling optimized code."); |
DEFINE_FLAG(bool, throw_on_javascript_int_overflow, false, |
"Throw an exception when the result of an integer calculation will not " |
"fit into a javascript integer."); |
@@ -5101,7 +5099,7 @@ |
Isolate* isolate = Isolate::Current(); |
const Code& current_code = Code::Handle(isolate, CurrentCode()); |
- if (FLAG_trace_deoptimization) { |
+ if (FLAG_trace_deoptimization_verbose) { |
OS::Print("Disabling optimized code: '%s' entry: %#" Px "\n", |
ToFullyQualifiedCString(), |
current_code.EntryPoint()); |
@@ -5109,6 +5107,7 @@ |
// Patch entry of the optimized code. |
CodePatcher::PatchEntry(current_code); |
// Use previously compiled unoptimized code. |
+ Compiler::EnsureUnoptimizedCode(Thread::Current(), *this); |
Vyacheslav Egorov (Google)
2015/04/09 12:23:08
Comment above no longer applies because previously
Florian Schneider
2015/04/09 14:48:38
Done.
|
AttachCode(Code::Handle(isolate, unoptimized_code())); |
CodePatcher::RestoreEntry(Code::Handle(isolate, unoptimized_code())); |
isolate->TrackDeoptimizedCode(current_code); |
@@ -5116,7 +5115,7 @@ |
void Function::set_unoptimized_code(const Code& value) const { |
- ASSERT(!value.is_optimized()); |
+ ASSERT(value.IsNull() || !value.is_optimized()); |
StorePointer(&raw_ptr()->unoptimized_code_, value.raw()); |
} |
@@ -5558,9 +5557,9 @@ |
if (is_optimizable() && (script() != Script::null()) && |
((end_token_pos() - token_pos()) < FLAG_huge_method_cutoff_in_tokens)) { |
// Additional check needed for implicit getters. |
- if (HasCode() && |
- (Code::Handle(unoptimized_code()).Size() >= |
- FLAG_huge_method_cutoff_in_code_size)) { |
+ if ((unoptimized_code() != Object::null()) && |
Vyacheslav Egorov (Google)
2015/04/09 12:23:08
if (x) { return false } else { return true }
can
Florian Schneider
2015/04/09 14:48:38
Done.
|
+ (Code::Handle(unoptimized_code()).Size() >= |
+ FLAG_huge_method_cutoff_in_code_size)) { |
return false; |
} else { |
return true; |