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

Side by Side Diff: src/ic/x64/handler-compiler-x64.cc

Issue 527093002: Make concrete classes for individual call descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 277
278 278
279 void ElementHandlerCompiler::GenerateLoadDictionaryElement( 279 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
280 MacroAssembler* masm) { 280 MacroAssembler* masm) {
281 // ----------- S t a t e ------------- 281 // ----------- S t a t e -------------
282 // -- rcx : key 282 // -- rcx : key
283 // -- rdx : receiver 283 // -- rdx : receiver
284 // -- rsp[0] : return address 284 // -- rsp[0] : return address
285 // ----------------------------------- 285 // -----------------------------------
286 DCHECK(rdx.is(LoadConvention::ReceiverRegister())); 286 DCHECK(rdx.is(LoadDescriptor::ReceiverRegister()));
287 DCHECK(rcx.is(LoadConvention::NameRegister())); 287 DCHECK(rcx.is(LoadDescriptor::NameRegister()));
288 Label slow, miss; 288 Label slow, miss;
289 289
290 // This stub is meant to be tail-jumped to, the receiver must already 290 // This stub is meant to be tail-jumped to, the receiver must already
291 // have been verified by the caller to not be a smi. 291 // have been verified by the caller to not be a smi.
292 292
293 __ JumpIfNotSmi(rcx, &miss); 293 __ JumpIfNotSmi(rcx, &miss);
294 __ SmiToInteger32(rbx, rcx); 294 __ SmiToInteger32(rbx, rcx);
295 __ movp(rax, FieldOperand(rdx, JSObject::kElementsOffset)); 295 __ movp(rax, FieldOperand(rdx, JSObject::kElementsOffset));
296 296
297 // Check whether the elements is a number dictionary. 297 // Check whether the elements is a number dictionary.
(...skipping 16 matching lines...) Expand all
314 // ----------- S t a t e ------------- 314 // ----------- S t a t e -------------
315 // -- rcx : key 315 // -- rcx : key
316 // -- rdx : receiver 316 // -- rdx : receiver
317 // -- rsp[0] : return address 317 // -- rsp[0] : return address
318 // ----------------------------------- 318 // -----------------------------------
319 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 319 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
320 } 320 }
321 321
322 322
323 static void StoreIC_PushArgs(MacroAssembler* masm) { 323 static void StoreIC_PushArgs(MacroAssembler* masm) {
324 Register receiver = StoreConvention::ReceiverRegister(); 324 Register receiver = StoreDescriptor::ReceiverRegister();
325 Register name = StoreConvention::NameRegister(); 325 Register name = StoreDescriptor::NameRegister();
326 Register value = StoreConvention::ValueRegister(); 326 Register value = StoreDescriptor::ValueRegister();
327 327
328 DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value)); 328 DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
329 329
330 __ PopReturnAddressTo(rbx); 330 __ PopReturnAddressTo(rbx);
331 __ Push(receiver); 331 __ Push(receiver);
332 __ Push(name); 332 __ Push(name);
333 __ Push(value); 333 __ Push(value);
334 __ PushReturnAddressFrom(rbx); 334 __ PushReturnAddressFrom(rbx);
335 } 335 }
336 336
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 ExternalReference store_ic_property = ExternalReference( 832 ExternalReference store_ic_property = ExternalReference(
833 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 833 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
834 __ TailCallExternalReference(store_ic_property, 3, 1); 834 __ TailCallExternalReference(store_ic_property, 3, 1);
835 835
836 // Return the generated code. 836 // Return the generated code.
837 return GetCode(kind(), Code::FAST, name); 837 return GetCode(kind(), Code::FAST, name);
838 } 838 }
839 839
840 840
841 Register NamedStoreHandlerCompiler::value() { 841 Register NamedStoreHandlerCompiler::value() {
842 return StoreConvention::ValueRegister(); 842 return StoreDescriptor::ValueRegister();
843 } 843 }
844 844
845 845
846 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( 846 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
847 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { 847 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
848 Label miss; 848 Label miss;
849 FrontendHeader(receiver(), name, &miss); 849 FrontendHeader(receiver(), name, &miss);
850 850
851 // Get the value from the cell. 851 // Get the value from the cell.
852 Register result = StoreConvention::ValueRegister(); 852 Register result = StoreDescriptor::ValueRegister();
853 __ Move(result, cell); 853 __ Move(result, cell);
854 __ movp(result, FieldOperand(result, PropertyCell::kValueOffset)); 854 __ movp(result, FieldOperand(result, PropertyCell::kValueOffset));
855 855
856 // Check for deleted property if property can actually be deleted. 856 // Check for deleted property if property can actually be deleted.
857 if (is_configurable) { 857 if (is_configurable) {
858 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 858 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
859 __ j(equal, &miss); 859 __ j(equal, &miss);
860 } else if (FLAG_debug_code) { 860 } else if (FLAG_debug_code) {
861 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 861 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
862 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); 862 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole);
863 } 863 }
864 864
865 Counters* counters = isolate()->counters(); 865 Counters* counters = isolate()->counters();
866 __ IncrementCounter(counters->named_load_global_stub(), 1); 866 __ IncrementCounter(counters->named_load_global_stub(), 1);
867 __ ret(0); 867 __ ret(0);
868 868
869 FrontendFooter(name, &miss); 869 FrontendFooter(name, &miss);
870 870
871 // Return the generated code. 871 // Return the generated code.
872 return GetCode(kind(), Code::NORMAL, name); 872 return GetCode(kind(), Code::NORMAL, name);
873 } 873 }
874 874
875 875
876 #undef __ 876 #undef __
877 } 877 }
878 } // namespace v8::internal 878 } // namespace v8::internal
879 879
880 #endif // V8_TARGET_ARCH_X64 880 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698