OLD | NEW |
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 inlined_function_count_(0), | 60 inlined_function_count_(0), |
61 scope_(info->scope()), | 61 scope_(info->scope()), |
62 status_(UNUSED), | 62 status_(UNUSED), |
63 translations_(info->zone()), | 63 translations_(info->zone()), |
64 deferred_(8, info->zone()), | 64 deferred_(8, info->zone()), |
65 osr_pc_offset_(-1), | 65 osr_pc_offset_(-1), |
66 last_lazy_deopt_pc_(0), | 66 last_lazy_deopt_pc_(0), |
67 frame_is_built_(false), | 67 frame_is_built_(false), |
68 safepoints_(info->zone()), | 68 safepoints_(info->zone()), |
69 resolver_(this), | 69 resolver_(this), |
70 expected_safepoint_kind_(Safepoint::kSimple) { | 70 expected_safepoint_kind_(Safepoint::kSimple), |
| 71 old_position_(RelocInfo::kNoPosition) { |
71 PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 72 PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
72 } | 73 } |
73 | 74 |
74 // Simple accessors. | 75 // Simple accessors. |
75 MacroAssembler* masm() const { return masm_; } | 76 MacroAssembler* masm() const { return masm_; } |
76 CompilationInfo* info() const { return info_; } | 77 CompilationInfo* info() const { return info_; } |
77 Isolate* isolate() const { return info_->isolate(); } | 78 Isolate* isolate() const { return info_->isolate(); } |
78 Factory* factory() const { return isolate()->factory(); } | 79 Factory* factory() const { return isolate()->factory(); } |
79 Heap* heap() const { return isolate()->heap(); } | 80 Heap* heap() const { return isolate()->heap(); } |
80 Zone* zone() const { return zone_; } | 81 Zone* zone() const { return zone_; } |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 void RecordSafepoint(LPointerMap* pointers, | 275 void RecordSafepoint(LPointerMap* pointers, |
275 Safepoint::Kind kind, | 276 Safepoint::Kind kind, |
276 int arguments, | 277 int arguments, |
277 Safepoint::DeoptMode mode); | 278 Safepoint::DeoptMode mode); |
278 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); | 279 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); |
279 void RecordSafepoint(Safepoint::DeoptMode mode); | 280 void RecordSafepoint(Safepoint::DeoptMode mode); |
280 void RecordSafepointWithRegisters(LPointerMap* pointers, | 281 void RecordSafepointWithRegisters(LPointerMap* pointers, |
281 int arguments, | 282 int arguments, |
282 Safepoint::DeoptMode mode); | 283 Safepoint::DeoptMode mode); |
283 void RecordPosition(int position); | 284 void RecordPosition(int position); |
| 285 void RecordAndUpdatePosition(int position); |
284 | 286 |
285 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 287 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
286 void EmitGoto(int block); | 288 void EmitGoto(int block); |
287 template<class InstrType> | 289 template<class InstrType> |
288 void EmitBranch(InstrType instr, Condition cc); | 290 void EmitBranch(InstrType instr, Condition cc); |
289 void EmitNumberUntagD( | 291 void EmitNumberUntagD( |
290 Register input, | 292 Register input, |
291 XMMRegister result, | 293 XMMRegister result, |
292 bool allow_undefined_as_nan, | 294 bool allow_undefined_as_nan, |
293 bool deoptimize_on_minus_zero, | 295 bool deoptimize_on_minus_zero, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 378 |
377 // Builder that keeps track of safepoints in the code. The table | 379 // Builder that keeps track of safepoints in the code. The table |
378 // itself is emitted at the end of the generated code. | 380 // itself is emitted at the end of the generated code. |
379 SafepointTableBuilder safepoints_; | 381 SafepointTableBuilder safepoints_; |
380 | 382 |
381 // Compiler from a set of parallel moves to a sequential list of moves. | 383 // Compiler from a set of parallel moves to a sequential list of moves. |
382 LGapResolver resolver_; | 384 LGapResolver resolver_; |
383 | 385 |
384 Safepoint::Kind expected_safepoint_kind_; | 386 Safepoint::Kind expected_safepoint_kind_; |
385 | 387 |
| 388 int old_position_; |
| 389 |
386 class PushSafepointRegistersScope BASE_EMBEDDED { | 390 class PushSafepointRegistersScope BASE_EMBEDDED { |
387 public: | 391 public: |
388 explicit PushSafepointRegistersScope(LCodeGen* codegen) | 392 explicit PushSafepointRegistersScope(LCodeGen* codegen) |
389 : codegen_(codegen) { | 393 : codegen_(codegen) { |
390 ASSERT(codegen_->info()->is_calling()); | 394 ASSERT(codegen_->info()->is_calling()); |
391 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | 395 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); |
392 codegen_->masm_->PushSafepointRegisters(); | 396 codegen_->masm_->PushSafepointRegisters(); |
393 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; | 397 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; |
394 } | 398 } |
395 | 399 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 LCodeGen* codegen_; | 440 LCodeGen* codegen_; |
437 Label entry_; | 441 Label entry_; |
438 Label exit_; | 442 Label exit_; |
439 Label* external_exit_; | 443 Label* external_exit_; |
440 int instruction_index_; | 444 int instruction_index_; |
441 }; | 445 }; |
442 | 446 |
443 } } // namespace v8::internal | 447 } } // namespace v8::internal |
444 | 448 |
445 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 449 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
OLD | NEW |