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

Side by Side Diff: src/a64/lithium-codegen-a64.cc

Issue 132193011: A64: Temporary fix for predictable code size in LCodeGen::DoStackCheck. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 4557 matching lines...) Expand 10 before | Expand all | Expand 10 after
4568 ASSERT(instr->HasEnvironment()); 4568 ASSERT(instr->HasEnvironment());
4569 LEnvironment* env = instr->environment(); 4569 LEnvironment* env = instr->environment();
4570 // There is no LLazyBailout instruction for stack-checks. We have to 4570 // There is no LLazyBailout instruction for stack-checks. We have to
4571 // prepare for lazy deoptimization explicitly here. 4571 // prepare for lazy deoptimization explicitly here.
4572 if (instr->hydrogen()->is_function_entry()) { 4572 if (instr->hydrogen()->is_function_entry()) {
4573 // Perform stack overflow check. 4573 // Perform stack overflow check.
4574 Label done; 4574 Label done;
4575 __ CompareRoot(masm()->StackPointer(), Heap::kStackLimitRootIndex); 4575 __ CompareRoot(masm()->StackPointer(), Heap::kStackLimitRootIndex);
4576 __ B(hs, &done); 4576 __ B(hs, &done);
4577 4577
4578 // TODO(jbramley): This PredictableCodeSizeScope fails sometimes. Sometimes 4578 // TODO(bafsa): Make sure that the EnsureSpaceForLazyDeopt inside
4579 // the code tries to generate 3 instructions, and sometimes it tries to 4579 // CallCodeGeneric will not insert any nop while calling the stub by
4580 // generate 2. Work out why, and fix it. 4580 // inserting them now. The EnsureSpaceForLazyDeopt in CallCodeGeneric
4581 // will go away at some point during the rebase (r18642) so this will become
4582 // unecessary and should be removed at this point.
4583 EnsureSpaceForLazyDeopt();
4584
4581 PredictableCodeSizeScope predictable(masm_, 4585 PredictableCodeSizeScope predictable(masm_,
4582 Assembler::kCallSizeWithRelocation); 4586 Assembler::kCallSizeWithRelocation);
4583 StackCheckStub stub; 4587 StackCheckStub stub;
4584 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 4588 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
4585 EnsureSpaceForLazyDeopt(); 4589 EnsureSpaceForLazyDeopt();
4586 last_lazy_deopt_pc_ = masm()->pc_offset(); 4590 last_lazy_deopt_pc_ = masm()->pc_offset();
4587 4591
4588 __ Bind(&done); 4592 __ Bind(&done);
4589 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 4593 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
4590 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 4594 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
5493 __ Bind(&out_of_object); 5497 __ Bind(&out_of_object);
5494 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5498 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5495 // Index is equal to negated out of object property index plus 1. 5499 // Index is equal to negated out of object property index plus 1.
5496 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5500 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5497 __ Ldr(result, FieldMemOperand(result, 5501 __ Ldr(result, FieldMemOperand(result,
5498 FixedArray::kHeaderSize - kPointerSize)); 5502 FixedArray::kHeaderSize - kPointerSize));
5499 __ Bind(&done); 5503 __ Bind(&done);
5500 } 5504 }
5501 5505
5502 } } // namespace v8::internal 5506 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698