Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: src/lithium-codegen.h

Issue 587623002: Introduce a class to carry around a deoptimization reason. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Re-added a few Comment calls which were accidentally removed. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/lithium-codegen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_LITHIUM_CODEGEN_H_ 5 #ifndef V8_LITHIUM_CODEGEN_H_
6 #define V8_LITHIUM_CODEGEN_H_ 6 #define V8_LITHIUM_CODEGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler.h" 10 #include "src/compiler.h"
11 #include "src/deoptimizer.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 class LInstruction; 16 class LInstruction;
16 class LPlatformChunk; 17 class LPlatformChunk;
17 18
18 class LCodeGenBase BASE_EMBEDDED { 19 class LCodeGenBase BASE_EMBEDDED {
19 public: 20 public:
20 LCodeGenBase(LChunk* chunk, 21 LCodeGenBase(LChunk* chunk,
21 MacroAssembler* assembler, 22 MacroAssembler* assembler,
22 CompilationInfo* info); 23 CompilationInfo* info);
23 virtual ~LCodeGenBase() {} 24 virtual ~LCodeGenBase() {}
24 25
25 // Simple accessors. 26 // Simple accessors.
26 MacroAssembler* masm() const { return masm_; } 27 MacroAssembler* masm() const { return masm_; }
27 CompilationInfo* info() const { return info_; } 28 CompilationInfo* info() const { return info_; }
28 Isolate* isolate() const { return info_->isolate(); } 29 Isolate* isolate() const { return info_->isolate(); }
29 Factory* factory() const { return isolate()->factory(); } 30 Factory* factory() const { return isolate()->factory(); }
30 Heap* heap() const { return isolate()->heap(); } 31 Heap* heap() const { return isolate()->heap(); }
31 Zone* zone() const { return zone_; } 32 Zone* zone() const { return zone_; }
32 LPlatformChunk* chunk() const { return chunk_; } 33 LPlatformChunk* chunk() const { return chunk_; }
33 HGraph* graph() const; 34 HGraph* graph() const;
34 35
35 void FPRINTF_CHECKING Comment(const char* format, ...); 36 void FPRINTF_CHECKING Comment(const char* format, ...);
36 void DeoptComment(const char* mnemonic, const char* reason); 37 void DeoptComment(const Deoptimizer::Reason& reason);
37 38
38 bool GenerateBody(); 39 bool GenerateBody();
39 virtual void GenerateBodyInstructionPre(LInstruction* instr) {} 40 virtual void GenerateBodyInstructionPre(LInstruction* instr) {}
40 virtual void GenerateBodyInstructionPost(LInstruction* instr) {} 41 virtual void GenerateBodyInstructionPost(LInstruction* instr) {}
41 42
42 virtual void EnsureSpaceForLazyDeopt(int space_needed) = 0; 43 virtual void EnsureSpaceForLazyDeopt(int space_needed) = 0;
43 virtual void RecordAndWritePosition(int position) = 0; 44 virtual void RecordAndWritePosition(int position) = 0;
44 45
45 int GetNextEmittedBlock() const; 46 int GetNextEmittedBlock() const;
46 47
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 // Methods for code dependencies. 80 // Methods for code dependencies.
80 void AddDeprecationDependency(Handle<Map> map); 81 void AddDeprecationDependency(Handle<Map> map);
81 void AddStabilityDependency(Handle<Map> map); 82 void AddStabilityDependency(Handle<Map> map);
82 }; 83 };
83 84
84 85
85 } } // namespace v8::internal 86 } } // namespace v8::internal
86 87
87 #endif // V8_LITHIUM_CODEGEN_H_ 88 #endif // V8_LITHIUM_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/lithium-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698