Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index 681b3d46b860784992bac460a5adcc65b592f0dc..186de91b5ddc31640ee7bcc3f21012050a7a5d1b 100644 |
--- a/src/ast.cc |
+++ b/src/ast.cc |
@@ -186,6 +186,23 @@ LanguageMode FunctionLiteral::language_mode() const { |
} |
+void FunctionLiteral::InitializeSharedInfo( |
+ Handle<Code> unoptimized_code) { |
+ for (RelocIterator it(*unoptimized_code); !it.done(); it.next()) { |
+ RelocInfo* rinfo = it.rinfo(); |
+ if (rinfo->rmode() != RelocInfo::EMBEDDED_OBJECT) continue; |
+ Object* obj = rinfo->target_object(); |
+ if (obj->IsSharedFunctionInfo()) { |
+ SharedFunctionInfo* shared = SharedFunctionInfo::cast(obj); |
+ if (shared->start_position() == start_position()) { |
+ shared_info_ = Handle<SharedFunctionInfo>(shared); |
+ break; |
+ } |
+ } |
+ } |
+} |
+ |
+ |
ObjectLiteralProperty::ObjectLiteralProperty(Literal* key, |
Expression* value, |
Isolate* isolate) { |