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 4953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4964 __ TailCallRuntime(Runtime::kRegExpConstructResult, 3, 1); | 4964 __ TailCallRuntime(Runtime::kRegExpConstructResult, 3, 1); |
4965 } | 4965 } |
4966 | 4966 |
4967 | 4967 |
4968 static void GenerateRecordCallTargetNoArray(MacroAssembler* masm) { | 4968 static void GenerateRecordCallTargetNoArray(MacroAssembler* masm) { |
4969 // Cache the called function in a global property cell. Cache states | 4969 // Cache the called function in a global property cell. Cache states |
4970 // are uninitialized, monomorphic (indicated by a JSFunction), and | 4970 // are uninitialized, monomorphic (indicated by a JSFunction), and |
4971 // megamorphic. | 4971 // megamorphic. |
4972 // a1 : the function to call | 4972 // a1 : the function to call |
4973 // a2 : cache cell for call target | 4973 // a2 : cache cell for call target |
4974 ASSERT(!FLAG_optimize_constructed_arrays); | |
4975 Label done; | 4974 Label done; |
4976 | 4975 |
4977 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), | 4976 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), |
4978 masm->isolate()->heap()->undefined_value()); | 4977 masm->isolate()->heap()->undefined_value()); |
4979 ASSERT_EQ(*TypeFeedbackCells::UninitializedSentinel(masm->isolate()), | 4978 ASSERT_EQ(*TypeFeedbackCells::UninitializedSentinel(masm->isolate()), |
4980 masm->isolate()->heap()->the_hole_value()); | 4979 masm->isolate()->heap()->the_hole_value()); |
4981 | 4980 |
4982 // Load the cache state into a3. | 4981 // Load the cache state into a3. |
4983 __ lw(a3, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); | 4982 __ lw(a3, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); |
4984 | 4983 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5107 } | 5106 } |
5108 | 5107 |
5109 // Check that the function is really a JavaScript function. | 5108 // Check that the function is really a JavaScript function. |
5110 // a1: pushed function (to be verified) | 5109 // a1: pushed function (to be verified) |
5111 __ JumpIfSmi(a1, &non_function); | 5110 __ JumpIfSmi(a1, &non_function); |
5112 // Get the map of the function object. | 5111 // Get the map of the function object. |
5113 __ GetObjectType(a1, a3, a3); | 5112 __ GetObjectType(a1, a3, a3); |
5114 __ Branch(&slow, ne, a3, Operand(JS_FUNCTION_TYPE)); | 5113 __ Branch(&slow, ne, a3, Operand(JS_FUNCTION_TYPE)); |
5115 | 5114 |
5116 if (RecordCallTarget()) { | 5115 if (RecordCallTarget()) { |
5117 if (FLAG_optimize_constructed_arrays) { | 5116 GenerateRecordCallTargetNoArray(masm); |
5118 GenerateRecordCallTarget(masm); | |
5119 } else { | |
5120 GenerateRecordCallTargetNoArray(masm); | |
5121 } | |
5122 } | 5117 } |
5123 | 5118 |
5124 // Fast-case: Invoke the function now. | 5119 // Fast-case: Invoke the function now. |
5125 // a1: pushed function | 5120 // a1: pushed function |
5126 ParameterCount actual(argc_); | 5121 ParameterCount actual(argc_); |
5127 | 5122 |
5128 if (ReceiverMightBeImplicit()) { | 5123 if (ReceiverMightBeImplicit()) { |
5129 Label call_as_function; | 5124 Label call_as_function; |
5130 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 5125 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
5131 __ Branch(&call_as_function, eq, t0, Operand(at)); | 5126 __ Branch(&call_as_function, eq, t0, Operand(at)); |
(...skipping 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7746 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7741 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
7747 } | 7742 } |
7748 } | 7743 } |
7749 | 7744 |
7750 | 7745 |
7751 #undef __ | 7746 #undef __ |
7752 | 7747 |
7753 } } // namespace v8::internal | 7748 } } // namespace v8::internal |
7754 | 7749 |
7755 #endif // V8_TARGET_ARCH_MIPS | 7750 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |