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

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

Issue 20288002: Merged r15808, r15811 into 3.19 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Created 7 years, 5 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 | src/mips/lithium-codegen-mips.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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 if (FLAG_code_comments && instr->HasInterestingComment(this)) { 272 if (FLAG_code_comments && instr->HasInterestingComment(this)) {
273 Comment(";;; <@%d,#%d> %s", 273 Comment(";;; <@%d,#%d> %s",
274 current_instruction_, 274 current_instruction_,
275 instr->hydrogen_value()->id(), 275 instr->hydrogen_value()->id(),
276 instr->Mnemonic()); 276 instr->Mnemonic());
277 } 277 }
278 278
279 instr->CompileToNative(this); 279 instr->CompileToNative(this);
280 } 280 }
281 EnsureSpaceForLazyDeopt(); 281 EnsureSpaceForLazyDeopt();
282 last_lazy_deopt_pc_ = masm()->pc_offset();
282 return !is_aborted(); 283 return !is_aborted();
283 } 284 }
284 285
285 286
286 bool LCodeGen::GenerateDeferredCode() { 287 bool LCodeGen::GenerateDeferredCode() {
287 ASSERT(is_generating()); 288 ASSERT(is_generating());
288 if (deferred_.length() > 0) { 289 if (deferred_.length() > 0) {
289 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 290 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
290 LDeferredCode* code = deferred_[i]; 291 LDeferredCode* code = deferred_[i];
291 Comment(";;; <@%d,#%d> " 292 Comment(";;; <@%d,#%d> "
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 TargetAddressStorageMode storage_mode) { 721 TargetAddressStorageMode storage_mode) {
721 CallCodeGeneric(code, mode, instr, RECORD_SIMPLE_SAFEPOINT, storage_mode); 722 CallCodeGeneric(code, mode, instr, RECORD_SIMPLE_SAFEPOINT, storage_mode);
722 } 723 }
723 724
724 725
725 void LCodeGen::CallCodeGeneric(Handle<Code> code, 726 void LCodeGen::CallCodeGeneric(Handle<Code> code,
726 RelocInfo::Mode mode, 727 RelocInfo::Mode mode,
727 LInstruction* instr, 728 LInstruction* instr,
728 SafepointMode safepoint_mode, 729 SafepointMode safepoint_mode,
729 TargetAddressStorageMode storage_mode) { 730 TargetAddressStorageMode storage_mode) {
731 EnsureSpaceForLazyDeopt();
730 ASSERT(instr != NULL); 732 ASSERT(instr != NULL);
731 // Block literal pool emission to ensure nop indicating no inlined smi code 733 // Block literal pool emission to ensure nop indicating no inlined smi code
732 // is in the correct position. 734 // is in the correct position.
733 Assembler::BlockConstPoolScope block_const_pool(masm()); 735 Assembler::BlockConstPoolScope block_const_pool(masm());
734 LPointerMap* pointers = instr->pointer_map(); 736 LPointerMap* pointers = instr->pointer_map();
735 RecordPosition(pointers->position()); 737 RecordPosition(pointers->position());
736 __ Call(code, mode, TypeFeedbackId::None(), al, storage_mode); 738 __ Call(code, mode, TypeFeedbackId::None(), al, storage_mode);
737 RecordSafepointWithLazyDeopt(instr, safepoint_mode); 739 RecordSafepointWithLazyDeopt(instr, safepoint_mode);
738 740
739 // Signal that we don't inline smi code before these stubs in the 741 // Signal that we don't inline smi code before these stubs in the
(...skipping 4914 matching lines...) Expand 10 before | Expand all | Expand 10 after
5654 if (current_pc < last_lazy_deopt_pc_ + patch_size) { 5656 if (current_pc < last_lazy_deopt_pc_ + patch_size) {
5655 // Block literal pool emission for duration of padding. 5657 // Block literal pool emission for duration of padding.
5656 Assembler::BlockConstPoolScope block_const_pool(masm()); 5658 Assembler::BlockConstPoolScope block_const_pool(masm());
5657 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; 5659 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc;
5658 ASSERT_EQ(0, padding_size % Assembler::kInstrSize); 5660 ASSERT_EQ(0, padding_size % Assembler::kInstrSize);
5659 while (padding_size > 0) { 5661 while (padding_size > 0) {
5660 __ nop(); 5662 __ nop();
5661 padding_size -= Assembler::kInstrSize; 5663 padding_size -= Assembler::kInstrSize;
5662 } 5664 }
5663 } 5665 }
5664 last_lazy_deopt_pc_ = masm()->pc_offset();
5665 } 5666 }
5666 5667
5667 5668
5668 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { 5669 void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
5669 EnsureSpaceForLazyDeopt(); 5670 EnsureSpaceForLazyDeopt();
5671 last_lazy_deopt_pc_ = masm()->pc_offset();
5670 ASSERT(instr->HasEnvironment()); 5672 ASSERT(instr->HasEnvironment());
5671 LEnvironment* env = instr->environment(); 5673 LEnvironment* env = instr->environment();
5672 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 5674 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
5673 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 5675 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
5674 } 5676 }
5675 5677
5676 5678
5677 void LCodeGen::DoDeoptimize(LDeoptimize* instr) { 5679 void LCodeGen::DoDeoptimize(LDeoptimize* instr) {
5678 if (instr->hydrogen_value()->IsSoftDeoptimize()) { 5680 if (instr->hydrogen_value()->IsSoftDeoptimize()) {
5679 SoftDeoptimize(instr->environment()); 5681 SoftDeoptimize(instr->environment());
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
5744 if (instr->hydrogen()->is_function_entry()) { 5746 if (instr->hydrogen()->is_function_entry()) {
5745 // Perform stack overflow check. 5747 // Perform stack overflow check.
5746 Label done; 5748 Label done;
5747 __ LoadRoot(ip, Heap::kStackLimitRootIndex); 5749 __ LoadRoot(ip, Heap::kStackLimitRootIndex);
5748 __ cmp(sp, Operand(ip)); 5750 __ cmp(sp, Operand(ip));
5749 __ b(hs, &done); 5751 __ b(hs, &done);
5750 StackCheckStub stub; 5752 StackCheckStub stub;
5751 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); 5753 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize);
5752 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 5754 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
5753 EnsureSpaceForLazyDeopt(); 5755 EnsureSpaceForLazyDeopt();
5756 last_lazy_deopt_pc_ = masm()->pc_offset();
5754 __ bind(&done); 5757 __ bind(&done);
5755 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 5758 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
5756 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 5759 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
5757 } else { 5760 } else {
5758 ASSERT(instr->hydrogen()->is_backwards_branch()); 5761 ASSERT(instr->hydrogen()->is_backwards_branch());
5759 // Perform stack overflow check if this goto needs it before jumping. 5762 // Perform stack overflow check if this goto needs it before jumping.
5760 DeferredStackCheck* deferred_stack_check = 5763 DeferredStackCheck* deferred_stack_check =
5761 new(zone()) DeferredStackCheck(this, instr); 5764 new(zone()) DeferredStackCheck(this, instr);
5762 __ LoadRoot(ip, Heap::kStackLimitRootIndex); 5765 __ LoadRoot(ip, Heap::kStackLimitRootIndex);
5763 __ cmp(sp, Operand(ip)); 5766 __ cmp(sp, Operand(ip));
5764 __ b(lo, deferred_stack_check->entry()); 5767 __ b(lo, deferred_stack_check->entry());
5765 EnsureSpaceForLazyDeopt(); 5768 EnsureSpaceForLazyDeopt();
5769 last_lazy_deopt_pc_ = masm()->pc_offset();
5766 __ bind(instr->done_label()); 5770 __ bind(instr->done_label());
5767 deferred_stack_check->SetExit(instr->done_label()); 5771 deferred_stack_check->SetExit(instr->done_label());
5768 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 5772 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
5769 // Don't record a deoptimization index for the safepoint here. 5773 // Don't record a deoptimization index for the safepoint here.
5770 // This will be done explicitly when emitting call and the safepoint in 5774 // This will be done explicitly when emitting call and the safepoint in
5771 // the deferred code. 5775 // the deferred code.
5772 } 5776 }
5773 } 5777 }
5774 5778
5775 5779
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
5880 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5884 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5881 __ ldr(result, FieldMemOperand(scratch, 5885 __ ldr(result, FieldMemOperand(scratch,
5882 FixedArray::kHeaderSize - kPointerSize)); 5886 FixedArray::kHeaderSize - kPointerSize));
5883 __ bind(&done); 5887 __ bind(&done);
5884 } 5888 }
5885 5889
5886 5890
5887 #undef __ 5891 #undef __
5888 5892
5889 } } // namespace v8::internal 5893 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698