OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_H_ | 5 #ifndef V8_COMPILER_H_ |
6 #define V8_COMPILER_H_ | 6 #define V8_COMPILER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 } | 377 } |
378 | 378 |
379 #if DEBUG | 379 #if DEBUG |
380 void PrintAstForTesting(); | 380 void PrintAstForTesting(); |
381 #endif | 381 #endif |
382 | 382 |
383 bool is_simple_parameter_list(); | 383 bool is_simple_parameter_list(); |
384 | 384 |
385 Handle<Code> GenerateCodeStub(); | 385 Handle<Code> GenerateCodeStub(); |
386 | 386 |
| 387 typedef std::vector<Handle<SharedFunctionInfo>> InlinedFunctionList; |
| 388 InlinedFunctionList const& inlined_functions() const { |
| 389 return inlined_functions_; |
| 390 } |
| 391 void AddInlinedFunction(Handle<SharedFunctionInfo> inlined_function) { |
| 392 inlined_functions_.push_back(inlined_function); |
| 393 } |
| 394 |
387 protected: | 395 protected: |
388 ParseInfo* parse_info_; | 396 ParseInfo* parse_info_; |
389 | 397 |
390 void DisableFutureOptimization() { | 398 void DisableFutureOptimization() { |
391 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) { | 399 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) { |
392 shared_info()->DisableOptimization(bailout_reason()); | 400 shared_info()->DisableOptimization(bailout_reason()); |
393 } | 401 } |
394 } | 402 } |
395 | 403 |
396 private: | 404 private: |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 CompilationDependencies dependencies_; | 459 CompilationDependencies dependencies_; |
452 | 460 |
453 BailoutReason bailout_reason_; | 461 BailoutReason bailout_reason_; |
454 | 462 |
455 int prologue_offset_; | 463 int prologue_offset_; |
456 | 464 |
457 List<OffsetRange>* no_frame_ranges_; | 465 List<OffsetRange>* no_frame_ranges_; |
458 std::vector<InlinedFunctionInfo> inlined_function_infos_; | 466 std::vector<InlinedFunctionInfo> inlined_function_infos_; |
459 bool track_positions_; | 467 bool track_positions_; |
460 | 468 |
| 469 InlinedFunctionList inlined_functions_; |
| 470 |
461 // A copy of shared_info()->opt_count() to avoid handle deref | 471 // A copy of shared_info()->opt_count() to avoid handle deref |
462 // during graph optimization. | 472 // during graph optimization. |
463 int opt_count_; | 473 int opt_count_; |
464 | 474 |
465 // Number of parameters used for compilation of stubs that require arguments. | 475 // Number of parameters used for compilation of stubs that require arguments. |
466 int parameter_count_; | 476 int parameter_count_; |
467 | 477 |
468 int optimization_id_; | 478 int optimization_id_; |
469 | 479 |
470 int osr_expr_stack_height_; | 480 int osr_expr_stack_height_; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 Zone zone_; | 682 Zone zone_; |
673 size_t info_zone_start_allocation_size_; | 683 size_t info_zone_start_allocation_size_; |
674 base::ElapsedTimer timer_; | 684 base::ElapsedTimer timer_; |
675 | 685 |
676 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 686 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
677 }; | 687 }; |
678 | 688 |
679 } } // namespace v8::internal | 689 } } // namespace v8::internal |
680 | 690 |
681 #endif // V8_COMPILER_H_ | 691 #endif // V8_COMPILER_H_ |
OLD | NEW |