Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/typedObjects/objectTypes.js

Issue 6253377650425856: WIP - Dictionary types implementation (Closed)
Patch Set: Created Jan. 9, 2015, 3:34 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/typedObjects/hash.js ('k') | lib/typedObjects/primitiveTypes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/typedObjects/objectTypes.js
===================================================================
--- a/lib/typedObjects/objectTypes.js
+++ b/lib/typedObjects/objectTypes.js
@@ -16,16 +16,17 @@
*/
"use strict";
let {fixedPropertyDescriptor, getViewsForType, defineProperties, alloc, dealloc} = require("typedObjects/utils");
let {Reference, TypedReference} = require("typedObjects/references");
let {uint8, uint32} = require("typedObjects/primitiveTypes");
let {createArrayType} = require("typedObjects/arrayTypes");
+let {createDictionaryType} = require("typedObjects/dictionaryTypes");
const STATE_UNINITIALIZED = exports.STATE_UNINITIALIZED = 0;
const STATE_CREATED = exports.STATE_CREATED = 1;
const STATE_RELEASING = exports.STATE_RELEASING = 2;
/**
* List of registered types (typeId is the index in that array).
*/
@@ -273,16 +274,17 @@ function extend(parentTypeInfo, typeDesc
referenceLength: fixedPropertyDescriptor(Reference.byteLength),
viewTypes: fixedPropertyDescriptor(Reference.viewTypes),
initialValue: fixedPropertyDescriptor(null),
typeId: fixedPropertyDescriptor(typeId),
extend: fixedPropertyDescriptor(extend.bind(null, typeInfo)),
isInstance: fixedPropertyDescriptor(isInstance.bind(null, typeId)),
Array: fixedPropertyDescriptor(createArrayType.bind(null, result)),
+ Dictionary: fixedPropertyDescriptor(createDictionaryType.bind(null, result)),
createGetter: fixedPropertyDescriptor(createGetter),
createSetter: fixedPropertyDescriptor(createSetter.bind(null, typeId))
});
types.push(typeInfo);
return result;
}
« no previous file with comments | « lib/typedObjects/hash.js ('k') | lib/typedObjects/primitiveTypes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld