| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 | 745 |
| 746 // Forward declarations for inner scope classes. | 746 // Forward declarations for inner scope classes. |
| 747 class SubgraphScope; | 747 class SubgraphScope; |
| 748 | 748 |
| 749 static const InlineFunctionGenerator kInlineFunctionGenerators[]; | 749 static const InlineFunctionGenerator kInlineFunctionGenerators[]; |
| 750 | 750 |
| 751 static const int kMaxCallPolymorphism = 4; | 751 static const int kMaxCallPolymorphism = 4; |
| 752 static const int kMaxLoadPolymorphism = 4; | 752 static const int kMaxLoadPolymorphism = 4; |
| 753 static const int kMaxStorePolymorphism = 4; | 753 static const int kMaxStorePolymorphism = 4; |
| 754 | 754 |
| 755 static const int kMaxInlinedNodes = 196; | 755 |
| 756 static const int kMaxInlinedSize = 196; | 756 // Hard limits. |
| 757 static const int kMaxSourceSize = 600; | 757 static const int kMaxSourceSize = 600; // Per site. |
| 758 static const int kMaxInlinedNodesHard = 270; // Cumulative. |
| 759 static const int kMaxInlinedSize = 196; // Per site. |
| 760 |
| 761 // Soft limits. After the soft limit is reached, we will inline only small |
| 762 // "primitive" functions, where "primitive" is defined by syntactic criterion. |
| 763 static const int kMaxInlinedNodesSoft = 196; // Cumulative. |
| 764 static const int kMaxInlinedPrimitiveSize = 40; // Per site. |
| 765 STATIC_ASSERT(kMaxInlinedSize < SharedFunctionInfo::kAstNodeCountMask); |
| 766 STATIC_ASSERT(kMaxInlinedPrimitiveSize < kMaxInlinedSize); |
| 767 STATIC_ASSERT(kMaxInlinedNodesSoft < kMaxInlinedNodesHard); |
| 768 |
| 758 | 769 |
| 759 // Simple accessors. | 770 // Simple accessors. |
| 760 void set_function_state(FunctionState* state) { function_state_ = state; } | 771 void set_function_state(FunctionState* state) { function_state_ = state; } |
| 761 | 772 |
| 762 AstContext* ast_context() const { return ast_context_; } | 773 AstContext* ast_context() const { return ast_context_; } |
| 763 void set_ast_context(AstContext* context) { ast_context_ = context; } | 774 void set_ast_context(AstContext* context) { ast_context_ = context; } |
| 764 | 775 |
| 765 // Accessors forwarded to the function state. | 776 // Accessors forwarded to the function state. |
| 766 CompilationInfo* info() const { | 777 CompilationInfo* info() const { |
| 767 return function_state()->compilation_info(); | 778 return function_state()->compilation_info(); |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 const char* filename_; | 1261 const char* filename_; |
| 1251 HeapStringAllocator string_allocator_; | 1262 HeapStringAllocator string_allocator_; |
| 1252 StringStream trace_; | 1263 StringStream trace_; |
| 1253 int indent_; | 1264 int indent_; |
| 1254 }; | 1265 }; |
| 1255 | 1266 |
| 1256 | 1267 |
| 1257 } } // namespace v8::internal | 1268 } } // namespace v8::internal |
| 1258 | 1269 |
| 1259 #endif // V8_HYDROGEN_H_ | 1270 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |