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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); | 483 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); |
484 }; | 484 }; |
485 | 485 |
486 | 486 |
487 // Exactly like a CompilationInfo, except also creates and enters a | 487 // Exactly like a CompilationInfo, except also creates and enters a |
488 // Zone on construction and deallocates it on exit. | 488 // Zone on construction and deallocates it on exit. |
489 class CompilationInfoWithZone: public CompilationInfo { | 489 class CompilationInfoWithZone: public CompilationInfo { |
490 public: | 490 public: |
491 explicit CompilationInfoWithZone(Handle<Script> script); | 491 explicit CompilationInfoWithZone(Handle<Script> script); |
492 explicit CompilationInfoWithZone(Handle<JSFunction> closure); | 492 explicit CompilationInfoWithZone(Handle<JSFunction> closure); |
493 CompilationInfoWithZone(CodeStub* stub, Isolate* isolate) | |
494 : CompilationInfo(stub, isolate, &zone_) {} | |
495 | 493 |
496 // Virtual destructor because a CompilationInfoWithZone has to exit the | 494 // Virtual destructor because a CompilationInfoWithZone has to exit the |
497 // zone scope and get rid of dependent maps even when the destructor is | 495 // zone scope and get rid of dependent maps even when the destructor is |
498 // called when cast as a CompilationInfo. | 496 // called when cast as a CompilationInfo. |
499 virtual ~CompilationInfoWithZone(); | 497 virtual ~CompilationInfoWithZone(); |
500 | 498 |
501 private: | 499 private: |
502 Zone zone_; | 500 Zone zone_; |
503 }; | 501 }; |
504 | 502 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 Zone zone_; | 699 Zone zone_; |
702 size_t info_zone_start_allocation_size_; | 700 size_t info_zone_start_allocation_size_; |
703 base::ElapsedTimer timer_; | 701 base::ElapsedTimer timer_; |
704 | 702 |
705 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 703 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
706 }; | 704 }; |
707 | 705 |
708 } } // namespace v8::internal | 706 } } // namespace v8::internal |
709 | 707 |
710 #endif // V8_COMPILER_H_ | 708 #endif // V8_COMPILER_H_ |
OLD | NEW |