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

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

Issue 6541053: Add more generic version of reloc info padding to ensure enough space for rel... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 10 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_(chunk->graph()->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 reloc_padding_count_(0),
63 resolver_(this) { 64 resolver_(this) {
64 PopulateDeoptimizationLiteralsWithInlinedFunctions(); 65 PopulateDeoptimizationLiteralsWithInlinedFunctions();
65 } 66 }
66 67
67 // Simple accessors. 68 // Simple accessors.
68 MacroAssembler* masm() const { return masm_; } 69 MacroAssembler* masm() const { return masm_; }
69 70
70 // Support for converting LOperands to assembler types. 71 // Support for converting LOperands to assembler types.
71 Operand ToOperand(LOperand* op) const; 72 Operand ToOperand(LOperand* op) const;
72 Register ToRegister(LOperand* op) const; 73 Register ToRegister(LOperand* op) const;
(...skipping 22 matching lines...) Expand all
95 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); 96 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr);
96 void DoDeferredLInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, 97 void DoDeferredLInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr,
97 Label* map_check); 98 Label* map_check);
98 99
99 // Parallel move support. 100 // Parallel move support.
100 void DoParallelMove(LParallelMove* move); 101 void DoParallelMove(LParallelMove* move);
101 102
102 // Emit frame translation commands for an environment. 103 // Emit frame translation commands for an environment.
103 void WriteTranslation(LEnvironment* environment, Translation* translation); 104 void WriteTranslation(LEnvironment* environment, Translation* translation);
104 105
106 void AddRelocPadding(int count) { reloc_padding_count_ += count; }
Søren Thygesen Gjesse 2011/02/21 13:27:20 AddRelocPadding -> AddRelocPaddingForDeoptimizatio
107
105 // Declare methods that deal with the individual node types. 108 // Declare methods that deal with the individual node types.
106 #define DECLARE_DO(type) void Do##type(L##type* node); 109 #define DECLARE_DO(type) void Do##type(L##type* node);
107 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 110 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
108 #undef DECLARE_DO 111 #undef DECLARE_DO
109 112
110 private: 113 private:
111 enum Status { 114 enum Status {
112 UNUSED, 115 UNUSED,
113 GENERATING, 116 GENERATING,
114 DONE, 117 DONE,
(...skipping 29 matching lines...) Expand all
144 void Abort(const char* format, ...); 147 void Abort(const char* format, ...);
145 void Comment(const char* format, ...); 148 void Comment(const char* format, ...);
146 149
147 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code); } 150 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code); }
148 151
149 // Code generation passes. Returns true if code generation should 152 // Code generation passes. Returns true if code generation should
150 // continue. 153 // continue.
151 bool GeneratePrologue(); 154 bool GeneratePrologue();
152 bool GenerateBody(); 155 bool GenerateBody();
153 bool GenerateDeferredCode(); 156 bool GenerateDeferredCode();
157 // Pad the reloc info to ensure that we have enough space to patch during
158 // deoptimization.
159 bool GenerateRelocPadding();
154 bool GenerateSafepointTable(); 160 bool GenerateSafepointTable();
155 161
156 void CallCode(Handle<Code> code, RelocInfo::Mode mode, LInstruction* instr, 162 void CallCode(Handle<Code> code, RelocInfo::Mode mode, LInstruction* instr,
157 bool adjusted = true); 163 bool adjusted = true);
158 void CallRuntime(Runtime::Function* fun, int argc, LInstruction* instr, 164 void CallRuntime(Runtime::Function* fun, int argc, LInstruction* instr,
159 bool adjusted = true); 165 bool adjusted = true);
160 void CallRuntime(Runtime::FunctionId id, int argc, LInstruction* instr, 166 void CallRuntime(Runtime::FunctionId id, int argc, LInstruction* instr,
161 bool adjusted = true) { 167 bool adjusted = true) {
162 Runtime::Function* function = Runtime::FunctionForId(id); 168 Runtime::Function* function = Runtime::FunctionForId(id);
163 CallRuntime(function, argc, instr, adjusted); 169 CallRuntime(function, argc, instr, adjusted);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 int current_instruction_; 249 int current_instruction_;
244 const ZoneList<LInstruction*>* instructions_; 250 const ZoneList<LInstruction*>* instructions_;
245 ZoneList<LEnvironment*> deoptimizations_; 251 ZoneList<LEnvironment*> deoptimizations_;
246 ZoneList<Handle<Object> > deoptimization_literals_; 252 ZoneList<Handle<Object> > deoptimization_literals_;
247 int inlined_function_count_; 253 int inlined_function_count_;
248 Scope* const scope_; 254 Scope* const scope_;
249 Status status_; 255 Status status_;
250 TranslationBuffer translations_; 256 TranslationBuffer translations_;
251 ZoneList<LDeferredCode*> deferred_; 257 ZoneList<LDeferredCode*> deferred_;
252 int osr_pc_offset_; 258 int osr_pc_offset_;
259 int reloc_padding_count_;
Søren Thygesen Gjesse 2011/02/21 13:27:20 reloc_padding_count_ -> reloc_padding_count_for_de
253 260
254 // Builder that keeps track of safepoints in the code. The table 261 // Builder that keeps track of safepoints in the code. The table
255 // itself is emitted at the end of the generated code. 262 // itself is emitted at the end of the generated code.
256 SafepointTableBuilder safepoints_; 263 SafepointTableBuilder safepoints_;
257 264
258 // Compiler from a set of parallel moves to a sequential list of moves. 265 // Compiler from a set of parallel moves to a sequential list of moves.
259 LGapResolver resolver_; 266 LGapResolver resolver_;
260 267
261 friend class LDeferredCode; 268 friend class LDeferredCode;
262 friend class LEnvironment; 269 friend class LEnvironment;
(...skipping 23 matching lines...) Expand all
286 private: 293 private:
287 LCodeGen* codegen_; 294 LCodeGen* codegen_;
288 Label entry_; 295 Label entry_;
289 Label exit_; 296 Label exit_;
290 Label* external_exit_; 297 Label* external_exit_;
291 }; 298 };
292 299
293 } } // namespace v8::internal 300 } } // namespace v8::internal
294 301
295 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 302 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698