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

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

Issue 6628012: Refactor polymorphic load and inline function graph construction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) 49 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
50 : chunk_(chunk), 50 : chunk_(chunk),
51 masm_(assembler), 51 masm_(assembler),
52 info_(info), 52 info_(info),
53 current_block_(-1), 53 current_block_(-1),
54 current_instruction_(-1), 54 current_instruction_(-1),
55 instructions_(chunk->instructions()), 55 instructions_(chunk->instructions()),
56 deoptimizations_(4), 56 deoptimizations_(4),
57 deoptimization_literals_(8), 57 deoptimization_literals_(8),
58 inlined_function_count_(0), 58 inlined_function_count_(0),
59 scope_(chunk->graph()->info()->scope()), 59 scope_(info->scope()),
60 status_(UNUSED), 60 status_(UNUSED),
61 deferred_(8), 61 deferred_(8),
62 osr_pc_offset_(-1), 62 osr_pc_offset_(-1),
63 deoptimization_reloc_size(), 63 deoptimization_reloc_size(),
64 resolver_(this) { 64 resolver_(this) {
65 PopulateDeoptimizationLiteralsWithInlinedFunctions(); 65 PopulateDeoptimizationLiteralsWithInlinedFunctions();
66 } 66 }
67 67
68 // Simple accessors. 68 // Simple accessors.
69 MacroAssembler* masm() const { return masm_; } 69 MacroAssembler* masm() const { return masm_; }
70 CompilationInfo* info() const { return info_; }
70 71
71 // Support for converting LOperands to assembler types. 72 // Support for converting LOperands to assembler types.
72 Operand ToOperand(LOperand* op) const; 73 Operand ToOperand(LOperand* op) const;
73 Register ToRegister(LOperand* op) const; 74 Register ToRegister(LOperand* op) const;
74 XMMRegister ToDoubleRegister(LOperand* op) const; 75 XMMRegister ToDoubleRegister(LOperand* op) const;
75 Immediate ToImmediate(LOperand* op); 76 Immediate ToImmediate(LOperand* op);
76 77
77 // The operand denoting the second word (the one with a higher address) of 78 // The operand denoting the second word (the one with a higher address) of
78 // a double stack slot. 79 // a double stack slot.
79 Operand HighOperand(LOperand* op); 80 Operand HighOperand(LOperand* op);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 DONE, 118 DONE,
118 ABORTED 119 ABORTED
119 }; 120 };
120 121
121 bool is_unused() const { return status_ == UNUSED; } 122 bool is_unused() const { return status_ == UNUSED; }
122 bool is_generating() const { return status_ == GENERATING; } 123 bool is_generating() const { return status_ == GENERATING; }
123 bool is_done() const { return status_ == DONE; } 124 bool is_done() const { return status_ == DONE; }
124 bool is_aborted() const { return status_ == ABORTED; } 125 bool is_aborted() const { return status_ == ABORTED; }
125 126
126 int strict_mode_flag() const { 127 int strict_mode_flag() const {
127 return info_->is_strict() ? kStrictMode : kNonStrictMode; 128 return info()->is_strict() ? kStrictMode : kNonStrictMode;
128 } 129 }
129 130
130 LChunk* chunk() const { return chunk_; } 131 LChunk* chunk() const { return chunk_; }
131 Scope* scope() const { return scope_; } 132 Scope* scope() const { return scope_; }
132 HGraph* graph() const { return chunk_->graph(); } 133 HGraph* graph() const { return chunk_->graph(); }
133 134
134 int GetNextEmittedBlock(int block); 135 int GetNextEmittedBlock(int block);
135 LInstruction* GetNextInstruction(); 136 LInstruction* GetNextInstruction();
136 137
137 void EmitClassOfTest(Label* if_true, 138 void EmitClassOfTest(Label* if_true,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 private: 301 private:
301 LCodeGen* codegen_; 302 LCodeGen* codegen_;
302 Label entry_; 303 Label entry_;
303 Label exit_; 304 Label exit_;
304 Label* external_exit_; 305 Label* external_exit_;
305 }; 306 };
306 307
307 } } // namespace v8::internal 308 } } // namespace v8::internal
308 309
309 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 310 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698