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

Side by Side Diff: src/x64/stub-cache-x64.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/version.cc ('k') | test/mjsunit/regress/regress-117794.js » ('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 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 Handle<String> name, 1185 Handle<String> name,
1186 Label* miss) { 1186 Label* miss) {
1187 ASSERT(holder->IsGlobalObject()); 1187 ASSERT(holder->IsGlobalObject());
1188 1188
1189 // Get the number of arguments. 1189 // Get the number of arguments.
1190 const int argc = arguments().immediate(); 1190 const int argc = arguments().immediate();
1191 1191
1192 // Get the receiver from the stack. 1192 // Get the receiver from the stack.
1193 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); 1193 __ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize));
1194 1194
1195 // If the object is the holder then we know that it's a global
1196 // object which can only happen for contextual calls. In this case,
1197 // the receiver cannot be a smi.
1198 if (!object.is_identical_to(holder)) {
1199 __ JumpIfSmi(rdx, miss);
1200 }
1201 1195
1202 // Check that the maps haven't changed. 1196 // Check that the maps haven't changed.
1197 __ JumpIfSmi(rdx, miss);
1203 CheckPrototypes(object, rdx, holder, rbx, rax, rdi, name, miss); 1198 CheckPrototypes(object, rdx, holder, rbx, rax, rdi, name, miss);
1204 } 1199 }
1205 1200
1206 1201
1207 void CallStubCompiler::GenerateLoadFunctionFromCell( 1202 void CallStubCompiler::GenerateLoadFunctionFromCell(
1208 Handle<JSGlobalPropertyCell> cell, 1203 Handle<JSGlobalPropertyCell> cell,
1209 Handle<JSFunction> function, 1204 Handle<JSFunction> function,
1210 Label* miss) { 1205 Label* miss) {
1211 // Get the value from the cell. 1206 // Get the value from the cell.
1212 __ Move(rdi, cell); 1207 __ Move(rdi, cell);
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
2612 Handle<JSGlobalPropertyCell> cell, 2607 Handle<JSGlobalPropertyCell> cell,
2613 Handle<String> name, 2608 Handle<String> name,
2614 bool is_dont_delete) { 2609 bool is_dont_delete) {
2615 // ----------- S t a t e ------------- 2610 // ----------- S t a t e -------------
2616 // -- rax : receiver 2611 // -- rax : receiver
2617 // -- rcx : name 2612 // -- rcx : name
2618 // -- rsp[0] : return address 2613 // -- rsp[0] : return address
2619 // ----------------------------------- 2614 // -----------------------------------
2620 Label miss; 2615 Label miss;
2621 2616
2622 // If the object is the holder then we know that it's a global
2623 // object which can only happen for contextual loads. In this case,
2624 // the receiver cannot be a smi.
2625 if (!object.is_identical_to(holder)) {
2626 __ JumpIfSmi(rax, &miss);
2627 }
2628
2629 // Check that the maps haven't changed. 2617 // Check that the maps haven't changed.
2618 __ JumpIfSmi(rax, &miss);
2630 CheckPrototypes(object, rax, holder, rbx, rdx, rdi, name, &miss); 2619 CheckPrototypes(object, rax, holder, rbx, rdx, rdi, name, &miss);
2631 2620
2632 // Get the value from the cell. 2621 // Get the value from the cell.
2633 __ Move(rbx, cell); 2622 __ Move(rbx, cell);
2634 __ movq(rbx, FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset)); 2623 __ movq(rbx, FieldOperand(rbx, JSGlobalPropertyCell::kValueOffset));
2635 2624
2636 // Check for deleted property if property can actually be deleted. 2625 // Check for deleted property if property can actually be deleted.
2637 if (!is_dont_delete) { 2626 if (!is_dont_delete) {
2638 __ CompareRoot(rbx, Heap::kTheHoleValueRootIndex); 2627 __ CompareRoot(rbx, Heap::kTheHoleValueRootIndex);
2639 __ j(equal, &miss); 2628 __ j(equal, &miss);
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
3600 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); 3589 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
3601 __ jmp(ic_miss, RelocInfo::CODE_TARGET); 3590 __ jmp(ic_miss, RelocInfo::CODE_TARGET);
3602 } 3591 }
3603 3592
3604 3593
3605 #undef __ 3594 #undef __
3606 3595
3607 } } // namespace v8::internal 3596 } } // namespace v8::internal
3608 3597
3609 #endif // V8_TARGET_ARCH_X64 3598 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-117794.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698