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

Unified Diff: src/factory.h

Issue 4078: - Added a map cache for literal objects. This will... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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/contexts.h ('k') | src/factory.cc » ('j') | src/factory.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.h
===================================================================
--- src/factory.h (revision 369)
+++ src/factory.h (working copy)
@@ -167,6 +167,10 @@
static Handle<JSObject> NewJSObject(Handle<JSFunction> constructor,
PretenureFlag pretenure = NOT_TENURED);
+ // JS objects are pretenured when allocated by the bootstrapper and
+ // runtime.
+ static Handle<JSObject> NewJSObjectFromMap(Handle<Map> map);
+
// Allocate a JS object representing an object literal. The object is
// pretenured (allocated directly in the old generation).
static Handle<JSObject> NewObjectLiteral(int expected_number_of_properties);
@@ -291,6 +295,12 @@
static Handle<DebugInfo> NewDebugInfo(Handle<SharedFunctionInfo> shared);
+
+ // Return a map using the map cache in the global context.
+ // The key the an ordered set of property names.
+ static Handle<Map> ObjectLiteralMapFromCache(Handle<Context> context,
+ Handle<FixedArray> keys);
+
private:
static Handle<JSFunction> NewFunctionHelper(Handle<String> name,
Handle<Object> prototype);
@@ -302,6 +312,14 @@
static Handle<JSFunction> BaseNewFunctionFromBoilerplate(
Handle<JSFunction> boilerplate,
Handle<Map> function_map);
+
+ // Create a new map cache.
+ static Handle<MapCache> NewMapCache(int at_least_space_for);
+
+ // Update the map cache in the global context with (keys, map)
+ static Handle<MapCache> AddToMapCache(Handle<Context> context,
+ Handle<FixedArray> keys,
+ Handle<Map> map);
};
« no previous file with comments | « src/contexts.h ('k') | src/factory.cc » ('j') | src/factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698