OLD | NEW |
---|---|
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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
553 // parameters which then can be executed. If the source code contains other | 553 // parameters which then can be executed. If the source code contains other |
554 // functions, they will be compiled and allocated as part of the compilation | 554 // functions, they will be compiled and allocated as part of the compilation |
555 // of the source code. | 555 // of the source code. |
556 | 556 |
557 // Please note this interface returns shared function infos. This means you | 557 // Please note this interface returns shared function infos. This means you |
558 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a | 558 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a |
559 // real function with a context. | 559 // real function with a context. |
560 | 560 |
561 class Compiler : public AllStatic { | 561 class Compiler : public AllStatic { |
562 public: | 562 public: |
563 static const int kMaxInliningLevels = 3; | 563 static const int kMaxInliningLevels = 5; |
titzer
2013/07/17 08:05:02
Why not a flag as well?
Hannes Payer (out of office)
2013/07/17 08:27:34
Done.
| |
564 | 564 |
565 // Call count before primitive functions trigger their own optimization. | 565 // Call count before primitive functions trigger their own optimization. |
566 static const int kCallsUntilPrimitiveOpt = 200; | 566 static const int kCallsUntilPrimitiveOpt = 200; |
567 | 567 |
568 // All routines return a SharedFunctionInfo. | 568 // All routines return a SharedFunctionInfo. |
569 // If an error occurs an exception is raised and the return handle | 569 // If an error occurs an exception is raised and the return handle |
570 // contains NULL. | 570 // contains NULL. |
571 | 571 |
572 // Compile a String source within a context. | 572 // Compile a String source within a context. |
573 static Handle<SharedFunctionInfo> Compile(Handle<String> source, | 573 static Handle<SharedFunctionInfo> Compile(Handle<String> source, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
637 unsigned info_zone_start_allocation_size_; | 637 unsigned info_zone_start_allocation_size_; |
638 int64_t start_ticks_; | 638 int64_t start_ticks_; |
639 | 639 |
640 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 640 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
641 }; | 641 }; |
642 | 642 |
643 | 643 |
644 } } // namespace v8::internal | 644 } } // namespace v8::internal |
645 | 645 |
646 #endif // V8_COMPILER_H_ | 646 #endif // V8_COMPILER_H_ |
OLD | NEW |