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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 10544205: Fix optimized code caching in FastNewClosureStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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 | « src/arm/code-stubs-arm.cc ('k') | test/cctest/test-compiler.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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 __ IncrementCounter(counters->fast_new_closure_try_optimized(), 1, t2, t3); 152 __ IncrementCounter(counters->fast_new_closure_try_optimized(), 1, t2, t3);
153 153
154 // a2 holds global context, a1 points to fixed array of 3-element entries 154 // a2 holds global context, a1 points to fixed array of 3-element entries
155 // (global context, optimized code, literals). 155 // (global context, optimized code, literals).
156 // The optimized code map must never be empty, so check the first elements. 156 // The optimized code map must never be empty, so check the first elements.
157 Label install_optimized; 157 Label install_optimized;
158 // Speculatively move code object into t0. 158 // Speculatively move code object into t0.
159 __ lw(t0, FieldMemOperand(a1, FixedArray::kHeaderSize + kPointerSize)); 159 __ lw(t0, FieldMemOperand(a1, FixedArray::kHeaderSize + kPointerSize));
160 __ lw(t1, FieldMemOperand(a1, FixedArray::kHeaderSize)); 160 __ lw(t1, FieldMemOperand(a1, FixedArray::kHeaderSize));
161 __ Branch(&install_optimized, eq, a2, Operand(t1)); 161 __ Branch(&install_optimized, eq, a2, Operand(t1));
162 __ Branch(&install_unoptimized);
163 162
164 // Iterate through the rest of map backwards. t0 holds an index as a Smi. 163 // Iterate through the rest of map backwards. t0 holds an index as a Smi.
165 Label loop; 164 Label loop;
166 __ lw(t0, FieldMemOperand(a1, FixedArray::kLengthOffset)); 165 __ lw(t0, FieldMemOperand(a1, FixedArray::kLengthOffset));
167 __ bind(&loop); 166 __ bind(&loop);
168 // Do not double check first entry. 167 // Do not double check first entry.
169 168
170 __ Branch(&install_unoptimized, eq, t0, 169 __ Branch(&install_unoptimized, eq, t0,
171 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); 170 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength)));
172 __ Subu(t0, t0, Operand( 171 __ Subu(t0, t0, Operand(
(...skipping 7592 matching lines...) Expand 10 before | Expand all | Expand 10 after
7765 __ Ret(USE_DELAY_SLOT); 7764 __ Ret(USE_DELAY_SLOT);
7766 __ mov(v0, a0); 7765 __ mov(v0, a0);
7767 } 7766 }
7768 7767
7769 7768
7770 #undef __ 7769 #undef __
7771 7770
7772 } } // namespace v8::internal 7771 } } // namespace v8::internal
7773 7772
7774 #endif // V8_TARGET_ARCH_MIPS 7773 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698