Reland "Also mark as prototype when passing in while creating a function."
Skip gc-stress for test relying on stable feedback (and hence stable gc timing). BUG= R=hpayer@chromium.org Review URL: https://codereview.chromium.org/441873005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
8322577eeb
commit
356ac42def
@ -1268,6 +1268,11 @@ 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;
|
||||
}
|
||||
|
@ -7288,6 +7288,7 @@ 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;
|
||||
|
@ -246,15 +246,16 @@
|
||||
'array-feedback': [SKIP],
|
||||
'array-literal-feedback': [SKIP],
|
||||
'd8-performance-now': [SKIP],
|
||||
'debug-stepout-scope-part8': [PASS, ['arch == arm ', FAIL]],
|
||||
'elements-kind': [SKIP],
|
||||
'elements-transition-hoisting': [SKIP],
|
||||
'fast-prototype': [SKIP],
|
||||
'getters-on-elements': [SKIP],
|
||||
'harmony/block-let-crankshaft': [SKIP],
|
||||
'opt-elements-kind': [SKIP],
|
||||
'osr-elements-kind': [SKIP],
|
||||
'regress/regress-165637': [SKIP],
|
||||
'regress/regress-2249': [SKIP],
|
||||
'debug-stepout-scope-part8': [PASS, ['arch == arm ', FAIL]],
|
||||
'elements-transition-hoisting': [PASS, FAIL],
|
||||
'getters-on-elements': [PASS, FAIL],
|
||||
# Tests taking too long
|
||||
'debug-stepout-scope-part8': [SKIP],
|
||||
'mirror-object': [SKIP],
|
||||
|
Loading…
Reference in New Issue
Block a user