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

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

Issue 6542062: Merge revisions 6894 and 6895 to the 3.0 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.0/
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
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/lithium-codegen-ia32.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 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 deoptimization_reloc_size(),
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 EnsureRelocSpaceForDeoptimization();
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 25 matching lines...) Expand all
140 void Abort(const char* format, ...); 143 void Abort(const char* format, ...);
141 void Comment(const char* format, ...); 144 void Comment(const char* format, ...);
142 145
143 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code); } 146 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code); }
144 147
145 // Code generation passes. Returns true if code generation should 148 // Code generation passes. Returns true if code generation should
146 // continue. 149 // continue.
147 bool GeneratePrologue(); 150 bool GeneratePrologue();
148 bool GenerateBody(); 151 bool GenerateBody();
149 bool GenerateDeferredCode(); 152 bool GenerateDeferredCode();
153 // Pad the reloc info to ensure that we have enough space to patch during
154 // deoptimization.
155 bool GenerateRelocPadding();
150 bool GenerateSafepointTable(); 156 bool GenerateSafepointTable();
151 157
152 void CallCode(Handle<Code> code, 158 void CallCode(Handle<Code> code,
153 RelocInfo::Mode mode, 159 RelocInfo::Mode mode,
154 LInstruction* instr); 160 LInstruction* instr);
155 void CallRuntime(Runtime::Function* function, 161 void CallRuntime(Runtime::Function* function,
156 int num_arguments, 162 int num_arguments,
157 LInstruction* instr); 163 LInstruction* instr);
158 void CallRuntime(Runtime::FunctionId id, 164 void CallRuntime(Runtime::FunctionId id,
159 int num_arguments, 165 int num_arguments,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 const ZoneList<LInstruction*>* instructions_; 244 const ZoneList<LInstruction*>* instructions_;
239 ZoneList<LEnvironment*> deoptimizations_; 245 ZoneList<LEnvironment*> deoptimizations_;
240 ZoneList<Handle<Object> > deoptimization_literals_; 246 ZoneList<Handle<Object> > deoptimization_literals_;
241 int inlined_function_count_; 247 int inlined_function_count_;
242 Scope* const scope_; 248 Scope* const scope_;
243 Status status_; 249 Status status_;
244 TranslationBuffer translations_; 250 TranslationBuffer translations_;
245 ZoneList<LDeferredCode*> deferred_; 251 ZoneList<LDeferredCode*> deferred_;
246 int osr_pc_offset_; 252 int osr_pc_offset_;
247 253
254 struct DeoptimizationRelocSize {
255 int min_size;
256 int last_pc_offset;
257 };
258
259 DeoptimizationRelocSize deoptimization_reloc_size;
260
248 // Builder that keeps track of safepoints in the code. The table 261 // Builder that keeps track of safepoints in the code. The table
249 // itself is emitted at the end of the generated code. 262 // itself is emitted at the end of the generated code.
250 SafepointTableBuilder safepoints_; 263 SafepointTableBuilder safepoints_;
251 264
252 // 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.
253 LGapResolver resolver_; 266 LGapResolver resolver_;
254 267
255 friend class LDeferredCode; 268 friend class LDeferredCode;
256 friend class LEnvironment; 269 friend class LEnvironment;
257 friend class SafepointGenerator; 270 friend class SafepointGenerator;
(...skipping 22 matching lines...) Expand all
280 private: 293 private:
281 LCodeGen* codegen_; 294 LCodeGen* codegen_;
282 Label entry_; 295 Label entry_;
283 Label exit_; 296 Label exit_;
284 Label* external_exit_; 297 Label* external_exit_;
285 }; 298 };
286 299
287 } } // namespace v8::internal 300 } } // namespace v8::internal
288 301
289 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 302 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698