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
This commit is contained in:
vitalyr@chromium.org 2010-08-30 13:39:07 +00:00
parent 18c7882ea2
commit e9461cc50a

View File

@ -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());