Index: src/deoptimizer.cc |
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
index adf4cf1296676a73f5e1319b0d14a23e8554d44a..916796c2b83dda8bee6025c0913385437961a375 100644 |
--- a/src/deoptimizer.cc |
+++ b/src/deoptimizer.cc |
@@ -3711,6 +3711,32 @@ Handle<Object> TranslatedState::MaterializeAt(int frame_index, |
object->set_length(*length); |
return object; |
} |
+ case JS_FUNCTION_TYPE: { |
+ Handle<JSFunction> object = |
+ isolate_->factory()->NewFunctionFromSharedFunctionInfo( |
+ handle(isolate_->object_function()->shared()), |
+ handle(isolate_->context())); |
Jarin
2016/05/20 08:15:24
Don't you want to add a comment about the temporar
Michael Starzinger
2016/05/20 08:32:39
Done.
|
+ slot->value_ = object; |
+ Handle<Object> properties = MaterializeAt(frame_index, value_index); |
+ Handle<Object> elements = MaterializeAt(frame_index, value_index); |
+ Handle<Object> prototype = MaterializeAt(frame_index, value_index); |
+ Handle<Object> shared = MaterializeAt(frame_index, value_index); |
+ Handle<Object> context = MaterializeAt(frame_index, value_index); |
+ Handle<Object> literals = MaterializeAt(frame_index, value_index); |
+ Handle<Object> entry = MaterializeAt(frame_index, value_index); |
+ Handle<Object> next_link = MaterializeAt(frame_index, value_index); |
+ object->ReplaceCode(*isolate_->builtins()->CompileLazy()); |
+ object->set_map(*map); |
+ object->set_properties(FixedArray::cast(*properties)); |
+ object->set_elements(FixedArrayBase::cast(*elements)); |
+ object->set_prototype_or_initial_map(*prototype); |
+ object->set_shared(SharedFunctionInfo::cast(*shared)); |
+ object->set_context(Context::cast(*context)); |
+ object->set_literals(LiteralsArray::cast(*literals)); |
+ CHECK(entry->IsNumber()); // Entry to compile lazy stub. |
+ CHECK(next_link->IsUndefined()); |
+ return object; |
+ } |
case FIXED_ARRAY_TYPE: { |
Handle<Object> lengthObject = MaterializeAt(frame_index, value_index); |
int32_t length = 0; |