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

Unified Diff: src/hydrogen.h

Issue 12880017: Build fast literals in hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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/heap.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 83cecc91b2ff4c41469e90ef19b9e5e1742b4db5..eadb28084fa1065b906c47a4c068c996c6ddb744 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1198,6 +1198,11 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
static const int kUnlimitedMaxInlinedNodes = 10000;
static const int kUnlimitedMaxInlinedNodesCumulative = 10000;
+ // Maximum depth and total number of elements and properties for literal
+ // graphs to be considered for fast deep-copying.
+ static const int kMaxFastLiteralDepth = 3;
+ static const int kMaxFastLiteralProperties = 8;
+
// Simple accessors.
void set_function_state(FunctionState* state) { function_state_ = state; }
@@ -1474,6 +1479,28 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
HInstruction* BuildThisFunction();
+ HInstruction* BuildFastLiteral(HValue* context,
+ Handle<JSObject> boilerplate_object,
+ Handle<JSObject> original_boilerplate_object,
+ int size,
+ AllocationSiteMode mode,
+ BailoutId id);
+
+ void BuildEmitDeepCopy(Handle<JSObject> boilerplat_object,
+ Handle<JSObject> object,
+ HInstruction* result,
+ int* offset,
+ AllocationSiteMode mode,
+ BailoutId id);
+
+ MUST_USE_RESULT HValue* BuildCopyObjectHeader(
+ Handle<JSObject> boilerplat_object,
+ HInstruction* target,
+ int object_offset,
+ int elements_offset,
+ int elements_size,
+ BailoutId id);
+
void AddCheckPrototypeMaps(Handle<JSObject> holder,
Handle<Map> receiver_map);
« no previous file with comments | « src/heap.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698