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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 // r7: JSObject (tagged) | 412 // r7: JSObject (tagged) |
413 // r8: First in-object property of JSObject (not tagged) | 413 // r8: First in-object property of JSObject (not tagged) |
414 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); | 414 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); |
415 | 415 |
416 if (!is_api_function) { | 416 if (!is_api_function) { |
417 Label no_inobject_slack_tracking; | 417 Label no_inobject_slack_tracking; |
418 | 418 |
419 MemOperand bit_field3 = FieldMemOperand(r5, Map::kBitField3Offset); | 419 MemOperand bit_field3 = FieldMemOperand(r5, Map::kBitField3Offset); |
420 // Check if slack tracking is enabled. | 420 // Check if slack tracking is enabled. |
421 __ lwz(r3, bit_field3); | 421 __ lwz(r3, bit_field3); |
422 __ DecodeField<Map::Counter>(r11, r3); | 422 __ DecodeField<Map::ConstructionCounter>(r11, r3); |
423 // r11: slack tracking counter | 423 // r11: slack tracking counter |
424 __ cmpi(r11, Operand(Map::kSlackTrackingCounterEnd)); | 424 __ cmpi(r11, Operand(Map::kSlackTrackingCounterEnd)); |
425 __ blt(&no_inobject_slack_tracking); | 425 __ blt(&no_inobject_slack_tracking); |
426 // Decrease generous allocation count. | 426 // Decrease generous allocation count. |
427 __ Add(r3, r3, -(1 << Map::Counter::kShift), r0); | 427 __ Add(r3, r3, -(1 << Map::ConstructionCounter::kShift), r0); |
428 __ stw(r3, bit_field3); | 428 __ stw(r3, bit_field3); |
429 | 429 |
430 // Allocate object with a slack. | 430 // Allocate object with a slack. |
431 __ lbz(r3, FieldMemOperand(r5, Map::kUnusedPropertyFieldsOffset)); | 431 __ lbz(r3, FieldMemOperand(r5, Map::kUnusedPropertyFieldsOffset)); |
432 __ ShiftLeftImm(r3, r3, Operand(kPointerSizeLog2)); | 432 __ ShiftLeftImm(r3, r3, Operand(kPointerSizeLog2)); |
433 __ sub(r3, r10, r3); | 433 __ sub(r3, r10, r3); |
434 // r3: offset of first field after pre-allocated fields | 434 // r3: offset of first field after pre-allocated fields |
435 if (FLAG_debug_code) { | 435 if (FLAG_debug_code) { |
436 __ cmp(r8, r3); | 436 __ cmp(r8, r3); |
437 __ Assert(le, kUnexpectedNumberOfPreAllocatedPropertyFields); | 437 __ Assert(le, kUnexpectedNumberOfPreAllocatedPropertyFields); |
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1965 __ bkpt(0); | 1965 __ bkpt(0); |
1966 } | 1966 } |
1967 } | 1967 } |
1968 | 1968 |
1969 | 1969 |
1970 #undef __ | 1970 #undef __ |
1971 } // namespace internal | 1971 } // namespace internal |
1972 } // namespace v8 | 1972 } // namespace v8 |
1973 | 1973 |
1974 #endif // V8_TARGET_ARCH_PPC | 1974 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |