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