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

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

Issue 174639: Use a root array register for constant loads and stack guards on x64.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 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/x64/register-allocator-x64-inl.h ('k') | src/x64/virtual-frame-x64.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 __ push(holder); 427 __ push(holder);
428 __ push(name_); 428 __ push(name_);
429 429
430 CompileCallLoadPropertyWithInterceptor(masm, 430 CompileCallLoadPropertyWithInterceptor(masm,
431 receiver, 431 receiver,
432 holder, 432 holder,
433 name_, 433 name_,
434 holder_obj); 434 holder_obj);
435 435
436 Label interceptor_failed; 436 Label interceptor_failed;
437 __ Cmp(rax, Factory::no_interceptor_result_sentinel()); 437 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex);
438 __ j(equal, &interceptor_failed); 438 __ j(equal, &interceptor_failed);
439 __ LeaveInternalFrame(); 439 __ LeaveInternalFrame();
440 __ ret(0); 440 __ ret(0);
441 441
442 __ bind(&interceptor_failed); 442 __ bind(&interceptor_failed);
443 __ pop(name_); 443 __ pop(name_);
444 __ pop(holder); 444 __ pop(holder);
445 if (lookup->type() == CALLBACKS) { 445 if (lookup->type() == CALLBACKS) {
446 __ pop(receiver); 446 __ pop(receiver);
447 } 447 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 masm, 605 masm,
606 receiver, 606 receiver,
607 holder, 607 holder,
608 // Under EnterInternalFrame this refers to name. 608 // Under EnterInternalFrame this refers to name.
609 Operand(rbp, (argc_ + 3) * kPointerSize), 609 Operand(rbp, (argc_ + 3) * kPointerSize),
610 holder_obj); 610 holder_obj);
611 611
612 __ pop(receiver); // restore holder 612 __ pop(receiver); // restore holder
613 __ LeaveInternalFrame(); 613 __ LeaveInternalFrame();
614 614
615 __ Cmp(rax, Factory::no_interceptor_result_sentinel()); 615 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex);
616 Label invoke; 616 Label invoke;
617 __ j(not_equal, &invoke); 617 __ j(not_equal, &invoke);
618 618
619 stub_compiler->CheckPrototypes(holder_obj, receiver, 619 stub_compiler->CheckPrototypes(holder_obj, receiver,
620 lookup->holder(), scratch1, 620 lookup->holder(), scratch1,
621 scratch2, 621 scratch2,
622 name, 622 name,
623 miss_label); 623 miss_label);
624 if (lookup->holder()->IsGlobalObject()) { 624 if (lookup->holder()->IsGlobalObject()) {
625 __ movq(rdx, Operand(rsp, (argc_ + 1) * kPointerSize)); 625 __ movq(rdx, Operand(rsp, (argc_ + 1) * kPointerSize));
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 Context::NUMBER_FUNCTION_INDEX, 748 Context::NUMBER_FUNCTION_INDEX,
749 rcx); 749 rcx);
750 CheckPrototypes(JSObject::cast(object->GetPrototype()), rcx, holder, 750 CheckPrototypes(JSObject::cast(object->GetPrototype()), rcx, holder,
751 rbx, rdx, name, &miss); 751 rbx, rdx, name, &miss);
752 break; 752 break;
753 } 753 }
754 754
755 case BOOLEAN_CHECK: { 755 case BOOLEAN_CHECK: {
756 Label fast; 756 Label fast;
757 // Check that the object is a boolean. 757 // Check that the object is a boolean.
758 __ Cmp(rdx, Factory::true_value()); 758 __ CompareRoot(rdx, Heap::kTrueValueRootIndex);
759 __ j(equal, &fast); 759 __ j(equal, &fast);
760 __ Cmp(rdx, Factory::false_value()); 760 __ CompareRoot(rdx, Heap::kFalseValueRootIndex);
761 __ j(not_equal, &miss); 761 __ j(not_equal, &miss);
762 __ bind(&fast); 762 __ bind(&fast);
763 // Check that the maps starting from the prototype haven't changed. 763 // Check that the maps starting from the prototype haven't changed.
764 GenerateLoadGlobalFunctionPrototype(masm(), 764 GenerateLoadGlobalFunctionPrototype(masm(),
765 Context::BOOLEAN_FUNCTION_INDEX, 765 Context::BOOLEAN_FUNCTION_INDEX,
766 rcx); 766 rcx);
767 CheckPrototypes(JSObject::cast(object->GetPrototype()), rcx, holder, 767 CheckPrototypes(JSObject::cast(object->GetPrototype()), rcx, holder,
768 rbx, rdx, name, &miss); 768 rbx, rdx, name, &miss);
769 break; 769 break;
770 } 770 }
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 1118
1119 // Check that the maps haven't changed. 1119 // Check that the maps haven't changed.
1120 CheckPrototypes(object, rax, holder, rbx, rdx, name, &miss); 1120 CheckPrototypes(object, rax, holder, rbx, rdx, name, &miss);
1121 1121
1122 // Get the value from the cell. 1122 // Get the value from the cell.
1123 __ Move(rax, Handle<JSGlobalPropertyCell>(cell)); 1123 __ Move(rax, Handle<JSGlobalPropertyCell>(cell));
1124 __ movq(rax, FieldOperand(rax, JSGlobalPropertyCell::kValueOffset)); 1124 __ movq(rax, FieldOperand(rax, JSGlobalPropertyCell::kValueOffset));
1125 1125
1126 // Check for deleted property if property can actually be deleted. 1126 // Check for deleted property if property can actually be deleted.
1127 if (!is_dont_delete) { 1127 if (!is_dont_delete) {
1128 __ Cmp(rax, Factory::the_hole_value()); 1128 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex);
1129 __ j(equal, &miss); 1129 __ j(equal, &miss);
1130 } else if (FLAG_debug_code) { 1130 } else if (FLAG_debug_code) {
1131 __ Cmp(rax, Factory::the_hole_value()); 1131 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex);
1132 __ Check(not_equal, "DontDelete cells can't contain the hole"); 1132 __ Check(not_equal, "DontDelete cells can't contain the hole");
1133 } 1133 }
1134 1134
1135 __ IncrementCounter(&Counters::named_load_global_inline, 1); 1135 __ IncrementCounter(&Counters::named_load_global_inline, 1);
1136 __ ret(0); 1136 __ ret(0);
1137 1137
1138 __ bind(&miss); 1138 __ bind(&miss);
1139 __ IncrementCounter(&Counters::named_load_global_inline_miss, 1); 1139 __ IncrementCounter(&Counters::named_load_global_inline_miss, 1);
1140 GenerateLoadMiss(masm(), Code::LOAD_IC); 1140 GenerateLoadMiss(masm(), Code::LOAD_IC);
1141 1141
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 1746 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
1747 1747
1748 // Return the generated code. 1748 // Return the generated code.
1749 return GetCode(); 1749 return GetCode();
1750 } 1750 }
1751 1751
1752 1752
1753 #undef __ 1753 #undef __
1754 1754
1755 } } // namespace v8::internal 1755 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/register-allocator-x64-inl.h ('k') | src/x64/virtual-frame-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698