OLD | NEW |
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 7084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7095 { REG(r4), REG(r1), REG(r2), OMIT_REMEMBERED_SET }, | 7095 { REG(r4), REG(r1), REG(r2), OMIT_REMEMBERED_SET }, |
7096 // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField. | 7096 // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField. |
7097 { REG(r1), REG(r2), REG(r3), EMIT_REMEMBERED_SET }, | 7097 { REG(r1), REG(r2), REG(r3), EMIT_REMEMBERED_SET }, |
7098 { REG(r3), REG(r2), REG(r1), EMIT_REMEMBERED_SET }, | 7098 { REG(r3), REG(r2), REG(r1), EMIT_REMEMBERED_SET }, |
7099 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. | 7099 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. |
7100 { REG(r2), REG(r1), REG(r3), EMIT_REMEMBERED_SET }, | 7100 { REG(r2), REG(r1), REG(r3), EMIT_REMEMBERED_SET }, |
7101 { REG(r3), REG(r1), REG(r2), EMIT_REMEMBERED_SET }, | 7101 { REG(r3), REG(r1), REG(r2), EMIT_REMEMBERED_SET }, |
7102 // KeyedStoreStubCompiler::GenerateStoreFastElement. | 7102 // KeyedStoreStubCompiler::GenerateStoreFastElement. |
7103 { REG(r3), REG(r2), REG(r4), EMIT_REMEMBERED_SET }, | 7103 { REG(r3), REG(r2), REG(r4), EMIT_REMEMBERED_SET }, |
7104 { REG(r2), REG(r3), REG(r4), EMIT_REMEMBERED_SET }, | 7104 { REG(r2), REG(r3), REG(r4), EMIT_REMEMBERED_SET }, |
7105 // ElementsTransitionGenerator::GenerateMapChangeElementTransition | 7105 // ElementsTransitionGenerator::GenerateSmiOnlyToObject |
7106 // and ElementsTransitionGenerator::GenerateSmiToDouble | 7106 // and ElementsTransitionGenerator::GenerateSmiOnlyToDouble |
7107 // and ElementsTransitionGenerator::GenerateDoubleToObject | 7107 // and ElementsTransitionGenerator::GenerateDoubleToObject |
7108 { REG(r2), REG(r3), REG(r9), EMIT_REMEMBERED_SET }, | 7108 { REG(r2), REG(r3), REG(r9), EMIT_REMEMBERED_SET }, |
7109 { REG(r2), REG(r3), REG(r9), OMIT_REMEMBERED_SET }, | 7109 { REG(r2), REG(r3), REG(r9), OMIT_REMEMBERED_SET }, |
7110 // ElementsTransitionGenerator::GenerateDoubleToObject | 7110 // ElementsTransitionGenerator::GenerateDoubleToObject |
7111 { REG(r6), REG(r2), REG(r0), EMIT_REMEMBERED_SET }, | 7111 { REG(r6), REG(r2), REG(r0), EMIT_REMEMBERED_SET }, |
7112 { REG(r2), REG(r6), REG(r9), EMIT_REMEMBERED_SET }, | 7112 { REG(r2), REG(r6), REG(r9), EMIT_REMEMBERED_SET }, |
7113 // StoreArrayLiteralElementStub::Generate | 7113 // StoreArrayLiteralElementStub::Generate |
7114 { REG(r5), REG(r0), REG(r6), EMIT_REMEMBERED_SET }, | 7114 { REG(r5), REG(r0), REG(r6), EMIT_REMEMBERED_SET }, |
7115 // Null termination. | 7115 // Null termination. |
7116 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} | 7116 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7359 // -- r4 : array literal index in function as smi | 7359 // -- r4 : array literal index in function as smi |
7360 // ----------------------------------- | 7360 // ----------------------------------- |
7361 | 7361 |
7362 Label element_done; | 7362 Label element_done; |
7363 Label double_elements; | 7363 Label double_elements; |
7364 Label smi_element; | 7364 Label smi_element; |
7365 Label slow_elements; | 7365 Label slow_elements; |
7366 Label fast_elements; | 7366 Label fast_elements; |
7367 | 7367 |
7368 __ CheckFastElements(r2, r5, &double_elements); | 7368 __ CheckFastElements(r2, r5, &double_elements); |
7369 // FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS | 7369 // FAST_SMI_ONLY_ELEMENTS or FAST_ELEMENTS |
7370 __ JumpIfSmi(r0, &smi_element); | 7370 __ JumpIfSmi(r0, &smi_element); |
7371 __ CheckFastSmiElements(r2, r5, &fast_elements); | 7371 __ CheckFastSmiOnlyElements(r2, r5, &fast_elements); |
7372 | 7372 |
7373 // Store into the array literal requires a elements transition. Call into | 7373 // Store into the array literal requires a elements transition. Call into |
7374 // the runtime. | 7374 // the runtime. |
7375 __ bind(&slow_elements); | 7375 __ bind(&slow_elements); |
7376 // call. | 7376 // call. |
7377 __ Push(r1, r3, r0); | 7377 __ Push(r1, r3, r0); |
7378 __ ldr(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 7378 __ ldr(r5, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
7379 __ ldr(r5, FieldMemOperand(r5, JSFunction::kLiteralsOffset)); | 7379 __ ldr(r5, FieldMemOperand(r5, JSFunction::kLiteralsOffset)); |
7380 __ Push(r5, r4); | 7380 __ Push(r5, r4); |
7381 __ TailCallRuntime(Runtime::kStoreArrayLiteralElement, 5, 1); | 7381 __ TailCallRuntime(Runtime::kStoreArrayLiteralElement, 5, 1); |
7382 | 7382 |
7383 // Array literal has ElementsKind of FAST_*_ELEMENTS and value is an object. | 7383 // Array literal has ElementsKind of FAST_ELEMENTS and value is an object. |
7384 __ bind(&fast_elements); | 7384 __ bind(&fast_elements); |
7385 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); | 7385 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); |
7386 __ add(r6, r5, Operand(r3, LSL, kPointerSizeLog2 - kSmiTagSize)); | 7386 __ add(r6, r5, Operand(r3, LSL, kPointerSizeLog2 - kSmiTagSize)); |
7387 __ add(r6, r6, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 7387 __ add(r6, r6, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
7388 __ str(r0, MemOperand(r6, 0)); | 7388 __ str(r0, MemOperand(r6, 0)); |
7389 // Update the write barrier for the array store. | 7389 // Update the write barrier for the array store. |
7390 __ RecordWrite(r5, r6, r0, kLRHasNotBeenSaved, kDontSaveFPRegs, | 7390 __ RecordWrite(r5, r6, r0, kLRHasNotBeenSaved, kDontSaveFPRegs, |
7391 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 7391 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
7392 __ Ret(); | 7392 __ Ret(); |
7393 | 7393 |
7394 // Array literal has ElementsKind of FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS, | 7394 // Array literal has ElementsKind of FAST_SMI_ONLY_ELEMENTS or |
7395 // and value is Smi. | 7395 // FAST_ELEMENTS, and value is Smi. |
7396 __ bind(&smi_element); | 7396 __ bind(&smi_element); |
7397 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); | 7397 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); |
7398 __ add(r6, r5, Operand(r3, LSL, kPointerSizeLog2 - kSmiTagSize)); | 7398 __ add(r6, r5, Operand(r3, LSL, kPointerSizeLog2 - kSmiTagSize)); |
7399 __ str(r0, FieldMemOperand(r6, FixedArray::kHeaderSize)); | 7399 __ str(r0, FieldMemOperand(r6, FixedArray::kHeaderSize)); |
7400 __ Ret(); | 7400 __ Ret(); |
7401 | 7401 |
7402 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. | 7402 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. |
7403 __ bind(&double_elements); | 7403 __ bind(&double_elements); |
7404 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); | 7404 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); |
7405 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2, | 7405 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2, |
7406 &slow_elements); | 7406 &slow_elements); |
7407 __ Ret(); | 7407 __ Ret(); |
7408 } | 7408 } |
7409 | 7409 |
7410 #undef __ | 7410 #undef __ |
7411 | 7411 |
7412 } } // namespace v8::internal | 7412 } } // namespace v8::internal |
7413 | 7413 |
7414 #endif // V8_TARGET_ARCH_ARM | 7414 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |