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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 Scope* global_scope() const { return global_scope_; } | 79 Scope* global_scope() const { return global_scope_; } |
80 Handle<Code> code() const { return code_; } | 80 Handle<Code> code() const { return code_; } |
81 Handle<JSFunction> closure() const { return closure_; } | 81 Handle<JSFunction> closure() const { return closure_; } |
82 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } | 82 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } |
83 Handle<Script> script() const { return script_; } | 83 Handle<Script> script() const { return script_; } |
84 HydrogenCodeStub* code_stub() const {return code_stub_; } | 84 HydrogenCodeStub* code_stub() const {return code_stub_; } |
85 v8::Extension* extension() const { return extension_; } | 85 v8::Extension* extension() const { return extension_; } |
86 ScriptDataImpl* pre_parse_data() const { return pre_parse_data_; } | 86 ScriptDataImpl* pre_parse_data() const { return pre_parse_data_; } |
87 Handle<Context> context() const { return context_; } | 87 Handle<Context> context() const { return context_; } |
88 BailoutId osr_ast_id() const { return osr_ast_id_; } | 88 BailoutId osr_ast_id() const { return osr_ast_id_; } |
| 89 uint32_t osr_pc_offset() const { return osr_pc_offset_; } |
89 int opt_count() const { return opt_count_; } | 90 int opt_count() const { return opt_count_; } |
90 int num_parameters() const; | 91 int num_parameters() const; |
91 int num_heap_slots() const; | 92 int num_heap_slots() const; |
92 Code::Flags flags() const; | 93 Code::Flags flags() const; |
93 | 94 |
94 void MarkAsEval() { | 95 void MarkAsEval() { |
95 ASSERT(!is_lazy()); | 96 ASSERT(!is_lazy()); |
96 flags_ |= IsEval::encode(true); | 97 flags_ |= IsEval::encode(true); |
97 } | 98 } |
98 void MarkAsGlobal() { | 99 void MarkAsGlobal() { |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 Status last_status() const { return last_status_; } | 526 Status last_status() const { return last_status_; } |
526 CompilationInfo* info() const { return info_; } | 527 CompilationInfo* info() const { return info_; } |
527 Isolate* isolate() const { return info()->isolate(); } | 528 Isolate* isolate() const { return info()->isolate(); } |
528 | 529 |
529 MUST_USE_RESULT Status AbortOptimization() { | 530 MUST_USE_RESULT Status AbortOptimization() { |
530 info_->AbortOptimization(); | 531 info_->AbortOptimization(); |
531 info_->shared_info()->DisableOptimization(info_->bailout_reason()); | 532 info_->shared_info()->DisableOptimization(info_->bailout_reason()); |
532 return SetLastStatus(BAILED_OUT); | 533 return SetLastStatus(BAILED_OUT); |
533 } | 534 } |
534 | 535 |
| 536 void WaitForInstall() { |
| 537 ASSERT(!info_->osr_ast_id().IsNone()); |
| 538 awaiting_install_ = true; |
| 539 } |
| 540 |
| 541 bool IsWaitingForInstall() { return awaiting_install_; } |
| 542 |
535 private: | 543 private: |
536 CompilationInfo* info_; | 544 CompilationInfo* info_; |
537 HOptimizedGraphBuilder* graph_builder_; | 545 HOptimizedGraphBuilder* graph_builder_; |
538 HGraph* graph_; | 546 HGraph* graph_; |
539 LChunk* chunk_; | 547 LChunk* chunk_; |
540 TimeDelta time_taken_to_create_graph_; | 548 TimeDelta time_taken_to_create_graph_; |
541 TimeDelta time_taken_to_optimize_; | 549 TimeDelta time_taken_to_optimize_; |
542 TimeDelta time_taken_to_codegen_; | 550 TimeDelta time_taken_to_codegen_; |
543 Status last_status_; | 551 Status last_status_; |
| 552 bool awaiting_install_; |
544 | 553 |
545 MUST_USE_RESULT Status SetLastStatus(Status status) { | 554 MUST_USE_RESULT Status SetLastStatus(Status status) { |
546 last_status_ = status; | 555 last_status_ = status; |
547 return last_status_; | 556 return last_status_; |
548 } | 557 } |
549 void RecordOptimizationStats(); | 558 void RecordOptimizationStats(); |
550 | 559 |
551 struct Timer { | 560 struct Timer { |
552 Timer(OptimizingCompiler* compiler, TimeDelta* location) | 561 Timer(OptimizingCompiler* compiler, TimeDelta* location) |
553 : compiler_(compiler), | 562 : compiler_(compiler), |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 unsigned info_zone_start_allocation_size_; | 666 unsigned info_zone_start_allocation_size_; |
658 ElapsedTimer timer_; | 667 ElapsedTimer timer_; |
659 | 668 |
660 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 669 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
661 }; | 670 }; |
662 | 671 |
663 | 672 |
664 } } // namespace v8::internal | 673 } } // namespace v8::internal |
665 | 674 |
666 #endif // V8_COMPILER_H_ | 675 #endif // V8_COMPILER_H_ |
OLD | NEW |