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

Side by Side 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, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 static const int kMaxCallPolymorphism = 4; 1176 static const int kMaxCallPolymorphism = 4;
1177 static const int kMaxLoadPolymorphism = 4; 1177 static const int kMaxLoadPolymorphism = 4;
1178 static const int kMaxStorePolymorphism = 4; 1178 static const int kMaxStorePolymorphism = 4;
1179 1179
1180 // Even in the 'unlimited' case we have to have some limit in order not to 1180 // Even in the 'unlimited' case we have to have some limit in order not to
1181 // overflow the stack. 1181 // overflow the stack.
1182 static const int kUnlimitedMaxInlinedSourceSize = 100000; 1182 static const int kUnlimitedMaxInlinedSourceSize = 100000;
1183 static const int kUnlimitedMaxInlinedNodes = 10000; 1183 static const int kUnlimitedMaxInlinedNodes = 10000;
1184 static const int kUnlimitedMaxInlinedNodesCumulative = 10000; 1184 static const int kUnlimitedMaxInlinedNodesCumulative = 10000;
1185 1185
1186 // Maximum depth and total number of elements and properties for literal
1187 // graphs to be considered for fast deep-copying.
1188 static const int kMaxLiteralDepth = 3;
Michael Starzinger 2013/04/03 09:23:23 We should name this "kMaxFastLiteralDepth" and "kM
Hannes Payer (out of office) 2013/04/08 11:03:00 Done.
1189 static const int kMaxLiteralProperties = 8;
1190
1186 // Simple accessors. 1191 // Simple accessors.
1187 void set_function_state(FunctionState* state) { function_state_ = state; } 1192 void set_function_state(FunctionState* state) { function_state_ = state; }
1188 1193
1189 AstContext* ast_context() const { return ast_context_; } 1194 AstContext* ast_context() const { return ast_context_; }
1190 void set_ast_context(AstContext* context) { ast_context_ = context; } 1195 void set_ast_context(AstContext* context) { ast_context_ = context; }
1191 1196
1192 // Accessors forwarded to the function state. 1197 // Accessors forwarded to the function state.
1193 CompilationInfo* info() const { 1198 CompilationInfo* info() const {
1194 return function_state()->compilation_info(); 1199 return function_state()->compilation_info();
1195 } 1200 }
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 HValue* value, 1451 HValue* value,
1447 Handle<Map> map); 1452 Handle<Map> map);
1448 HInstruction* BuildStoreKeyedGeneric(HValue* object, 1453 HInstruction* BuildStoreKeyedGeneric(HValue* object,
1449 HValue* key, 1454 HValue* key,
1450 HValue* value); 1455 HValue* value);
1451 1456
1452 HValue* BuildContextChainWalk(Variable* var); 1457 HValue* BuildContextChainWalk(Variable* var);
1453 1458
1454 HInstruction* BuildThisFunction(); 1459 HInstruction* BuildThisFunction();
1455 1460
1461 HInstruction* BuildFastLiteral(HValue* context,
1462 Handle<JSObject> boilerplate_object,
1463 int size,
1464 AllocationSiteMode mode,
1465 BailoutId id);
1466
1467 void BuildEmitDeepCopy(Handle<JSObject> object,
1468 HInstruction* result,
1469 HInstruction* source,
1470 int* offset,
1471 AllocationSiteMode mode,
1472 BailoutId id);
1473
1456 void AddCheckPrototypeMaps(Handle<JSObject> holder, 1474 void AddCheckPrototypeMaps(Handle<JSObject> holder,
1457 Handle<Map> receiver_map); 1475 Handle<Map> receiver_map);
1458 1476
1459 void AddCheckConstantFunction(Handle<JSObject> holder, 1477 void AddCheckConstantFunction(Handle<JSObject> holder,
1460 HValue* receiver, 1478 HValue* receiver,
1461 Handle<Map> receiver_map); 1479 Handle<Map> receiver_map);
1462 1480
1463 bool MatchRotateRight(HValue* left, 1481 bool MatchRotateRight(HValue* left,
1464 HValue* right, 1482 HValue* right,
1465 HValue** operand, 1483 HValue** operand,
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 EmbeddedVector<char, 64> filename_; 1739 EmbeddedVector<char, 64> filename_;
1722 HeapStringAllocator string_allocator_; 1740 HeapStringAllocator string_allocator_;
1723 StringStream trace_; 1741 StringStream trace_;
1724 int indent_; 1742 int indent_;
1725 }; 1743 };
1726 1744
1727 1745
1728 } } // namespace v8::internal 1746 } } // namespace v8::internal
1729 1747
1730 #endif // V8_HYDROGEN_H_ 1748 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698