Reviewers: Toon Verwaest,

Message:
Committed patchset #1 manually as 22843 (tree was closed).

Description:
Revert "Also mark as prototype when passing in while creating a function."

Breaks GC stress ARM64.

[email protected]
BUG=

Committed: https://code.google.com/p/v8/source/detail?r=22843

Please review this at https://codereview.chromium.org/439983002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+0, -6 lines):
  M src/factory.cc
  M src/objects.cc


Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index e3a19a1e4ba988a0b19b00219e8ed50d83cb3a23..a844bd1cdb8ba274888cb87419830fc2122ddec8 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1268,11 +1268,6 @@ Handle<JSFunction> Factory::NewFunction(Handle<String> name,
       ? isolate()->sloppy_function_with_readonly_prototype_map()
       : isolate()->sloppy_function_map();
   Handle<JSFunction> result = NewFunction(map, name, code);
-  if (!prototype->IsTheHole()) {
-    Handle<JSObject> js_proto = Handle<JSObject>::cast(prototype);
-    Handle<Map> new_map = Map::CopyAsPrototypeMap(handle(js_proto->map()));
-    JSObject::MigrateToMap(js_proto, new_map);
-  }
   result->set_prototype_or_initial_map(*prototype);
   return result;
 }
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 10d44338f8e030c80dddfc06f194e51fdcf44bfa..c1f611404aea5b2e3d593a78cee94dbe1277a9af 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -7288,7 +7288,6 @@ Handle<Map> Map::CopyForObserved(Handle<Map> map) {


 Handle<Map> Map::CopyAsPrototypeMap(Handle<Map> map) {
-  if (map->is_prototype_map()) return map;
   Handle<Map> result = Copy(map);
   result->mark_prototype_map();
   return result;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to