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

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

Issue 9158015: Change inlined cache of intanceof stub to use indirection through cell. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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/arm/lithium-codegen-arm.cc » ('j') | src/arm/lithium-codegen-arm.cc » ('J')
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 4063 matching lines...) Expand 10 before | Expand all | Expand 10 after
4074 ASSERT(!ReturnTrueFalseObject() || HasCallSiteInlineCheck()); 4074 ASSERT(!ReturnTrueFalseObject() || HasCallSiteInlineCheck());
4075 4075
4076 // Fixed register usage throughout the stub: 4076 // Fixed register usage throughout the stub:
4077 const Register object = r0; // Object (lhs). 4077 const Register object = r0; // Object (lhs).
4078 Register map = r3; // Map of the object. 4078 Register map = r3; // Map of the object.
4079 const Register function = r1; // Function (rhs). 4079 const Register function = r1; // Function (rhs).
4080 const Register prototype = r4; // Prototype of the function. 4080 const Register prototype = r4; // Prototype of the function.
4081 const Register inline_site = r9; 4081 const Register inline_site = r9;
4082 const Register scratch = r2; 4082 const Register scratch = r2;
4083 4083
4084 const int32_t kDeltaToLoadBoolResult = 3 * kPointerSize; 4084 const int32_t kDeltaToLoadBoolResult = 4 * kPointerSize;
4085 4085
4086 Label slow, loop, is_instance, is_not_instance, not_js_object; 4086 Label slow, loop, is_instance, is_not_instance, not_js_object;
4087 4087
4088 if (!HasArgsInRegisters()) { 4088 if (!HasArgsInRegisters()) {
4089 __ ldr(object, MemOperand(sp, 1 * kPointerSize)); 4089 __ ldr(object, MemOperand(sp, 1 * kPointerSize));
4090 __ ldr(function, MemOperand(sp, 0)); 4090 __ ldr(function, MemOperand(sp, 0));
4091 } 4091 }
4092 4092
4093 // Check that the left hand is a JS object and load map. 4093 // Check that the left hand is a JS object and load map.
4094 __ JumpIfSmi(object, &not_js_object); 4094 __ JumpIfSmi(object, &not_js_object);
(...skipping 30 matching lines...) Expand all
4125 } else { 4125 } else {
4126 ASSERT(HasArgsInRegisters()); 4126 ASSERT(HasArgsInRegisters());
4127 // Patch the (relocated) inlined map check. 4127 // Patch the (relocated) inlined map check.
4128 4128
4129 // The offset was stored in r4 safepoint slot. 4129 // The offset was stored in r4 safepoint slot.
4130 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal) 4130 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal)
4131 __ LoadFromSafepointRegisterSlot(scratch, r4); 4131 __ LoadFromSafepointRegisterSlot(scratch, r4);
4132 __ sub(inline_site, lr, scratch); 4132 __ sub(inline_site, lr, scratch);
4133 // Get the map location in scratch and patch it. 4133 // Get the map location in scratch and patch it.
4134 __ GetRelocatedValueLocation(inline_site, scratch); 4134 __ GetRelocatedValueLocation(inline_site, scratch);
4135 __ str(map, MemOperand(scratch)); 4135 __ ldr(scratch, MemOperand(scratch));
4136 __ str(map, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
4136 } 4137 }
4137 4138
4138 // Register mapping: r3 is object map and r4 is function prototype. 4139 // Register mapping: r3 is object map and r4 is function prototype.
4139 // Get prototype of object into r2. 4140 // Get prototype of object into r2.
4140 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); 4141 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset));
4141 4142
4142 // We don't need map any more. Use it as a scratch register. 4143 // We don't need map any more. Use it as a scratch register.
4143 Register scratch2 = map; 4144 Register scratch2 = map;
4144 map = no_reg; 4145 map = no_reg;
4145 4146
(...skipping 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after
7314 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, 7315 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10,
7315 &slow_elements); 7316 &slow_elements);
7316 __ Ret(); 7317 __ Ret();
7317 } 7318 }
7318 7319
7319 #undef __ 7320 #undef __
7320 7321
7321 } } // namespace v8::internal 7322 } } // namespace v8::internal
7322 7323
7323 #endif // V8_TARGET_ARCH_ARM 7324 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | src/arm/lithium-codegen-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698