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

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

Issue 11316218: Simplify and fix code aging. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed comment and rebased. Created 8 years 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/mips/full-codegen-mips.cc ('k') | src/objects.h » ('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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // cp: Callee's context. 129 // cp: Callee's context.
130 // fp: Caller's frame pointer. 130 // fp: Caller's frame pointer.
131 // lr: Caller's pc. 131 // lr: Caller's pc.
132 132
133 // Strict mode functions and builtins need to replace the receiver 133 // Strict mode functions and builtins need to replace the receiver
134 // with undefined when called as functions (without an explicit 134 // with undefined when called as functions (without an explicit
135 // receiver object). r5 is zero for method calls and non-zero for 135 // receiver object). r5 is zero for method calls and non-zero for
136 // function calls. 136 // function calls.
137 if (!info_->is_classic_mode() || info_->is_native()) { 137 if (!info_->is_classic_mode() || info_->is_native()) {
138 Label ok; 138 Label ok;
139 Label begin;
140 __ bind(&begin);
141 __ Branch(&ok, eq, t1, Operand(zero_reg)); 139 __ Branch(&ok, eq, t1, Operand(zero_reg));
142 140
143 int receiver_offset = scope()->num_parameters() * kPointerSize; 141 int receiver_offset = scope()->num_parameters() * kPointerSize;
144 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); 142 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
145 __ sw(a2, MemOperand(sp, receiver_offset)); 143 __ sw(a2, MemOperand(sp, receiver_offset));
146 __ bind(&ok); 144 __ bind(&ok);
147 ASSERT_EQ(kSizeOfOptimizedStrictModePrologue, ok.pos() - begin.pos());
148 } 145 }
149 146
147 info()->set_prologue_offset(masm_->pc_offset());
150 // The following three instructions must remain together and unmodified for 148 // The following three instructions must remain together and unmodified for
151 // code aging to work properly. 149 // code aging to work properly.
152 __ Push(ra, fp, cp, a1); 150 __ Push(ra, fp, cp, a1);
153 // Add unused load of ip to ensure prologue sequence is identical for 151 // Add unused load of ip to ensure prologue sequence is identical for
154 // full-codegen and lithium-codegen. 152 // full-codegen and lithium-codegen.
155 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); 153 __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
156 __ Addu(fp, sp, Operand(2 * kPointerSize)); // Adj. FP to point to saved FP. 154 __ Addu(fp, sp, Operand(2 * kPointerSize)); // Adj. FP to point to saved FP.
157 155
158 // Reserve space for the stack slots needed by the code. 156 // Reserve space for the stack slots needed by the code.
159 int slots = GetStackSlotCount(); 157 int slots = GetStackSlotCount();
(...skipping 5341 matching lines...) Expand 10 before | Expand all | Expand 10 after
5501 __ Subu(scratch, result, scratch); 5499 __ Subu(scratch, result, scratch);
5502 __ lw(result, FieldMemOperand(scratch, 5500 __ lw(result, FieldMemOperand(scratch,
5503 FixedArray::kHeaderSize - kPointerSize)); 5501 FixedArray::kHeaderSize - kPointerSize));
5504 __ bind(&done); 5502 __ bind(&done);
5505 } 5503 }
5506 5504
5507 5505
5508 #undef __ 5506 #undef __
5509 5507
5510 } } // namespace v8::internal 5508 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698