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

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

Issue 9117023: Merge r10457 into the 3.7 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.7/
Patch Set: Created 8 years, 11 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4129 matching lines...) Expand 10 before | Expand all | Expand 10 after
4140 ASSERT(!ReturnTrueFalseObject() || HasCallSiteInlineCheck()); 4140 ASSERT(!ReturnTrueFalseObject() || HasCallSiteInlineCheck());
4141 4141
4142 // Fixed register usage throughout the stub: 4142 // Fixed register usage throughout the stub:
4143 const Register object = a0; // Object (lhs). 4143 const Register object = a0; // Object (lhs).
4144 Register map = a3; // Map of the object. 4144 Register map = a3; // Map of the object.
4145 const Register function = a1; // Function (rhs). 4145 const Register function = a1; // Function (rhs).
4146 const Register prototype = t0; // Prototype of the function. 4146 const Register prototype = t0; // Prototype of the function.
4147 const Register inline_site = t5; 4147 const Register inline_site = t5;
4148 const Register scratch = a2; 4148 const Register scratch = a2;
4149 4149
4150 const int32_t kDeltaToLoadBoolResult = 4 * kPointerSize; 4150 const int32_t kDeltaToLoadBoolResult = 5 * kPointerSize;
4151 4151
4152 Label slow, loop, is_instance, is_not_instance, not_js_object; 4152 Label slow, loop, is_instance, is_not_instance, not_js_object;
4153 4153
4154 if (!HasArgsInRegisters()) { 4154 if (!HasArgsInRegisters()) {
4155 __ lw(object, MemOperand(sp, 1 * kPointerSize)); 4155 __ lw(object, MemOperand(sp, 1 * kPointerSize));
4156 __ lw(function, MemOperand(sp, 0)); 4156 __ lw(function, MemOperand(sp, 0));
4157 } 4157 }
4158 4158
4159 // Check that the left hand is a JS object and load map. 4159 // Check that the left hand is a JS object and load map.
4160 __ JumpIfSmi(object, &not_js_object); 4160 __ JumpIfSmi(object, &not_js_object);
(...skipping 23 matching lines...) Expand all
4184 // Update the global instanceof or call site inlined cache with the current 4184 // Update the global instanceof or call site inlined cache with the current
4185 // map and function. The cached answer will be set when it is known below. 4185 // map and function. The cached answer will be set when it is known below.
4186 if (!HasCallSiteInlineCheck()) { 4186 if (!HasCallSiteInlineCheck()) {
4187 __ StoreRoot(function, Heap::kInstanceofCacheFunctionRootIndex); 4187 __ StoreRoot(function, Heap::kInstanceofCacheFunctionRootIndex);
4188 __ StoreRoot(map, Heap::kInstanceofCacheMapRootIndex); 4188 __ StoreRoot(map, Heap::kInstanceofCacheMapRootIndex);
4189 } else { 4189 } else {
4190 ASSERT(HasArgsInRegisters()); 4190 ASSERT(HasArgsInRegisters());
4191 // Patch the (relocated) inlined map check. 4191 // Patch the (relocated) inlined map check.
4192 4192
4193 // The offset was stored in t0 safepoint slot. 4193 // The offset was stored in t0 safepoint slot.
4194 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal) 4194 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal).
4195 __ LoadFromSafepointRegisterSlot(scratch, t0); 4195 __ LoadFromSafepointRegisterSlot(scratch, t0);
4196 __ Subu(inline_site, ra, scratch); 4196 __ Subu(inline_site, ra, scratch);
4197 // Patch the relocated value to map. 4197 // Get the map location in scratch and patch it.
4198 __ PatchRelocatedValue(inline_site, scratch, map); 4198 __ GetRelocatedValue(inline_site, scratch, v1); // v1 used as scratch.
4199 __ sw(map, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
4199 } 4200 }
4200 4201
4201 // Register mapping: a3 is object map and t0 is function prototype. 4202 // Register mapping: a3 is object map and t0 is function prototype.
4202 // Get prototype of object into a2. 4203 // Get prototype of object into a2.
4203 __ lw(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); 4204 __ lw(scratch, FieldMemOperand(map, Map::kPrototypeOffset));
4204 4205
4205 // We don't need map any more. Use it as a scratch register. 4206 // We don't need map any more. Use it as a scratch register.
4206 Register scratch2 = map; 4207 Register scratch2 = map;
4207 map = no_reg; 4208 map = no_reg;
4208 4209
(...skipping 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after
7532 __ Ret(USE_DELAY_SLOT); 7533 __ Ret(USE_DELAY_SLOT);
7533 __ mov(v0, a0); 7534 __ mov(v0, a0);
7534 } 7535 }
7535 7536
7536 7537
7537 #undef __ 7538 #undef __
7538 7539
7539 } } // namespace v8::internal 7540 } } // namespace v8::internal
7540 7541
7541 #endif // V8_TARGET_ARCH_MIPS 7542 #endif // V8_TARGET_ARCH_MIPS
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