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

Side by Side Diff: src/arm/code-stubs-arm.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/a64/stub-cache-a64.cc ('k') | src/arm/ic-arm.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 3385 matching lines...) Expand 10 before | Expand all | Expand 10 after
3396 // -- r2 : name 3396 // -- r2 : name
3397 // -- lr : return address 3397 // -- lr : return address
3398 // -- r0 : receiver 3398 // -- r0 : receiver
3399 // -- sp[0] : receiver 3399 // -- sp[0] : receiver
3400 // ----------------------------------- 3400 // -----------------------------------
3401 receiver = r0; 3401 receiver = r0;
3402 } 3402 }
3403 3403
3404 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3, r4, &miss); 3404 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3, r4, &miss);
3405 __ bind(&miss); 3405 __ bind(&miss);
3406 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 3406 StubCompiler::TailCallBuiltin(
3407 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
3407 } 3408 }
3408 3409
3409 3410
3410 void StringLengthStub::Generate(MacroAssembler* masm) { 3411 void StringLengthStub::Generate(MacroAssembler* masm) {
3411 Label miss; 3412 Label miss;
3412 Register receiver; 3413 Register receiver;
3413 if (kind() == Code::KEYED_LOAD_IC) { 3414 if (kind() == Code::KEYED_LOAD_IC) {
3414 // ----------- S t a t e ------------- 3415 // ----------- S t a t e -------------
3415 // -- lr : return address 3416 // -- lr : return address
3416 // -- r0 : key 3417 // -- r0 : key
(...skipping 10 matching lines...) Expand all
3427 // -- r0 : receiver 3428 // -- r0 : receiver
3428 // -- sp[0] : receiver 3429 // -- sp[0] : receiver
3429 // ----------------------------------- 3430 // -----------------------------------
3430 receiver = r0; 3431 receiver = r0;
3431 } 3432 }
3432 3433
3433 StubCompiler::GenerateLoadStringLength(masm, receiver, r3, r4, &miss, 3434 StubCompiler::GenerateLoadStringLength(masm, receiver, r3, r4, &miss,
3434 support_wrapper_); 3435 support_wrapper_);
3435 3436
3436 __ bind(&miss); 3437 __ bind(&miss);
3437 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 3438 StubCompiler::TailCallBuiltin(
3439 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
3438 } 3440 }
3439 3441
3440 3442
3441 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { 3443 void StoreArrayLengthStub::Generate(MacroAssembler* masm) {
3442 // This accepts as a receiver anything JSArray::SetElementsLength accepts 3444 // This accepts as a receiver anything JSArray::SetElementsLength accepts
3443 // (currently anything except for external arrays which means anything with 3445 // (currently anything except for external arrays which means anything with
3444 // elements of FixedArray type). Value must be a number, but only smis are 3446 // elements of FixedArray type). Value must be a number, but only smis are
3445 // accepted as the most common case. 3447 // accepted as the most common case.
3446 Label miss; 3448 Label miss;
3447 3449
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 3499
3498 // Prepare tail call to StoreIC_ArrayLength. 3500 // Prepare tail call to StoreIC_ArrayLength.
3499 __ Push(receiver, value); 3501 __ Push(receiver, value);
3500 3502
3501 ExternalReference ref = 3503 ExternalReference ref =
3502 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); 3504 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate());
3503 __ TailCallExternalReference(ref, 2, 1); 3505 __ TailCallExternalReference(ref, 2, 1);
3504 3506
3505 __ bind(&miss); 3507 __ bind(&miss);
3506 3508
3507 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 3509 StubCompiler::TailCallBuiltin(
3510 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind()));
3508 } 3511 }
3509 3512
3510 3513
3511 Register InstanceofStub::left() { return r0; } 3514 Register InstanceofStub::left() { return r0; }
3512 3515
3513 3516
3514 Register InstanceofStub::right() { return r1; } 3517 Register InstanceofStub::right() { return r1; }
3515 3518
3516 3519
3517 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 3520 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
(...skipping 3448 matching lines...) Expand 10 before | Expand all | Expand 10 after
6966 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); 6969 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex);
6967 __ b(eq, &normal_sequence); 6970 __ b(eq, &normal_sequence);
6968 __ ldr(r5, FieldMemOperand(r2, Cell::kValueOffset)); 6971 __ ldr(r5, FieldMemOperand(r2, Cell::kValueOffset));
6969 __ ldr(r5, FieldMemOperand(r5, 0)); 6972 __ ldr(r5, FieldMemOperand(r5, 0));
6970 __ CompareRoot(r5, Heap::kAllocationSiteMapRootIndex); 6973 __ CompareRoot(r5, Heap::kAllocationSiteMapRootIndex);
6971 __ b(ne, &normal_sequence); 6974 __ b(ne, &normal_sequence);
6972 6975
6973 // Save the resulting elements kind in type info 6976 // Save the resulting elements kind in type info
6974 __ SmiTag(r3); 6977 __ SmiTag(r3);
6975 __ ldr(r5, FieldMemOperand(r2, Cell::kValueOffset)); 6978 __ ldr(r5, FieldMemOperand(r2, Cell::kValueOffset));
6976 __ str(r3, FieldMemOperand(r5, AllocationSite::kPayloadOffset)); 6979 __ str(r3, FieldMemOperand(r5, AllocationSite::kTransitionInfoOffset));
6977 __ SmiUntag(r3); 6980 __ SmiUntag(r3);
6978 6981
6979 __ bind(&normal_sequence); 6982 __ bind(&normal_sequence);
6980 int last_index = GetSequenceIndexFromFastElementsKind( 6983 int last_index = GetSequenceIndexFromFastElementsKind(
6981 TERMINAL_FAST_ELEMENTS_KIND); 6984 TERMINAL_FAST_ELEMENTS_KIND);
6982 for (int i = 0; i <= last_index; ++i) { 6985 for (int i = 0; i <= last_index; ++i) {
6983 Label next; 6986 Label next;
6984 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); 6987 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
6985 __ cmp(r3, Operand(kind)); 6988 __ cmp(r3, Operand(kind));
6986 __ b(ne, &next); 6989 __ b(ne, &next);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
7069 Label no_info, switch_ready; 7072 Label no_info, switch_ready;
7070 // Get the elements kind and case on that. 7073 // Get the elements kind and case on that.
7071 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); 7074 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex);
7072 __ b(eq, &no_info); 7075 __ b(eq, &no_info);
7073 __ ldr(r3, FieldMemOperand(r2, Cell::kValueOffset)); 7076 __ ldr(r3, FieldMemOperand(r2, Cell::kValueOffset));
7074 7077
7075 // The type cell may have undefined in its value. 7078 // The type cell may have undefined in its value.
7076 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); 7079 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex);
7077 __ b(eq, &no_info); 7080 __ b(eq, &no_info);
7078 7081
7079 // We should have an allocation site object 7082 // The type cell has either an AllocationSite or a JSFunction
7080 if (FLAG_debug_code) { 7083 __ ldr(r4, FieldMemOperand(r3, 0));
7081 __ push(r3); 7084 __ CompareRoot(r4, Heap::kAllocationSiteMapRootIndex);
7082 __ ldr(r3, FieldMemOperand(r3, 0)); 7085 __ b(ne, &no_info);
7083 __ CompareRoot(r3, Heap::kAllocationSiteMapRootIndex);
7084 __ Assert(eq, "Expected AllocationSite object in register edx");
7085 }
7086 7086
7087 __ ldr(r3, FieldMemOperand(r3, AllocationSite::kPayloadOffset)); 7087 __ ldr(r3, FieldMemOperand(r3, AllocationSite::kTransitionInfoOffset));
7088 __ SmiUntag(r3); 7088 __ SmiUntag(r3);
7089 __ jmp(&switch_ready); 7089 __ jmp(&switch_ready);
7090 __ bind(&no_info); 7090 __ bind(&no_info);
7091 __ mov(r3, Operand(GetInitialFastElementsKind())); 7091 __ mov(r3, Operand(GetInitialFastElementsKind()));
7092 __ bind(&switch_ready); 7092 __ bind(&switch_ready);
7093 7093
7094 if (argument_count_ == ANY) { 7094 if (argument_count_ == ANY) {
7095 Label not_zero_case, not_one_case; 7095 Label not_zero_case, not_one_case;
7096 __ tst(r0, r0); 7096 __ tst(r0, r0);
7097 __ b(ne, &not_zero_case); 7097 __ b(ne, &not_zero_case);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
7199 __ bind(&fast_elements_case); 7199 __ bind(&fast_elements_case);
7200 GenerateCase(masm, FAST_ELEMENTS); 7200 GenerateCase(masm, FAST_ELEMENTS);
7201 } 7201 }
7202 7202
7203 7203
7204 #undef __ 7204 #undef __
7205 7205
7206 } } // namespace v8::internal 7206 } } // namespace v8::internal
7207 7207
7208 #endif // V8_TARGET_ARCH_ARM 7208 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/a64/stub-cache-a64.cc ('k') | src/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698