| 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 Label exit; | 470 Label exit; |
| 471 | 471 |
| 472 int descriptor = transition->LastAdded(); | 472 int descriptor = transition->LastAdded(); |
| 473 DescriptorArray* descriptors = transition->instance_descriptors(); | 473 DescriptorArray* descriptors = transition->instance_descriptors(); |
| 474 PropertyDetails details = descriptors->GetDetails(descriptor); | 474 PropertyDetails details = descriptors->GetDetails(descriptor); |
| 475 Representation representation = details.representation(); | 475 Representation representation = details.representation(); |
| 476 ASSERT(!representation.IsNone()); | 476 ASSERT(!representation.IsNone()); |
| 477 | 477 |
| 478 if (details.type() == CONSTANT) { | 478 if (details.type() == CONSTANT) { |
| 479 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); | 479 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); |
| 480 __ LoadObject(scratch1, constant); | 480 __ Move(scratch1, constant); |
| 481 __ cmp(value_reg, scratch1); | 481 __ cmp(value_reg, scratch1); |
| 482 __ b(ne, miss_label); | 482 __ b(ne, miss_label); |
| 483 } else if (FLAG_track_fields && representation.IsSmi()) { | 483 } else if (FLAG_track_fields && representation.IsSmi()) { |
| 484 __ JumpIfNotSmi(value_reg, miss_label); | 484 __ JumpIfNotSmi(value_reg, miss_label); |
| 485 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { | 485 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 486 __ JumpIfSmi(value_reg, miss_label); | 486 __ JumpIfSmi(value_reg, miss_label); |
| 487 } else if (FLAG_track_double_fields && representation.IsDouble()) { | 487 } else if (FLAG_track_double_fields && representation.IsDouble()) { |
| 488 Label do_store, heap_number; | 488 Label do_store, heap_number; |
| 489 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); | 489 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); |
| 490 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); | 490 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 // -- sp[28] : last JS argument | 847 // -- sp[28] : last JS argument |
| 848 // -- ... | 848 // -- ... |
| 849 // -- sp[(argc + 6) * 4] : first JS argument | 849 // -- sp[(argc + 6) * 4] : first JS argument |
| 850 // -- sp[(argc + 7) * 4] : receiver | 850 // -- sp[(argc + 7) * 4] : receiver |
| 851 // ----------------------------------- | 851 // ----------------------------------- |
| 852 typedef FunctionCallbackArguments FCA; | 852 typedef FunctionCallbackArguments FCA; |
| 853 // Save calling context. | 853 // Save calling context. |
| 854 __ str(cp, MemOperand(sp, FCA::kContextSaveIndex * kPointerSize)); | 854 __ str(cp, MemOperand(sp, FCA::kContextSaveIndex * kPointerSize)); |
| 855 // Get the function and setup the context. | 855 // Get the function and setup the context. |
| 856 Handle<JSFunction> function = optimization.constant_function(); | 856 Handle<JSFunction> function = optimization.constant_function(); |
| 857 __ LoadHeapObject(r5, function); | 857 __ Move(r5, function); |
| 858 __ ldr(cp, FieldMemOperand(r5, JSFunction::kContextOffset)); | 858 __ ldr(cp, FieldMemOperand(r5, JSFunction::kContextOffset)); |
| 859 __ str(r5, MemOperand(sp, FCA::kCalleeIndex * kPointerSize)); | 859 __ str(r5, MemOperand(sp, FCA::kCalleeIndex * kPointerSize)); |
| 860 | 860 |
| 861 // Construct the FunctionCallbackInfo. | 861 // Construct the FunctionCallbackInfo. |
| 862 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 862 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
| 863 Handle<Object> call_data(api_call_info->data(), masm->isolate()); | 863 Handle<Object> call_data(api_call_info->data(), masm->isolate()); |
| 864 if (masm->isolate()->heap()->InNewSpace(*call_data)) { | 864 if (masm->isolate()->heap()->InNewSpace(*call_data)) { |
| 865 __ Move(r0, api_call_info); | 865 __ Move(r0, api_call_info); |
| 866 __ ldr(r6, FieldMemOperand(r0, CallHandlerInfo::kDataOffset)); | 866 __ ldr(r6, FieldMemOperand(r0, CallHandlerInfo::kDataOffset)); |
| 867 } else { | 867 } else { |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1407 KeyedLoadFieldStub stub(field.is_inobject(holder), | 1407 KeyedLoadFieldStub stub(field.is_inobject(holder), |
| 1408 field.translate(holder), | 1408 field.translate(holder), |
| 1409 representation); | 1409 representation); |
| 1410 GenerateTailCall(masm(), stub.GetCode(isolate())); | 1410 GenerateTailCall(masm(), stub.GetCode(isolate())); |
| 1411 } | 1411 } |
| 1412 } | 1412 } |
| 1413 | 1413 |
| 1414 | 1414 |
| 1415 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { | 1415 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { |
| 1416 // Return the constant value. | 1416 // Return the constant value. |
| 1417 __ LoadObject(r0, value); | 1417 __ Move(r0, value); |
| 1418 __ Ret(); | 1418 __ Ret(); |
| 1419 } | 1419 } |
| 1420 | 1420 |
| 1421 | 1421 |
| 1422 void LoadStubCompiler::GenerateLoadCallback( | 1422 void LoadStubCompiler::GenerateLoadCallback( |
| 1423 const CallOptimization& call_optimization) { | 1423 const CallOptimization& call_optimization) { |
| 1424 GenerateFastApiCall( | 1424 GenerateFastApiCall( |
| 1425 masm(), call_optimization, receiver(), scratch3(), 0, NULL); | 1425 masm(), call_optimization, receiver(), scratch3(), 0, NULL); |
| 1426 } | 1426 } |
| 1427 | 1427 |
| (...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3189 // ----------------------------------- | 3189 // ----------------------------------- |
| 3190 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3190 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
| 3191 } | 3191 } |
| 3192 | 3192 |
| 3193 | 3193 |
| 3194 #undef __ | 3194 #undef __ |
| 3195 | 3195 |
| 3196 } } // namespace v8::internal | 3196 } } // namespace v8::internal |
| 3197 | 3197 |
| 3198 #endif // V8_TARGET_ARCH_ARM | 3198 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |