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

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

Issue 8492004: Fix lazy deoptimization at HInvokeFunction and enable target-recording call-function stub. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: added unit test Created 9 years, 1 month 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void FinishCode(Handle<Code> code); 94 void FinishCode(Handle<Code> code);
95 95
96 // Deferred code support. 96 // Deferred code support.
97 void DoDeferredNumberTagD(LNumberTagD* instr); 97 void DoDeferredNumberTagD(LNumberTagD* instr);
98 void DoDeferredNumberTagI(LNumberTagI* instr); 98 void DoDeferredNumberTagI(LNumberTagI* instr);
99 void DoDeferredTaggedToI(LTaggedToI* instr); 99 void DoDeferredTaggedToI(LTaggedToI* instr);
100 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); 100 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr);
101 void DoDeferredStackCheck(LStackCheck* instr); 101 void DoDeferredStackCheck(LStackCheck* instr);
102 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); 102 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr);
103 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); 103 void DoDeferredStringCharFromCode(LStringCharFromCode* instr);
104 void DoDeferredLInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, 104 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr,
105 Label* map_check); 105 Label* map_check);
106 106
107 // Parallel move support. 107 // Parallel move support.
108 void DoParallelMove(LParallelMove* move); 108 void DoParallelMove(LParallelMove* move);
109 void DoGap(LGap* instr); 109 void DoGap(LGap* instr);
110 110
111 // Emit frame translation commands for an environment. 111 // Emit frame translation commands for an environment.
112 void WriteTranslation(LEnvironment* environment, Translation* translation); 112 void WriteTranslation(LEnvironment* environment, Translation* translation);
113 113
114 void EnsureRelocSpaceForDeoptimization(); 114 void EnsureRelocSpaceForDeoptimization();
115 115
(...skipping 21 matching lines...) Expand all
137 bool dynamic_frame_alignment() const { return dynamic_frame_alignment_; } 137 bool dynamic_frame_alignment() const { return dynamic_frame_alignment_; }
138 void set_dynamic_frame_alignment(bool value) { 138 void set_dynamic_frame_alignment(bool value) {
139 dynamic_frame_alignment_ = value; 139 dynamic_frame_alignment_ = value;
140 } 140 }
141 141
142 LChunk* chunk() const { return chunk_; } 142 LChunk* chunk() const { return chunk_; }
143 Scope* scope() const { return scope_; } 143 Scope* scope() const { return scope_; }
144 HGraph* graph() const { return chunk_->graph(); } 144 HGraph* graph() const { return chunk_->graph(); }
145 145
146 int GetNextEmittedBlock(int block); 146 int GetNextEmittedBlock(int block);
147 LInstruction* GetNextInstruction();
148 147
149 void EmitClassOfTest(Label* if_true, 148 void EmitClassOfTest(Label* if_true,
150 Label* if_false, 149 Label* if_false,
151 Handle<String> class_name, 150 Handle<String> class_name,
152 Register input, 151 Register input,
153 Register temporary, 152 Register temporary,
154 Register temporary2); 153 Register temporary2);
155 154
156 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } 155 int GetStackSlotCount() const { return chunk()->spill_slot_count(); }
157 int GetParameterCount() const { return scope()->num_parameters(); } 156 int GetParameterCount() const { return scope()->num_parameters(); }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 202
204 // Generate a direct call to a known function. Expects the function 203 // Generate a direct call to a known function. Expects the function
205 // to be in edi. 204 // to be in edi.
206 void CallKnownFunction(Handle<JSFunction> function, 205 void CallKnownFunction(Handle<JSFunction> function,
207 int arity, 206 int arity,
208 LInstruction* instr, 207 LInstruction* instr,
209 CallKind call_kind); 208 CallKind call_kind);
210 209
211 void LoadHeapObject(Register result, Handle<HeapObject> object); 210 void LoadHeapObject(Register result, Handle<HeapObject> object);
212 211
213 void RegisterLazyDeoptimization(LInstruction* instr, 212 void RecordSafepointWithLazyDeopt(LInstruction* instr,
214 SafepointMode safepoint_mode); 213 SafepointMode safepoint_mode);
215 214
216 void RegisterEnvironmentForDeoptimization(LEnvironment* environment); 215 void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
Vyacheslav Egorov (Chromium) 2011/11/10 15:50:54 maybe use Safepoint::DeoptMode instead of boolean?
fschneider 2011/11/11 14:09:08 Done.
216 bool is_lazy);
217 void DeoptimizeIf(Condition cc, LEnvironment* environment); 217 void DeoptimizeIf(Condition cc, LEnvironment* environment);
218 218
219 void AddToTranslation(Translation* translation, 219 void AddToTranslation(Translation* translation,
220 LOperand* op, 220 LOperand* op,
221 bool is_tagged); 221 bool is_tagged);
222 void PopulateDeoptimizationData(Handle<Code> code); 222 void PopulateDeoptimizationData(Handle<Code> code);
223 int DefineDeoptimizationLiteral(Handle<Object> literal); 223 int DefineDeoptimizationLiteral(Handle<Object> literal);
224 224
225 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); 225 void PopulateDeoptimizationLiteralsWithInlinedFunctions();
226 226
(...skipping 14 matching lines...) Expand all
241 void DoMathSqrt(LUnaryMathOperation* instr); 241 void DoMathSqrt(LUnaryMathOperation* instr);
242 void DoMathPowHalf(LUnaryMathOperation* instr); 242 void DoMathPowHalf(LUnaryMathOperation* instr);
243 void DoMathLog(LUnaryMathOperation* instr); 243 void DoMathLog(LUnaryMathOperation* instr);
244 void DoMathCos(LUnaryMathOperation* instr); 244 void DoMathCos(LUnaryMathOperation* instr);
245 void DoMathSin(LUnaryMathOperation* instr); 245 void DoMathSin(LUnaryMathOperation* instr);
246 246
247 // Support for recording safepoint and position information. 247 // Support for recording safepoint and position information.
248 void RecordSafepoint(LPointerMap* pointers, 248 void RecordSafepoint(LPointerMap* pointers,
249 Safepoint::Kind kind, 249 Safepoint::Kind kind,
250 int arguments, 250 int arguments,
251 int deoptimization_index); 251 Safepoint::DeoptMode mode);
252 void RecordSafepoint(LPointerMap* pointers, int deoptimization_index); 252 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode);
253 void RecordSafepoint(int deoptimization_index); 253 void RecordSafepoint(Safepoint::DeoptMode mode);
254 void RecordSafepointWithRegisters(LPointerMap* pointers, 254 void RecordSafepointWithRegisters(LPointerMap* pointers,
255 int arguments, 255 int arguments,
256 int deoptimization_index); 256 Safepoint::DeoptMode mode);
257 void RecordPosition(int position); 257 void RecordPosition(int position);
258 int LastSafepointEnd() {
259 return static_cast<int>(safepoints_.GetPcAfterGap());
260 }
261 258
262 static Condition TokenToCondition(Token::Value op, bool is_unsigned); 259 static Condition TokenToCondition(Token::Value op, bool is_unsigned);
263 void EmitGoto(int block); 260 void EmitGoto(int block);
264 void EmitBranch(int left_block, int right_block, Condition cc); 261 void EmitBranch(int left_block, int right_block, Condition cc);
265 void EmitNumberUntagD(Register input, 262 void EmitNumberUntagD(Register input,
266 XMMRegister result, 263 XMMRegister result,
267 bool deoptimize_on_undefined, 264 bool deoptimize_on_undefined,
268 LEnvironment* env); 265 LEnvironment* env);
269 266
270 // Emits optimized code for typeof x == "y". Modifies input register. 267 // Emits optimized code for typeof x == "y". Modifies input register.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 LCodeGen* codegen_; 374 LCodeGen* codegen_;
378 Label entry_; 375 Label entry_;
379 Label exit_; 376 Label exit_;
380 Label* external_exit_; 377 Label* external_exit_;
381 int instruction_index_; 378 int instruction_index_;
382 }; 379 };
383 380
384 } } // namespace v8::internal 381 } } // namespace v8::internal
385 382
386 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 383 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698