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

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

Issue 9215010: Merge r10006, r10087 and r10126 from bleeding edge to the 3.6 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.6/
Patch Set: Created 8 years, 11 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/arm/deoptimizer-arm.cc ('k') | src/arm/lithium-codegen-arm.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 current_instruction_(-1), 51 current_instruction_(-1),
52 instructions_(chunk->instructions()), 52 instructions_(chunk->instructions()),
53 deoptimizations_(4), 53 deoptimizations_(4),
54 deopt_jump_table_(4), 54 deopt_jump_table_(4),
55 deoptimization_literals_(8), 55 deoptimization_literals_(8),
56 inlined_function_count_(0), 56 inlined_function_count_(0),
57 scope_(info->scope()), 57 scope_(info->scope()),
58 status_(UNUSED), 58 status_(UNUSED),
59 deferred_(8), 59 deferred_(8),
60 osr_pc_offset_(-1), 60 osr_pc_offset_(-1),
61 last_lazy_deopt_pc_(0),
61 resolver_(this), 62 resolver_(this),
62 expected_safepoint_kind_(Safepoint::kSimple) { 63 expected_safepoint_kind_(Safepoint::kSimple) {
63 PopulateDeoptimizationLiteralsWithInlinedFunctions(); 64 PopulateDeoptimizationLiteralsWithInlinedFunctions();
64 } 65 }
65 66
66 67
67 // Simple accessors. 68 // Simple accessors.
68 MacroAssembler* masm() const { return masm_; } 69 MacroAssembler* masm() const { return masm_; }
69 CompilationInfo* info() const { return info_; } 70 CompilationInfo* info() const { return info_; }
70 Isolate* isolate() const { return info_->isolate(); } 71 Isolate* isolate() const { return info_->isolate(); }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 template<int T> 105 template<int T>
105 void DoDeferredBinaryOpStub(LTemplateInstruction<1, 2, T>* instr, 106 void DoDeferredBinaryOpStub(LTemplateInstruction<1, 2, T>* instr,
106 Token::Value op); 107 Token::Value op);
107 void DoDeferredNumberTagD(LNumberTagD* instr); 108 void DoDeferredNumberTagD(LNumberTagD* instr);
108 void DoDeferredNumberTagI(LNumberTagI* instr); 109 void DoDeferredNumberTagI(LNumberTagI* instr);
109 void DoDeferredTaggedToI(LTaggedToI* instr); 110 void DoDeferredTaggedToI(LTaggedToI* instr);
110 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); 111 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr);
111 void DoDeferredStackCheck(LStackCheck* instr); 112 void DoDeferredStackCheck(LStackCheck* instr);
112 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); 113 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr);
113 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); 114 void DoDeferredStringCharFromCode(LStringCharFromCode* instr);
114 void DoDeferredLInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, 115 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr,
115 Label* map_check); 116 Label* map_check);
116 117
117 // Parallel move support. 118 // Parallel move support.
118 void DoParallelMove(LParallelMove* move); 119 void DoParallelMove(LParallelMove* move);
119 void DoGap(LGap* instr); 120 void DoGap(LGap* instr);
120 121
121 // Emit frame translation commands for an environment. 122 // Emit frame translation commands for an environment.
122 void WriteTranslation(LEnvironment* environment, Translation* translation); 123 void WriteTranslation(LEnvironment* environment, Translation* translation);
123 124
124 // Declare methods that deal with the individual node types. 125 // Declare methods that deal with the individual node types.
125 #define DECLARE_DO(type) void Do##type(L##type* node); 126 #define DECLARE_DO(type) void Do##type(L##type* node);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 208
208 // Generate a direct call to a known function. Expects the function 209 // Generate a direct call to a known function. Expects the function
209 // to be in edi. 210 // to be in edi.
210 void CallKnownFunction(Handle<JSFunction> function, 211 void CallKnownFunction(Handle<JSFunction> function,
211 int arity, 212 int arity,
212 LInstruction* instr, 213 LInstruction* instr,
213 CallKind call_kind); 214 CallKind call_kind);
214 215
215 void LoadHeapObject(Register result, Handle<HeapObject> object); 216 void LoadHeapObject(Register result, Handle<HeapObject> object);
216 217
217 void RegisterLazyDeoptimization(LInstruction* instr, 218 void RecordSafepointWithLazyDeopt(LInstruction* instr,
218 SafepointMode safepoint_mode); 219 SafepointMode safepoint_mode);
219 220
220 void RegisterEnvironmentForDeoptimization(LEnvironment* environment); 221 void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
222 Safepoint::DeoptMode mode);
221 void DeoptimizeIf(Condition cc, LEnvironment* environment); 223 void DeoptimizeIf(Condition cc, LEnvironment* environment);
222 224
223 void AddToTranslation(Translation* translation, 225 void AddToTranslation(Translation* translation,
224 LOperand* op, 226 LOperand* op,
225 bool is_tagged); 227 bool is_tagged);
226 void PopulateDeoptimizationData(Handle<Code> code); 228 void PopulateDeoptimizationData(Handle<Code> code);
227 int DefineDeoptimizationLiteral(Handle<Object> literal); 229 int DefineDeoptimizationLiteral(Handle<Object> literal);
228 230
229 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); 231 void PopulateDeoptimizationLiteralsWithInlinedFunctions();
230 232
231 Register ToRegister(int index) const; 233 Register ToRegister(int index) const;
232 DoubleRegister ToDoubleRegister(int index) const; 234 DoubleRegister ToDoubleRegister(int index) const;
233 235
234 // Specific math operations - used from DoUnaryMathOperation. 236 // Specific math operations - used from DoUnaryMathOperation.
235 void EmitIntegerMathAbs(LUnaryMathOperation* instr); 237 void EmitIntegerMathAbs(LUnaryMathOperation* instr);
236 void DoMathAbs(LUnaryMathOperation* instr); 238 void DoMathAbs(LUnaryMathOperation* instr);
237 void DoMathFloor(LUnaryMathOperation* instr); 239 void DoMathFloor(LUnaryMathOperation* instr);
238 void DoMathRound(LUnaryMathOperation* instr); 240 void DoMathRound(LUnaryMathOperation* instr);
239 void DoMathSqrt(LUnaryMathOperation* instr); 241 void DoMathSqrt(LUnaryMathOperation* instr);
240 void DoMathPowHalf(LUnaryMathOperation* instr); 242 void DoMathPowHalf(LUnaryMathOperation* instr);
241 void DoMathLog(LUnaryMathOperation* instr); 243 void DoMathLog(LUnaryMathOperation* instr);
242 void DoMathCos(LUnaryMathOperation* instr); 244 void DoMathCos(LUnaryMathOperation* instr);
243 void DoMathSin(LUnaryMathOperation* instr); 245 void DoMathSin(LUnaryMathOperation* instr);
244 246
245 // Support for recording safepoint and position information. 247 // Support for recording safepoint and position information.
246 void RecordSafepoint(LPointerMap* pointers, 248 void RecordSafepoint(LPointerMap* pointers,
247 Safepoint::Kind kind, 249 Safepoint::Kind kind,
248 int arguments, 250 int arguments,
249 int deoptimization_index); 251 Safepoint::DeoptMode mode);
250 void RecordSafepoint(LPointerMap* pointers, int deoptimization_index); 252 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode);
251 void RecordSafepoint(int deoptimization_index); 253 void RecordSafepoint(Safepoint::DeoptMode mode);
252 void RecordSafepointWithRegisters(LPointerMap* pointers, 254 void RecordSafepointWithRegisters(LPointerMap* pointers,
253 int arguments, 255 int arguments,
254 int deoptimization_index); 256 Safepoint::DeoptMode mode);
255 void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers, 257 void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers,
256 int arguments, 258 int arguments,
257 int deoptimization_index); 259 Safepoint::DeoptMode mode);
258 void RecordPosition(int position); 260 void RecordPosition(int position);
259 int LastSafepointEnd() {
260 return static_cast<int>(safepoints_.GetPcAfterGap());
261 }
262 261
263 static Condition TokenToCondition(Token::Value op, bool is_unsigned); 262 static Condition TokenToCondition(Token::Value op, bool is_unsigned);
264 void EmitGoto(int block); 263 void EmitGoto(int block);
265 void EmitBranch(int left_block, int right_block, Condition cc); 264 void EmitBranch(int left_block, int right_block, Condition cc);
266 void EmitCmpI(LOperand* left, LOperand* right); 265 void EmitCmpI(LOperand* left, LOperand* right);
267 void EmitNumberUntagD(Register input, 266 void EmitNumberUntagD(Register input,
268 DoubleRegister result, 267 DoubleRegister result,
269 bool deoptimize_on_undefined, 268 bool deoptimize_on_undefined,
270 LEnvironment* env); 269 LEnvironment* env);
271 270
(...skipping 21 matching lines...) Expand all
293 Handle<String> name); 292 Handle<String> name);
294 293
295 struct JumpTableEntry { 294 struct JumpTableEntry {
296 explicit inline JumpTableEntry(Address entry) 295 explicit inline JumpTableEntry(Address entry)
297 : label(), 296 : label(),
298 address(entry) { } 297 address(entry) { }
299 Label label; 298 Label label;
300 Address address; 299 Address address;
301 }; 300 };
302 301
302 void EnsureSpaceForLazyDeopt();
303
303 LChunk* const chunk_; 304 LChunk* const chunk_;
304 MacroAssembler* const masm_; 305 MacroAssembler* const masm_;
305 CompilationInfo* const info_; 306 CompilationInfo* const info_;
306 307
307 int current_block_; 308 int current_block_;
308 int current_instruction_; 309 int current_instruction_;
309 const ZoneList<LInstruction*>* instructions_; 310 const ZoneList<LInstruction*>* instructions_;
310 ZoneList<LEnvironment*> deoptimizations_; 311 ZoneList<LEnvironment*> deoptimizations_;
311 ZoneList<JumpTableEntry> deopt_jump_table_; 312 ZoneList<JumpTableEntry> deopt_jump_table_;
312 ZoneList<Handle<Object> > deoptimization_literals_; 313 ZoneList<Handle<Object> > deoptimization_literals_;
313 int inlined_function_count_; 314 int inlined_function_count_;
314 Scope* const scope_; 315 Scope* const scope_;
315 Status status_; 316 Status status_;
316 TranslationBuffer translations_; 317 TranslationBuffer translations_;
317 ZoneList<LDeferredCode*> deferred_; 318 ZoneList<LDeferredCode*> deferred_;
318 int osr_pc_offset_; 319 int osr_pc_offset_;
320 int last_lazy_deopt_pc_;
319 321
320 // Builder that keeps track of safepoints in the code. The table 322 // Builder that keeps track of safepoints in the code. The table
321 // itself is emitted at the end of the generated code. 323 // itself is emitted at the end of the generated code.
322 SafepointTableBuilder safepoints_; 324 SafepointTableBuilder safepoints_;
323 325
324 // Compiler from a set of parallel moves to a sequential list of moves. 326 // Compiler from a set of parallel moves to a sequential list of moves.
325 LGapResolver resolver_; 327 LGapResolver resolver_;
326 328
327 Safepoint::Kind expected_safepoint_kind_; 329 Safepoint::Kind expected_safepoint_kind_;
328 330
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 private: 396 private:
395 LCodeGen* codegen_; 397 LCodeGen* codegen_;
396 Label entry_; 398 Label entry_;
397 Label exit_; 399 Label exit_;
398 Label* external_exit_; 400 Label* external_exit_;
399 }; 401 };
400 402
401 } } // namespace v8::internal 403 } } // namespace v8::internal
402 404
403 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ 405 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698