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 ZoneVector<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 | |
395 protected: | 387 protected: |
396 ParseInfo* parse_info_; | 388 ParseInfo* parse_info_; |
397 | 389 |
398 void DisableFutureOptimization() { | 390 void DisableFutureOptimization() { |
399 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) { | 391 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) { |
400 shared_info()->DisableOptimization(bailout_reason()); | 392 shared_info()->DisableOptimization(bailout_reason()); |
401 } | 393 } |
402 } | 394 } |
403 | 395 |
404 private: | 396 private: |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 CompilationDependencies dependencies_; | 451 CompilationDependencies dependencies_; |
460 | 452 |
461 BailoutReason bailout_reason_; | 453 BailoutReason bailout_reason_; |
462 | 454 |
463 int prologue_offset_; | 455 int prologue_offset_; |
464 | 456 |
465 List<OffsetRange>* no_frame_ranges_; | 457 List<OffsetRange>* no_frame_ranges_; |
466 std::vector<InlinedFunctionInfo> inlined_function_infos_; | 458 std::vector<InlinedFunctionInfo> inlined_function_infos_; |
467 bool track_positions_; | 459 bool track_positions_; |
468 | 460 |
469 InlinedFunctionList inlined_functions_; | |
470 | |
471 // A copy of shared_info()->opt_count() to avoid handle deref | 461 // A copy of shared_info()->opt_count() to avoid handle deref |
472 // during graph optimization. | 462 // during graph optimization. |
473 int opt_count_; | 463 int opt_count_; |
474 | 464 |
475 // Number of parameters used for compilation of stubs that require arguments. | 465 // Number of parameters used for compilation of stubs that require arguments. |
476 int parameter_count_; | 466 int parameter_count_; |
477 | 467 |
478 int optimization_id_; | 468 int optimization_id_; |
479 | 469 |
480 int osr_expr_stack_height_; | 470 int osr_expr_stack_height_; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 Zone zone_; | 672 Zone zone_; |
683 size_t info_zone_start_allocation_size_; | 673 size_t info_zone_start_allocation_size_; |
684 base::ElapsedTimer timer_; | 674 base::ElapsedTimer timer_; |
685 | 675 |
686 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 676 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
687 }; | 677 }; |
688 | 678 |
689 } } // namespace v8::internal | 679 } } // namespace v8::internal |
690 | 680 |
691 #endif // V8_COMPILER_H_ | 681 #endif // V8_COMPILER_H_ |
OLD | NEW |