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 4570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4581 __ TailCallRuntime(Runtime::kRegExpConstructResult, 3, 1); | 4581 __ TailCallRuntime(Runtime::kRegExpConstructResult, 3, 1); |
4582 } | 4582 } |
4583 | 4583 |
4584 | 4584 |
4585 static void GenerateRecordCallTargetNoArray(MacroAssembler* masm) { | 4585 static void GenerateRecordCallTargetNoArray(MacroAssembler* masm) { |
4586 // Cache the called function in a global property cell. Cache states | 4586 // Cache the called function in a global property cell. Cache states |
4587 // are uninitialized, monomorphic (indicated by a JSFunction), and | 4587 // are uninitialized, monomorphic (indicated by a JSFunction), and |
4588 // megamorphic. | 4588 // megamorphic. |
4589 // r1 : the function to call | 4589 // r1 : the function to call |
4590 // r2 : cache cell for call target | 4590 // r2 : cache cell for call target |
4591 ASSERT(!FLAG_optimize_constructed_arrays); | |
4592 Label done; | 4591 Label done; |
4593 | 4592 |
4594 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), | 4593 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), |
4595 masm->isolate()->heap()->undefined_value()); | 4594 masm->isolate()->heap()->undefined_value()); |
4596 ASSERT_EQ(*TypeFeedbackCells::UninitializedSentinel(masm->isolate()), | 4595 ASSERT_EQ(*TypeFeedbackCells::UninitializedSentinel(masm->isolate()), |
4597 masm->isolate()->heap()->the_hole_value()); | 4596 masm->isolate()->heap()->the_hole_value()); |
4598 | 4597 |
4599 // Load the cache state into r3. | 4598 // Load the cache state into r3. |
4600 __ ldr(r3, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); | 4599 __ ldr(r3, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); |
4601 | 4600 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4725 } | 4724 } |
4726 | 4725 |
4727 // Check that the function is really a JavaScript function. | 4726 // Check that the function is really a JavaScript function. |
4728 // r1: pushed function (to be verified) | 4727 // r1: pushed function (to be verified) |
4729 __ JumpIfSmi(r1, &non_function); | 4728 __ JumpIfSmi(r1, &non_function); |
4730 // Get the map of the function object. | 4729 // Get the map of the function object. |
4731 __ CompareObjectType(r1, r3, r3, JS_FUNCTION_TYPE); | 4730 __ CompareObjectType(r1, r3, r3, JS_FUNCTION_TYPE); |
4732 __ b(ne, &slow); | 4731 __ b(ne, &slow); |
4733 | 4732 |
4734 if (RecordCallTarget()) { | 4733 if (RecordCallTarget()) { |
4735 if (FLAG_optimize_constructed_arrays) { | 4734 GenerateRecordCallTargetNoArray(masm); |
4736 GenerateRecordCallTarget(masm); | |
4737 } else { | |
4738 GenerateRecordCallTargetNoArray(masm); | |
4739 } | |
4740 } | 4735 } |
4741 | 4736 |
4742 // Fast-case: Invoke the function now. | 4737 // Fast-case: Invoke the function now. |
4743 // r1: pushed function | 4738 // r1: pushed function |
4744 ParameterCount actual(argc_); | 4739 ParameterCount actual(argc_); |
4745 | 4740 |
4746 if (ReceiverMightBeImplicit()) { | 4741 if (ReceiverMightBeImplicit()) { |
4747 Label call_as_function; | 4742 Label call_as_function; |
4748 __ CompareRoot(r4, Heap::kTheHoleValueRootIndex); | 4743 __ CompareRoot(r4, Heap::kTheHoleValueRootIndex); |
4749 __ b(eq, &call_as_function); | 4744 __ b(eq, &call_as_function); |
(...skipping 2583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7333 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7328 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
7334 } | 7329 } |
7335 } | 7330 } |
7336 | 7331 |
7337 | 7332 |
7338 #undef __ | 7333 #undef __ |
7339 | 7334 |
7340 } } // namespace v8::internal | 7335 } } // namespace v8::internal |
7341 | 7336 |
7342 #endif // V8_TARGET_ARCH_ARM | 7337 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |