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

Unified Diff: src/typedarray.js

Issue 384003003: Replace AddProperty by AddNamedProperty to speed up the common case (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/symbol.js ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typedarray.js
diff --git a/src/typedarray.js b/src/typedarray.js
index ab5fc5c9e37f707c028286e42c74b4628f83bfa1..c149b35b98e8926094ae7054b977bc29aed2ee10 100644
--- a/src/typedarray.js
+++ b/src/typedarray.js
@@ -299,13 +299,13 @@ macro SETUP_TYPED_ARRAY(ARRAY_ID, NAME, ELEMENT_SIZE)
%SetCode(global.NAME, NAMEConstructor);
%FunctionSetPrototype(global.NAME, new $Object());
- %AddProperty(global.NAME, "BYTES_PER_ELEMENT", ELEMENT_SIZE,
- READ_ONLY | DONT_ENUM | DONT_DELETE);
- %AddProperty(global.NAME.prototype,
- "constructor", global.NAME, DONT_ENUM);
- %AddProperty(global.NAME.prototype,
- "BYTES_PER_ELEMENT", ELEMENT_SIZE,
- READ_ONLY | DONT_ENUM | DONT_DELETE);
+ %AddNamedProperty(global.NAME, "BYTES_PER_ELEMENT", ELEMENT_SIZE,
+ READ_ONLY | DONT_ENUM | DONT_DELETE);
+ %AddNamedProperty(global.NAME.prototype,
+ "constructor", global.NAME, DONT_ENUM);
+ %AddNamedProperty(global.NAME.prototype,
+ "BYTES_PER_ELEMENT", ELEMENT_SIZE,
+ READ_ONLY | DONT_ENUM | DONT_DELETE);
InstallGetter(global.NAME.prototype, "buffer", NAME_GetBuffer);
InstallGetter(global.NAME.prototype, "byteOffset", NAME_GetByteOffset);
InstallGetter(global.NAME.prototype, "byteLength", NAME_GetByteLength);
@@ -436,7 +436,7 @@ function SetupDataView() {
%FunctionSetPrototype($DataView, new $Object);
// Set up constructor property on the DataView prototype.
- %AddProperty($DataView.prototype, "constructor", $DataView, DONT_ENUM);
+ %AddNamedProperty($DataView.prototype, "constructor", $DataView, DONT_ENUM);
InstallGetter($DataView.prototype, "buffer", DataViewGetBufferJS);
InstallGetter($DataView.prototype, "byteOffset", DataViewGetByteOffset);
« no previous file with comments | « src/symbol.js ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698