Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Side by Side Diff: src/ppc/macro-assembler-ppc.cc

Issue 2780283002: PPC/s390: [async-iteration] implement AsyncGenerator (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | src/s390/macro-assembler-s390.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 STATIC_ASSERT(kSmiTag == 0); 2630 STATIC_ASSERT(kSmiTag == 0);
2631 TestIfSmi(object, r0); 2631 TestIfSmi(object, r0);
2632 Check(ne, kOperandIsASmiAndNotAGeneratorObject, cr0); 2632 Check(ne, kOperandIsASmiAndNotAGeneratorObject, cr0);
2633 push(object); 2633 push(object);
2634 CompareObjectType(object, object, object, JS_GENERATOR_OBJECT_TYPE); 2634 CompareObjectType(object, object, object, JS_GENERATOR_OBJECT_TYPE);
2635 pop(object); 2635 pop(object);
2636 Check(eq, kOperandIsNotAGeneratorObject); 2636 Check(eq, kOperandIsNotAGeneratorObject);
2637 } 2637 }
2638 } 2638 }
2639 2639
2640 void MacroAssembler::AssertAsyncGeneratorObject(Register object) {
2641 if (emit_debug_code()) {
2642 STATIC_ASSERT(kSmiTag == 0);
2643 TestIfSmi(object, r0);
2644 Check(ne, kOperandIsASmiAndNotAGeneratorObject);
2645 push(object);
2646 CompareObjectType(object, object, object, JS_ASYNC_GENERATOR_OBJECT_TYPE);
2647 pop(object);
2648 Check(eq, kOperandIsNotAGeneratorObject);
2649 }
2650 }
2651
2640 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, 2652 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
2641 Register scratch) { 2653 Register scratch) {
2642 if (emit_debug_code()) { 2654 if (emit_debug_code()) {
2643 Label done_checking; 2655 Label done_checking;
2644 AssertNotSmi(object); 2656 AssertNotSmi(object);
2645 CompareRoot(object, Heap::kUndefinedValueRootIndex); 2657 CompareRoot(object, Heap::kUndefinedValueRootIndex);
2646 beq(&done_checking); 2658 beq(&done_checking);
2647 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 2659 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
2648 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); 2660 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex);
2649 Assert(eq, kExpectedUndefinedOrCell); 2661 Assert(eq, kExpectedUndefinedOrCell);
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
4239 } 4251 }
4240 if (mag.shift > 0) srawi(result, result, mag.shift); 4252 if (mag.shift > 0) srawi(result, result, mag.shift);
4241 ExtractBit(r0, dividend, 31); 4253 ExtractBit(r0, dividend, 31);
4242 add(result, result, r0); 4254 add(result, result, r0);
4243 } 4255 }
4244 4256
4245 } // namespace internal 4257 } // namespace internal
4246 } // namespace v8 4258 } // namespace v8
4247 4259
4248 #endif // V8_TARGET_ARCH_PPC 4260 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | src/s390/macro-assembler-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698