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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 9694040: Merged r11022 into 3.7 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.7
Patch Set: Created 8 years, 9 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/stub-cache-arm.cc ('k') | src/mips/stub-cache-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 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 Handle<String> name, 1196 Handle<String> name,
1197 Label* miss) { 1197 Label* miss) {
1198 ASSERT(holder->IsGlobalObject()); 1198 ASSERT(holder->IsGlobalObject());
1199 1199
1200 // Get the number of arguments. 1200 // Get the number of arguments.
1201 const int argc = arguments().immediate(); 1201 const int argc = arguments().immediate();
1202 1202
1203 // Get the receiver from the stack. 1203 // Get the receiver from the stack.
1204 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 1204 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
1205 1205
1206 // If the object is the holder then we know that it's a global
1207 // object which can only happen for contextual calls. In this case,
1208 // the receiver cannot be a smi.
1209 if (!object.is_identical_to(holder)) {
1210 __ JumpIfSmi(edx, miss);
1211 }
1212 1206
1213 // Check that the maps haven't changed. 1207 // Check that the maps haven't changed.
1208 __ JumpIfSmi(edx, miss);
1214 CheckPrototypes(object, edx, holder, ebx, eax, edi, name, miss); 1209 CheckPrototypes(object, edx, holder, ebx, eax, edi, name, miss);
1215 } 1210 }
1216 1211
1217 1212
1218 void CallStubCompiler::GenerateLoadFunctionFromCell( 1213 void CallStubCompiler::GenerateLoadFunctionFromCell(
1219 Handle<JSGlobalPropertyCell> cell, 1214 Handle<JSGlobalPropertyCell> cell,
1220 Handle<JSFunction> function, 1215 Handle<JSFunction> function,
1221 Label* miss) { 1216 Label* miss) {
1222 // Get the value from the cell. 1217 // Get the value from the cell.
1223 if (Serializer::enabled()) { 1218 if (Serializer::enabled()) {
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
2765 Handle<JSGlobalPropertyCell> cell, 2760 Handle<JSGlobalPropertyCell> cell,
2766 Handle<String> name, 2761 Handle<String> name,
2767 bool is_dont_delete) { 2762 bool is_dont_delete) {
2768 // ----------- S t a t e ------------- 2763 // ----------- S t a t e -------------
2769 // -- eax : receiver 2764 // -- eax : receiver
2770 // -- ecx : name 2765 // -- ecx : name
2771 // -- esp[0] : return address 2766 // -- esp[0] : return address
2772 // ----------------------------------- 2767 // -----------------------------------
2773 Label miss; 2768 Label miss;
2774 2769
2775 // If the object is the holder then we know that it's a global
2776 // object which can only happen for contextual loads. In this case,
2777 // the receiver cannot be a smi.
2778 if (!object.is_identical_to(holder)) {
2779 __ JumpIfSmi(eax, &miss);
2780 }
2781
2782 // Check that the maps haven't changed. 2770 // Check that the maps haven't changed.
2771 __ JumpIfSmi(eax, &miss);
2783 CheckPrototypes(object, eax, holder, ebx, edx, edi, name, &miss); 2772 CheckPrototypes(object, eax, holder, ebx, edx, edi, name, &miss);
2784 2773
2785 // Get the value from the cell. 2774 // Get the value from the cell.
2786 if (Serializer::enabled()) { 2775 if (Serializer::enabled()) {
2787 __ mov(ebx, Immediate(cell)); 2776 __ mov(ebx, Immediate(cell));
2788 __ mov(ebx, FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset)); 2777 __ mov(ebx, FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset));
2789 } else { 2778 } else {
2790 __ mov(ebx, Operand::Cell(cell)); 2779 __ mov(ebx, Operand::Cell(cell));
2791 } 2780 }
2792 2781
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
3831 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); 3820 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
3832 __ jmp(ic_miss, RelocInfo::CODE_TARGET); 3821 __ jmp(ic_miss, RelocInfo::CODE_TARGET);
3833 } 3822 }
3834 3823
3835 3824
3836 #undef __ 3825 #undef __
3837 3826
3838 } } // namespace v8::internal 3827 } } // namespace v8::internal
3839 3828
3840 #endif // V8_TARGET_ARCH_IA32 3829 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698