OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 5309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5320 Register name = r6; | 5320 Register name = r6; |
5321 Label slow_case; | 5321 Label slow_case; |
5322 | 5322 |
5323 // Go up the context chain to the script context. | 5323 // Go up the context chain to the script context. |
5324 for (int i = 0; i < depth(); ++i) { | 5324 for (int i = 0; i < depth(); ++i) { |
5325 __ LoadP(result, ContextOperand(context, Context::PREVIOUS_INDEX)); | 5325 __ LoadP(result, ContextOperand(context, Context::PREVIOUS_INDEX)); |
5326 context = result; | 5326 context = result; |
5327 } | 5327 } |
5328 | 5328 |
5329 // Load the PropertyCell value at the specified slot. | 5329 // Load the PropertyCell value at the specified slot. |
5330 __ ShiftLeftImm(result, slot, Operand(kPointerSizeLog2)); | 5330 __ ShiftLeftImm(r0, slot, Operand(kPointerSizeLog2)); |
5331 __ add(result, context, result); | 5331 __ add(result, context, r0); |
5332 __ LoadP(result, ContextOperand(result)); | 5332 __ LoadP(result, ContextOperand(result)); |
5333 __ LoadP(result, FieldMemOperand(result, PropertyCell::kValueOffset)); | 5333 __ LoadP(result, FieldMemOperand(result, PropertyCell::kValueOffset)); |
5334 | 5334 |
5335 // If the result is not the_hole, return. Otherwise, handle in the runtime. | 5335 // If the result is not the_hole, return. Otherwise, handle in the runtime. |
5336 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | 5336 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); |
5337 __ Ret(ne); | 5337 __ Ret(ne); |
5338 | 5338 |
5339 // Fallback to runtime. | 5339 // Fallback to runtime. |
5340 __ bind(&slow_case); | 5340 __ bind(&slow_case); |
5341 __ SmiTag(slot); | 5341 __ SmiTag(slot); |
(...skipping 24 matching lines...) Expand all Loading... |
5366 __ AssertName(name); | 5366 __ AssertName(name); |
5367 } | 5367 } |
5368 | 5368 |
5369 // Go up the context chain to the script context. | 5369 // Go up the context chain to the script context. |
5370 for (int i = 0; i < depth(); i++) { | 5370 for (int i = 0; i < depth(); i++) { |
5371 __ LoadP(context_temp, ContextOperand(context, Context::PREVIOUS_INDEX)); | 5371 __ LoadP(context_temp, ContextOperand(context, Context::PREVIOUS_INDEX)); |
5372 context = context_temp; | 5372 context = context_temp; |
5373 } | 5373 } |
5374 | 5374 |
5375 // Load the PropertyCell at the specified slot. | 5375 // Load the PropertyCell at the specified slot. |
5376 __ ShiftLeftImm(cell, slot, Operand(kPointerSizeLog2)); | 5376 __ ShiftLeftImm(r0, slot, Operand(kPointerSizeLog2)); |
5377 __ add(cell, context, cell); | 5377 __ add(cell, context, r0); |
5378 __ LoadP(cell, ContextOperand(cell)); | 5378 __ LoadP(cell, ContextOperand(cell)); |
5379 | 5379 |
5380 // Load PropertyDetails for the cell (actually only the cell_type and kind). | 5380 // Load PropertyDetails for the cell (actually only the cell_type and kind). |
5381 __ LoadP(cell_details, FieldMemOperand(cell, PropertyCell::kDetailsOffset)); | 5381 __ LoadP(cell_details, FieldMemOperand(cell, PropertyCell::kDetailsOffset)); |
5382 __ SmiUntag(cell_details); | 5382 __ SmiUntag(cell_details); |
5383 __ andi(cell_details, cell_details, | 5383 __ andi(cell_details, cell_details, |
5384 Operand(PropertyDetails::PropertyCellTypeField::kMask | | 5384 Operand(PropertyDetails::PropertyCellTypeField::kMask | |
5385 PropertyDetails::KindField::kMask)); | 5385 PropertyDetails::KindField::kMask)); |
5386 | 5386 |
5387 // Check if PropertyCell holds mutable data. | 5387 // Check if PropertyCell holds mutable data. |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5826 kStackUnwindSpace, NULL, | 5826 kStackUnwindSpace, NULL, |
5827 MemOperand(fp, 6 * kPointerSize), NULL); | 5827 MemOperand(fp, 6 * kPointerSize), NULL); |
5828 } | 5828 } |
5829 | 5829 |
5830 | 5830 |
5831 #undef __ | 5831 #undef __ |
5832 } // namespace internal | 5832 } // namespace internal |
5833 } // namespace v8 | 5833 } // namespace v8 |
5834 | 5834 |
5835 #endif // V8_TARGET_ARCH_PPC | 5835 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |