| 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/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| 11 #include "src/compilation-dependencies.h" | 11 #include "src/compilation-dependencies.h" |
| 12 #include "src/source-position-table.h" |
| 12 #include "src/source-position.h" | 13 #include "src/source-position.h" |
| 13 #include "src/zone.h" | 14 #include "src/zone.h" |
| 14 | 15 |
| 15 namespace v8 { | 16 namespace v8 { |
| 16 namespace internal { | 17 namespace internal { |
| 17 | 18 |
| 18 // Forward declarations. | 19 // Forward declarations. |
| 19 class CompilationInfo; | 20 class CompilationInfo; |
| 20 class CompilationJob; | 21 class CompilationJob; |
| 21 class JavaScriptFrame; | 22 class JavaScriptFrame; |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 base::SmartArrayPointer<char> GetDebugName() const; | 429 base::SmartArrayPointer<char> GetDebugName() const; |
| 429 | 430 |
| 430 Code::Kind output_code_kind() const { | 431 Code::Kind output_code_kind() const { |
| 431 return Code::ExtractKindFromFlags(code_flags_); | 432 return Code::ExtractKindFromFlags(code_flags_); |
| 432 } | 433 } |
| 433 | 434 |
| 434 StackFrame::Type GetOutputStackFrameType() const; | 435 StackFrame::Type GetOutputStackFrameType() const; |
| 435 | 436 |
| 436 int GetDeclareGlobalsFlags() const; | 437 int GetDeclareGlobalsFlags() const; |
| 437 | 438 |
| 439 SourcePositionTableBuilder::RecordingMode SourcePositionRecordingMode() const; |
| 440 |
| 438 protected: | 441 protected: |
| 439 ParseInfo* parse_info_; | 442 ParseInfo* parse_info_; |
| 440 | 443 |
| 441 void DisableFutureOptimization() { | 444 void DisableFutureOptimization() { |
| 442 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) { | 445 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) { |
| 443 // If Crankshaft tried to optimize this function, bailed out, and | 446 // If Crankshaft tried to optimize this function, bailed out, and |
| 444 // doesn't want to try again, then use TurboFan next time. | 447 // doesn't want to try again, then use TurboFan next time. |
| 445 if (!shared_info()->dont_crankshaft() && | 448 if (!shared_info()->dont_crankshaft() && |
| 446 bailout_reason() != kOptimizedTooManyTimes) { | 449 bailout_reason() != kOptimizedTooManyTimes) { |
| 447 shared_info()->set_dont_crankshaft(true); | 450 shared_info()->set_dont_crankshaft(true); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 MUST_USE_RESULT Status SetLastStatus(Status status) { | 596 MUST_USE_RESULT Status SetLastStatus(Status status) { |
| 594 last_status_ = status; | 597 last_status_ = status; |
| 595 return last_status_; | 598 return last_status_; |
| 596 } | 599 } |
| 597 }; | 600 }; |
| 598 | 601 |
| 599 } // namespace internal | 602 } // namespace internal |
| 600 } // namespace v8 | 603 } // namespace v8 |
| 601 | 604 |
| 602 #endif // V8_COMPILER_H_ | 605 #endif // V8_COMPILER_H_ |
| OLD | NEW |