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

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

Issue 148883002: Synchronize with r15594. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/hydrogen-instructions.cc ('k') | src/ia32/ic-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2892 matching lines...) Expand 10 before | Expand all | Expand 10 after
2903 // ----------------------------------- 2903 // -----------------------------------
2904 Label miss; 2904 Label miss;
2905 2905
2906 if (kind() == Code::KEYED_LOAD_IC) { 2906 if (kind() == Code::KEYED_LOAD_IC) {
2907 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string())); 2907 __ cmp(ecx, Immediate(masm->isolate()->factory()->prototype_string()));
2908 __ j(not_equal, &miss); 2908 __ j(not_equal, &miss);
2909 } 2909 }
2910 2910
2911 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss); 2911 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss);
2912 __ bind(&miss); 2912 __ bind(&miss);
2913 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2913 StubCompiler::TailCallBuiltin(
2914 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2914 } 2915 }
2915 2916
2916 2917
2917 void StringLengthStub::Generate(MacroAssembler* masm) { 2918 void StringLengthStub::Generate(MacroAssembler* masm) {
2918 // ----------- S t a t e ------------- 2919 // ----------- S t a t e -------------
2919 // -- ecx : name 2920 // -- ecx : name
2920 // -- edx : receiver 2921 // -- edx : receiver
2921 // -- esp[0] : return address 2922 // -- esp[0] : return address
2922 // ----------------------------------- 2923 // -----------------------------------
2923 Label miss; 2924 Label miss;
2924 2925
2925 if (kind() == Code::KEYED_LOAD_IC) { 2926 if (kind() == Code::KEYED_LOAD_IC) {
2926 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string())); 2927 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string()));
2927 __ j(not_equal, &miss); 2928 __ j(not_equal, &miss);
2928 } 2929 }
2929 2930
2930 StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss, 2931 StubCompiler::GenerateLoadStringLength(masm, edx, eax, ebx, &miss,
2931 support_wrapper_); 2932 support_wrapper_);
2932 __ bind(&miss); 2933 __ bind(&miss);
2933 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2934 StubCompiler::TailCallBuiltin(
2935 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2934 } 2936 }
2935 2937
2936 2938
2937 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { 2939 void StoreArrayLengthStub::Generate(MacroAssembler* masm) {
2938 // ----------- S t a t e ------------- 2940 // ----------- S t a t e -------------
2939 // -- eax : value 2941 // -- eax : value
2940 // -- ecx : name 2942 // -- ecx : name
2941 // -- edx : receiver 2943 // -- edx : receiver
2942 // -- esp[0] : return address 2944 // -- esp[0] : return address
2943 // ----------------------------------- 2945 // -----------------------------------
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 __ push(receiver); 2989 __ push(receiver);
2988 __ push(value); 2990 __ push(value);
2989 __ push(scratch); // return address 2991 __ push(scratch); // return address
2990 2992
2991 ExternalReference ref = 2993 ExternalReference ref =
2992 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); 2994 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate());
2993 __ TailCallExternalReference(ref, 2, 1); 2995 __ TailCallExternalReference(ref, 2, 1);
2994 2996
2995 __ bind(&miss); 2997 __ bind(&miss);
2996 2998
2997 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 2999 StubCompiler::TailCallBuiltin(
3000 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
2998 } 3001 }
2999 3002
3000 3003
3001 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 3004 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
3002 // The key is in edx and the parameter count is in eax. 3005 // The key is in edx and the parameter count is in eax.
3003 3006
3004 // The displacement is used for skipping the frame pointer on the 3007 // The displacement is used for skipping the frame pointer on the
3005 // stack. It is the offset of the last parameter (if any) relative 3008 // stack. It is the offset of the last parameter (if any) relative
3006 // to the frame pointer. 3009 // to the frame pointer.
3007 static const int kDisplacement = 1 * kPointerSize; 3010 static const int kDisplacement = 1 * kPointerSize;
(...skipping 4507 matching lines...) Expand 10 before | Expand all | Expand 10 after
7515 __ j(equal, &normal_sequence); 7518 __ j(equal, &normal_sequence);
7516 __ mov(ecx, FieldOperand(ebx, Cell::kValueOffset)); 7519 __ mov(ecx, FieldOperand(ebx, Cell::kValueOffset));
7517 Handle<Map> allocation_site_map( 7520 Handle<Map> allocation_site_map(
7518 masm->isolate()->heap()->allocation_site_map(), 7521 masm->isolate()->heap()->allocation_site_map(),
7519 masm->isolate()); 7522 masm->isolate());
7520 __ cmp(FieldOperand(ecx, 0), Immediate(allocation_site_map)); 7523 __ cmp(FieldOperand(ecx, 0), Immediate(allocation_site_map));
7521 __ j(not_equal, &normal_sequence); 7524 __ j(not_equal, &normal_sequence);
7522 7525
7523 // Save the resulting elements kind in type info 7526 // Save the resulting elements kind in type info
7524 __ SmiTag(edx); 7527 __ SmiTag(edx);
7525 __ mov(FieldOperand(ecx, AllocationSite::kPayloadOffset), edx); 7528 __ mov(FieldOperand(ecx, AllocationSite::kTransitionInfoOffset), edx);
7526 __ SmiUntag(edx); 7529 __ SmiUntag(edx);
7527 7530
7528 __ bind(&normal_sequence); 7531 __ bind(&normal_sequence);
7529 int last_index = GetSequenceIndexFromFastElementsKind( 7532 int last_index = GetSequenceIndexFromFastElementsKind(
7530 TERMINAL_FAST_ELEMENTS_KIND); 7533 TERMINAL_FAST_ELEMENTS_KIND);
7531 for (int i = 0; i <= last_index; ++i) { 7534 for (int i = 0; i <= last_index; ++i) {
7532 Label next; 7535 Label next;
7533 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); 7536 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
7534 __ cmp(edx, kind); 7537 __ cmp(edx, kind);
7535 __ j(not_equal, &next); 7538 __ j(not_equal, &next);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
7621 Label no_info, switch_ready; 7624 Label no_info, switch_ready;
7622 // Get the elements kind and case on that. 7625 // Get the elements kind and case on that.
7623 __ cmp(ebx, Immediate(undefined_sentinel)); 7626 __ cmp(ebx, Immediate(undefined_sentinel));
7624 __ j(equal, &no_info); 7627 __ j(equal, &no_info);
7625 __ mov(edx, FieldOperand(ebx, Cell::kValueOffset)); 7628 __ mov(edx, FieldOperand(ebx, Cell::kValueOffset));
7626 7629
7627 // The type cell may have undefined in its value. 7630 // The type cell may have undefined in its value.
7628 __ cmp(edx, Immediate(undefined_sentinel)); 7631 __ cmp(edx, Immediate(undefined_sentinel));
7629 __ j(equal, &no_info); 7632 __ j(equal, &no_info);
7630 7633
7631 // We should have an allocation site object 7634 // The type cell has either an AllocationSite or a JSFunction
7632 if (FLAG_debug_code) { 7635 __ cmp(FieldOperand(edx, 0), Immediate(Handle<Map>(
7633 __ cmp(FieldOperand(edx, 0), 7636 masm->isolate()->heap()->allocation_site_map())));
7634 Immediate(Handle<Map>( 7637 __ j(not_equal, &no_info);
7635 masm->isolate()->heap()->allocation_site_map())));
7636 __ Assert(equal, "Expected AllocationSite object in register edx");
7637 }
7638 7638
7639 __ mov(edx, FieldOperand(edx, AllocationSite::kPayloadOffset)); 7639 __ mov(edx, FieldOperand(edx, AllocationSite::kTransitionInfoOffset));
7640 __ SmiUntag(edx); 7640 __ SmiUntag(edx);
7641 __ jmp(&switch_ready); 7641 __ jmp(&switch_ready);
7642 __ bind(&no_info); 7642 __ bind(&no_info);
7643 __ mov(edx, Immediate(GetInitialFastElementsKind())); 7643 __ mov(edx, Immediate(GetInitialFastElementsKind()));
7644 __ bind(&switch_ready); 7644 __ bind(&switch_ready);
7645 7645
7646 if (argument_count_ == ANY) { 7646 if (argument_count_ == ANY) {
7647 Label not_zero_case, not_one_case; 7647 Label not_zero_case, not_one_case;
7648 __ test(eax, eax); 7648 __ test(eax, eax);
7649 __ j(not_zero, &not_zero_case); 7649 __ j(not_zero, &not_zero_case);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
7754 __ bind(&fast_elements_case); 7754 __ bind(&fast_elements_case);
7755 GenerateCase(masm, FAST_ELEMENTS); 7755 GenerateCase(masm, FAST_ELEMENTS);
7756 } 7756 }
7757 7757
7758 7758
7759 #undef __ 7759 #undef __
7760 7760
7761 } } // namespace v8::internal 7761 } } // namespace v8::internal
7762 7762
7763 #endif // V8_TARGET_ARCH_IA32 7763 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698