Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Issue 14829005: Remove separate maps for function instances (Closed)

Created:
7 years, 7 months ago by wingo
Modified:
7 years, 7 months ago
CC:
Michael Starzinger, Sven Panne
Visibility:
Public.

Description

Remove separate maps for function instances ES3 specified that functions created via Function() would have enumerable prototypes, unlike function literals. For this reason, V8 has always had two prototypes for functions: "function_map" for literals, and "function_instance_map" for "function instances": those functions created by Function(). However, since 2009 or so, both maps have been the same! Both have had writable, non-enumerable prototypes. Moreover, ES5 changed to specify that function instances would have non-enumerable prototypes. This patch removes the separate maps for function instances in sloppy and strict mode. R=mstarzinger@chromium.org TEST=mjsunit/function-prototype BUG= Committed: 14619

Patch Set 1 #

Patch Set 2 : Remove outdated comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -63 lines) Patch
M include/v8.h View 1 chunk +1 line, -1 line 0 comments Download
M src/bootstrapper.cc View 7 chunks +14 lines, -31 lines 0 comments Download
M src/contexts.h View 2 chunks +0 lines, -5 lines 0 comments Download
M src/runtime.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/runtime.cc View 1 chunk +0 lines, -20 lines 0 comments Download
M src/v8natives.js View 1 1 chunk +1 line, -3 lines 0 comments Download
M test/mjsunit/function-prototype.js View 1 chunk +21 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
wingo
7 years, 7 months ago (2013-05-10 08:44:34 UTC) #1
Michael Starzinger
LGTM.
7 years, 7 months ago (2013-05-10 12:27:49 UTC) #2
wingo
7 years, 7 months ago (2013-05-10 12:59:48 UTC) #3
Message was sent while issue was closed.
Committed patchset #2 manually as r14619 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698