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

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

Issue 71163006: Merge bleeding_edge r17376:17693. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Fix all.gyp Created 7 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
« no previous file with comments | « src/x64/ic-x64.cc ('k') | src/x64/lithium-codegen-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 void CallRuntime(Runtime::FunctionId id, 187 void CallRuntime(Runtime::FunctionId id,
188 int num_arguments, 188 int num_arguments,
189 LInstruction* instr) { 189 LInstruction* instr) {
190 const Runtime::Function* function = Runtime::FunctionForId(id); 190 const Runtime::Function* function = Runtime::FunctionForId(id);
191 CallRuntime(function, num_arguments, instr); 191 CallRuntime(function, num_arguments, instr);
192 } 192 }
193 193
194 void CallRuntimeFromDeferred(Runtime::FunctionId id, 194 void CallRuntimeFromDeferred(Runtime::FunctionId id,
195 int argc, 195 int argc,
196 LInstruction* instr); 196 LInstruction* instr,
197 LOperand* context);
198
199 void LoadContextFromDeferred(LOperand* context);
197 200
198 enum RDIState { 201 enum RDIState {
199 RDI_UNINITIALIZED, 202 RDI_UNINITIALIZED,
200 RDI_CONTAINS_TARGET 203 RDI_CONTAINS_TARGET
201 }; 204 };
202 205
203 // Generate a direct call to a known function. Expects the function 206 // Generate a direct call to a known function. Expects the function
204 // to be in rdi. 207 // to be in rdi.
205 void CallKnownFunction(Handle<JSFunction> function, 208 void CallKnownFunction(Handle<JSFunction> function,
206 int formal_parameter_count, 209 int formal_parameter_count,
207 int arity, 210 int arity,
208 LInstruction* instr, 211 LInstruction* instr,
209 CallKind call_kind, 212 CallKind call_kind,
210 RDIState rdi_state); 213 RDIState rdi_state);
211 214
212 void RecordSafepointWithLazyDeopt(LInstruction* instr, 215 void RecordSafepointWithLazyDeopt(LInstruction* instr,
213 SafepointMode safepoint_mode, 216 SafepointMode safepoint_mode,
214 int argc); 217 int argc);
215 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, 218 void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
216 Safepoint::DeoptMode mode); 219 Safepoint::DeoptMode mode);
217 void DeoptimizeIf(Condition cc, 220 void DeoptimizeIf(Condition cc,
218 LEnvironment* environment, 221 LEnvironment* environment,
219 Deoptimizer::BailoutType bailout_type); 222 Deoptimizer::BailoutType bailout_type);
220 void DeoptimizeIf(Condition cc, LEnvironment* environment); 223 void DeoptimizeIf(Condition cc, LEnvironment* environment);
221 void ApplyCheckIf(Condition cc, LBoundsCheck* check); 224 void ApplyCheckIf(Condition cc, LBoundsCheck* check);
222 225
226 bool DeoptEveryNTimes() {
227 return FLAG_deopt_every_n_times != 0 && !info()->IsStub();
228 }
229
223 void AddToTranslation(LEnvironment* environment, 230 void AddToTranslation(LEnvironment* environment,
224 Translation* translation, 231 Translation* translation,
225 LOperand* op, 232 LOperand* op,
226 bool is_tagged, 233 bool is_tagged,
227 bool is_uint32, 234 bool is_uint32,
228 int* object_index_pointer, 235 int* object_index_pointer,
229 int* dematerialized_index_pointer); 236 int* dematerialized_index_pointer);
230 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code); 237 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code);
231 void PopulateDeoptimizationData(Handle<Code> code); 238 void PopulateDeoptimizationData(Handle<Code> code);
232 int DefineDeoptimizationLiteral(Handle<Object> literal); 239 int DefineDeoptimizationLiteral(Handle<Object> literal);
233 240
234 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); 241 void PopulateDeoptimizationLiteralsWithInlinedFunctions();
235 242
236 Register ToRegister(int index) const; 243 Register ToRegister(int index) const;
237 XMMRegister ToDoubleRegister(int index) const; 244 XMMRegister ToDoubleRegister(int index) const;
238 Operand BuildFastArrayOperand( 245 Operand BuildFastArrayOperand(
239 LOperand* elements_pointer, 246 LOperand* elements_pointer,
240 LOperand* key, 247 LOperand* key,
241 ElementsKind elements_kind, 248 ElementsKind elements_kind,
242 uint32_t offset, 249 uint32_t offset,
243 uint32_t additional_index = 0); 250 uint32_t additional_index = 0);
244 251
252 Operand BuildSeqStringOperand(Register string,
253 LOperand* index,
254 String::Encoding encoding);
255
245 void EmitIntegerMathAbs(LMathAbs* instr); 256 void EmitIntegerMathAbs(LMathAbs* instr);
246 void EmitSmiMathAbs(LMathAbs* instr); 257 void EmitSmiMathAbs(LMathAbs* instr);
247 258
248 // Support for recording safepoint and position information. 259 // Support for recording safepoint and position information.
249 void RecordSafepoint(LPointerMap* pointers, 260 void RecordSafepoint(LPointerMap* pointers,
250 Safepoint::Kind kind, 261 Safepoint::Kind kind,
251 int arguments, 262 int arguments,
252 Safepoint::DeoptMode mode); 263 Safepoint::DeoptMode mode);
253 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); 264 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode);
254 void RecordSafepoint(Safepoint::DeoptMode mode); 265 void RecordSafepoint(Safepoint::DeoptMode mode);
255 void RecordSafepointWithRegisters(LPointerMap* pointers, 266 void RecordSafepointWithRegisters(LPointerMap* pointers,
256 int arguments, 267 int arguments,
257 Safepoint::DeoptMode mode); 268 Safepoint::DeoptMode mode);
258 void RecordAndWritePosition(int position) V8_OVERRIDE; 269 void RecordAndWritePosition(int position) V8_OVERRIDE;
259 270
260 static Condition TokenToCondition(Token::Value op, bool is_unsigned); 271 static Condition TokenToCondition(Token::Value op, bool is_unsigned);
261 void EmitGoto(int block); 272 void EmitGoto(int block);
273
274 // EmitBranch expects to be the last instruction of a block.
262 template<class InstrType> 275 template<class InstrType>
263 void EmitBranch(InstrType instr, Condition cc); 276 void EmitBranch(InstrType instr, Condition cc);
264 template<class InstrType> 277 template<class InstrType>
265 void EmitFalseBranch(InstrType instr, Condition cc); 278 void EmitFalseBranch(InstrType instr, Condition cc);
266 void EmitNumberUntagD( 279 void EmitNumberUntagD(
267 Register input, 280 Register input,
268 XMMRegister result, 281 XMMRegister result,
269 bool allow_undefined_as_nan, 282 bool allow_undefined_as_nan,
270 bool deoptimize_on_minus_zero, 283 bool deoptimize_on_minus_zero,
271 LEnvironment* env, 284 LEnvironment* env,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 Label entry_; 412 Label entry_;
400 Label exit_; 413 Label exit_;
401 Label done_; 414 Label done_;
402 Label* external_exit_; 415 Label* external_exit_;
403 int instruction_index_; 416 int instruction_index_;
404 }; 417 };
405 418
406 } } // namespace v8::internal 419 } } // namespace v8::internal
407 420
408 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ 421 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/x64/ic-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698