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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 Label begin; | 136 Label begin; |
137 __ bind(&begin); | 137 __ bind(&begin); |
138 Label ok; | 138 Label ok; |
139 __ testq(rcx, rcx); | 139 __ testq(rcx, rcx); |
140 __ j(zero, &ok, Label::kNear); | 140 __ j(zero, &ok, Label::kNear); |
141 // +1 for return address. | 141 // +1 for return address. |
142 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; | 142 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; |
143 __ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex); | 143 __ LoadRoot(kScratchRegister, Heap::kUndefinedValueRootIndex); |
144 __ movq(Operand(rsp, receiver_offset), kScratchRegister); | 144 __ movq(Operand(rsp, receiver_offset), kScratchRegister); |
145 __ bind(&ok); | 145 __ bind(&ok); |
146 ASSERT_EQ(kSizeOfOptimizedStrictModePrologue, ok.pos() - begin.pos()); | 146 ASSERT(!FLAG_age_code || |
| 147 (kSizeOfOptimizedStrictModePrologue == ok.pos() - begin.pos())); |
147 } | 148 } |
148 | 149 |
149 __ push(rbp); // Caller's frame pointer. | 150 __ push(rbp); // Caller's frame pointer. |
150 __ movq(rbp, rsp); | 151 __ movq(rbp, rsp); |
151 __ push(rsi); // Callee's context. | 152 __ push(rsi); // Callee's context. |
152 __ push(rdi); // Callee's JS function. | 153 __ push(rdi); // Callee's JS function. |
153 | 154 |
154 // Reserve space for the stack slots needed by the code. | 155 // Reserve space for the stack slots needed by the code. |
155 int slots = GetStackSlotCount(); | 156 int slots = GetStackSlotCount(); |
156 if (slots > 0) { | 157 if (slots > 0) { |
(...skipping 5125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5282 FixedArray::kHeaderSize - kPointerSize)); | 5283 FixedArray::kHeaderSize - kPointerSize)); |
5283 __ bind(&done); | 5284 __ bind(&done); |
5284 } | 5285 } |
5285 | 5286 |
5286 | 5287 |
5287 #undef __ | 5288 #undef __ |
5288 | 5289 |
5289 } } // namespace v8::internal | 5290 } } // namespace v8::internal |
5290 | 5291 |
5291 #endif // V8_TARGET_ARCH_X64 | 5292 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |