@@ -259,8 +259,9 @@ bool LCodeGen::GenerateDeferredCode() {
259
259
for (int i = 0 ; !is_aborted () && i < deferred_.length (); i++) {
260
260
LDeferredCode* code = deferred_[i];
261
261
262
- int pos = instructions_->at (code->instruction_index ())->position ();
263
- RecordAndUpdatePosition (pos);
262
+ HValue* value =
263
+ instructions_->at (code->instruction_index ())->hydrogen_value ();
264
+ RecordAndWritePosition (value->position ());
264
265
265
266
Comment (" ;;; <@%d,#%d> "
266
267
" -------------------- Deferred %s --------------------" ,
@@ -685,8 +686,6 @@ void LCodeGen::CallCodeGeneric(Handle<Code> code,
685
686
// Block literal pool emission to ensure nop indicating no inlined smi code
686
687
// is in the correct position.
687
688
Assembler::BlockConstPoolScope block_const_pool (masm ());
688
- LPointerMap* pointers = instr->pointer_map ();
689
- RecordPosition (pointers->position ());
690
689
__ Call (code, mode, TypeFeedbackId::None (), al, storage_mode);
691
690
RecordSafepointWithLazyDeopt (instr, safepoint_mode);
692
691
@@ -704,9 +703,6 @@ void LCodeGen::CallRuntime(const Runtime::Function* function,
704
703
LInstruction* instr,
705
704
SaveFPRegsMode save_doubles) {
706
705
ASSERT (instr != NULL );
707
- LPointerMap* pointers = instr->pointer_map ();
708
- ASSERT (pointers != NULL );
709
- RecordPosition (pointers->position ());
710
706
711
707
__ CallRuntime (function, num_arguments, save_doubles);
712
708
@@ -964,7 +960,7 @@ void LCodeGen::RecordSafepoint(LPointerMap* pointers,
964
960
965
961
966
962
void LCodeGen::RecordSafepoint (Safepoint::DeoptMode deopt_mode) {
967
- LPointerMap empty_pointers (RelocInfo:: kNoPosition , zone ());
963
+ LPointerMap empty_pointers (zone ());
968
964
RecordSafepoint (&empty_pointers, deopt_mode);
969
965
}
970
966
@@ -986,17 +982,10 @@ void LCodeGen::RecordSafepointWithRegistersAndDoubles(
986
982
}
987
983
988
984
989
- void LCodeGen::RecordPosition (int position) {
985
+ void LCodeGen::RecordAndWritePosition (int position) {
990
986
if (position == RelocInfo::kNoPosition ) return ;
991
987
masm ()->positions_recorder ()->RecordPosition (position);
992
- }
993
-
994
-
995
- void LCodeGen::RecordAndUpdatePosition (int position) {
996
- if (position >= 0 && position != old_position_) {
997
- masm ()->positions_recorder ()->RecordPosition (position);
998
- old_position_ = position;
999
- }
988
+ masm ()->positions_recorder ()->WriteRecordedPositions ();
1000
989
}
1001
990
1002
991
@@ -3507,7 +3496,6 @@ void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
3507
3496
__ bind (&invoke);
3508
3497
ASSERT (instr->HasPointerMap ());
3509
3498
LPointerMap* pointers = instr->pointer_map ();
3510
- RecordPosition (pointers->position ());
3511
3499
SafepointGenerator safepoint_generator (
3512
3500
this , pointers, Safepoint::kLazyDeopt );
3513
3501
// The number of arguments is stored in receiver which is r0, as expected
@@ -3597,7 +3585,6 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
3597
3585
dont_adapt_arguments || formal_parameter_count == arity;
3598
3586
3599
3587
LPointerMap* pointers = instr->pointer_map ();
3600
- RecordPosition (pointers->position ());
3601
3588
3602
3589
if (can_invoke_directly) {
3603
3590
if (r1_state == R1_UNINITIALIZED) {
@@ -4009,7 +3996,6 @@ void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) {
4009
3996
Handle <JSFunction> known_function = instr->hydrogen ()->known_function ();
4010
3997
if (known_function.is_null ()) {
4011
3998
LPointerMap* pointers = instr->pointer_map ();
4012
- RecordPosition (pointers->position ());
4013
3999
SafepointGenerator generator (this , pointers, Safepoint::kLazyDeopt );
4014
4000
ParameterCount count (instr->arity ());
4015
4001
__ InvokeFunction (r1, count, CALL_FUNCTION, generator, CALL_AS_METHOD);
0 commit comments