From e9461cc50a779f950a7c89c7f453721a9774a640 Mon Sep 17 00:00:00 2001 From: "vitalyr@chromium.org" Date: Mon, 30 Aug 2010 13:39:07 +0000 Subject: [PATCH] Set the code pointer when compiling a function. Without this fix LazyCompile has to be called twice to set it. Review URL: http://codereview.chromium.org/3253003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/compiler.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler.cc b/src/compiler.cc index bdeb4aa..bf6d41d 100755 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -416,6 +416,9 @@ bool Compiler::CompileLazy(CompilationInfo* info) { // object last we avoid this. shared->set_scope_info(*SerializedScopeInfo::Create(info->scope())); shared->set_code(*code); + if (!info->closure().is_null()) { + info->closure()->set_code(*code); + } // Set the expected number of properties for instances. SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); -- 2.7.4