Reviewers: Rico,

Description:
Set the code pointer when compiling a function.

Without this fix LazyCompile has to be called twice to set it.

Please review this at http://codereview.chromium.org/3253003/show

Affected files:
  M src/compiler.cc


Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index bdeb4aa9b5498547751d00f81868c0c5449bbe82..bf6d41d85402217ba4cadae2228a316788401f2d 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());


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to