OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 info_->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | 139 info_->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { |
140 __ stop("stop_at"); | 140 __ stop("stop_at"); |
141 } | 141 } |
142 #endif | 142 #endif |
143 | 143 |
144 // a1: Callee's JS function. | 144 // a1: Callee's JS function. |
145 // cp: Callee's context. | 145 // cp: Callee's context. |
146 // fp: Caller's frame pointer. | 146 // fp: Caller's frame pointer. |
147 // lr: Caller's pc. | 147 // lr: Caller's pc. |
148 | 148 |
149 // Classic mode functions and builtins need to replace the receiver with the | 149 // Sloppy mode functions and builtins need to replace the receiver with the |
150 // global proxy when called as functions (without an explicit receiver | 150 // global proxy when called as functions (without an explicit receiver |
151 // object). | 151 // object). |
152 if (info_->this_has_uses() && | 152 if (info_->this_has_uses() && |
153 info_->is_sloppy_mode() && | 153 info_->is_sloppy_mode() && |
154 !info_->is_native()) { | 154 !info_->is_native()) { |
155 Label ok; | 155 Label ok; |
156 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; | 156 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; |
157 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 157 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
158 __ lw(a2, MemOperand(sp, receiver_offset)); | 158 __ lw(a2, MemOperand(sp, receiver_offset)); |
159 __ Branch(&ok, ne, a2, Operand(at)); | 159 __ Branch(&ok, ne, a2, Operand(at)); |
(...skipping 5559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5719 __ Subu(scratch, result, scratch); | 5719 __ Subu(scratch, result, scratch); |
5720 __ lw(result, FieldMemOperand(scratch, | 5720 __ lw(result, FieldMemOperand(scratch, |
5721 FixedArray::kHeaderSize - kPointerSize)); | 5721 FixedArray::kHeaderSize - kPointerSize)); |
5722 __ bind(&done); | 5722 __ bind(&done); |
5723 } | 5723 } |
5724 | 5724 |
5725 | 5725 |
5726 #undef __ | 5726 #undef __ |
5727 | 5727 |
5728 } } // namespace v8::internal | 5728 } } // namespace v8::internal |
OLD | NEW |