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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 141 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
142 __ stop("stop-at"); | 142 __ stop("stop-at"); |
143 } | 143 } |
144 #endif | 144 #endif |
145 | 145 |
146 // Strict mode functions and builtins need to replace the receiver | 146 // Strict mode functions and builtins need to replace the receiver |
147 // with undefined when called as functions (without an explicit | 147 // with undefined when called as functions (without an explicit |
148 // receiver object). r5 is zero for method calls and non-zero for | 148 // receiver object). r5 is zero for method calls and non-zero for |
149 // function calls. | 149 // function calls. |
150 if (!info->is_classic_mode() || info->is_native()) { | 150 if (!info->is_classic_mode() || info->is_native()) { |
151 Label ok; | |
152 __ cmp(r5, Operand::Zero()); | 151 __ cmp(r5, Operand::Zero()); |
153 __ b(eq, &ok); | |
154 int receiver_offset = info->scope()->num_parameters() * kPointerSize; | 152 int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
155 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); | 153 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); |
156 __ str(r2, MemOperand(sp, receiver_offset)); | 154 __ str(r2, MemOperand(sp, receiver_offset), ne); |
157 __ bind(&ok); | |
158 } | 155 } |
159 | 156 |
160 // Open a frame scope to indicate that there is a frame on the stack. The | 157 // Open a frame scope to indicate that there is a frame on the stack. The |
161 // MANUAL indicates that the scope shouldn't actually generate code to set up | 158 // MANUAL indicates that the scope shouldn't actually generate code to set up |
162 // the frame (that is done below). | 159 // the frame (that is done below). |
163 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 160 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
164 | 161 |
165 info->set_prologue_offset(masm_->pc_offset()); | 162 info->set_prologue_offset(masm_->pc_offset()); |
166 __ Prologue(BUILD_FUNCTION_FRAME); | 163 __ Prologue(BUILD_FUNCTION_FRAME); |
167 info->AddNoFrameRange(0, masm_->pc_offset()); | 164 info->AddNoFrameRange(0, masm_->pc_offset()); |
(...skipping 4794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4962 ASSERT(Memory::uint32_at(interrupt_address_pointer) == | 4959 ASSERT(Memory::uint32_at(interrupt_address_pointer) == |
4963 reinterpret_cast<uint32_t>( | 4960 reinterpret_cast<uint32_t>( |
4964 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4961 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4965 return OSR_AFTER_STACK_CHECK; | 4962 return OSR_AFTER_STACK_CHECK; |
4966 } | 4963 } |
4967 | 4964 |
4968 | 4965 |
4969 } } // namespace v8::internal | 4966 } } // namespace v8::internal |
4970 | 4967 |
4971 #endif // V8_TARGET_ARCH_ARM | 4968 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |