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

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, 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 static const int kMaxCallPolymorphism = 4; 1191 static const int kMaxCallPolymorphism = 4;
1192 static const int kMaxLoadPolymorphism = 4; 1192 static const int kMaxLoadPolymorphism = 4;
1193 static const int kMaxStorePolymorphism = 4; 1193 static const int kMaxStorePolymorphism = 4;
1194 1194
1195 // Even in the 'unlimited' case we have to have some limit in order not to 1195 // Even in the 'unlimited' case we have to have some limit in order not to
1196 // overflow the stack. 1196 // overflow the stack.
1197 static const int kUnlimitedMaxInlinedSourceSize = 100000; 1197 static const int kUnlimitedMaxInlinedSourceSize = 100000;
1198 static const int kUnlimitedMaxInlinedNodes = 10000; 1198 static const int kUnlimitedMaxInlinedNodes = 10000;
1199 static const int kUnlimitedMaxInlinedNodesCumulative = 10000; 1199 static const int kUnlimitedMaxInlinedNodesCumulative = 10000;
1200 1200
1201 // Maximum depth and total number of elements and properties for literal
1202 // graphs to be considered for fast deep-copying.
1203 static const int kMaxFastLiteralDepth = 3;
1204 static const int kMaxFastLiteralProperties = 8;
1205
1201 // Simple accessors. 1206 // Simple accessors.
1202 void set_function_state(FunctionState* state) { function_state_ = state; } 1207 void set_function_state(FunctionState* state) { function_state_ = state; }
1203 1208
1204 AstContext* ast_context() const { return ast_context_; } 1209 AstContext* ast_context() const { return ast_context_; }
1205 void set_ast_context(AstContext* context) { ast_context_ = context; } 1210 void set_ast_context(AstContext* context) { ast_context_ = context; }
1206 1211
1207 // Accessors forwarded to the function state. 1212 // Accessors forwarded to the function state.
1208 CompilationInfo* info() const { 1213 CompilationInfo* info() const {
1209 return function_state()->compilation_info(); 1214 return function_state()->compilation_info();
1210 } 1215 }
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 HValue* value, 1472 HValue* value,
1468 Handle<Map> map); 1473 Handle<Map> map);
1469 HInstruction* BuildStoreKeyedGeneric(HValue* object, 1474 HInstruction* BuildStoreKeyedGeneric(HValue* object,
1470 HValue* key, 1475 HValue* key,
1471 HValue* value); 1476 HValue* value);
1472 1477
1473 HValue* BuildContextChainWalk(Variable* var); 1478 HValue* BuildContextChainWalk(Variable* var);
1474 1479
1475 HInstruction* BuildThisFunction(); 1480 HInstruction* BuildThisFunction();
1476 1481
1482 HInstruction* BuildFastLiteral(HValue* context,
1483 Handle<JSObject> boilerplate_object,
1484 Handle<JSObject> original_boilerplate_object,
1485 int size,
1486 AllocationSiteMode mode,
1487 BailoutId id);
1488
1489 void BuildEmitDeepCopy(Handle<JSObject> boilerplat_object,
1490 Handle<JSObject> object,
1491 HInstruction* result,
1492 int* offset,
1493 AllocationSiteMode mode,
1494 BailoutId id);
1495
1496 MUST_USE_RESULT HValue* BuildCopyObjectHeader(
1497 Handle<JSObject> boilerplat_object,
1498 HInstruction* target,
1499 int object_offset,
1500 int elements_offset,
1501 int elements_size,
1502 BailoutId id);
1503
1477 void AddCheckPrototypeMaps(Handle<JSObject> holder, 1504 void AddCheckPrototypeMaps(Handle<JSObject> holder,
1478 Handle<Map> receiver_map); 1505 Handle<Map> receiver_map);
1479 1506
1480 void AddCheckConstantFunction(Handle<JSObject> holder, 1507 void AddCheckConstantFunction(Handle<JSObject> holder,
1481 HValue* receiver, 1508 HValue* receiver,
1482 Handle<Map> receiver_map); 1509 Handle<Map> receiver_map);
1483 1510
1484 bool MatchRotateRight(HValue* left, 1511 bool MatchRotateRight(HValue* left,
1485 HValue* right, 1512 HValue* right,
1486 HValue** operand, 1513 HValue** operand,
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 EmbeddedVector<char, 64> filename_; 1769 EmbeddedVector<char, 64> filename_;
1743 HeapStringAllocator string_allocator_; 1770 HeapStringAllocator string_allocator_;
1744 StringStream trace_; 1771 StringStream trace_;
1745 int indent_; 1772 int indent_;
1746 }; 1773 };
1747 1774
1748 1775
1749 } } // namespace v8::internal 1776 } } // namespace v8::internal
1750 1777
1751 #endif // V8_HYDROGEN_H_ 1778 #endif // V8_HYDROGEN_H_
OLDNEW
« 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