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

Side by Side Diff: src/builtins/s390/builtins-s390.cc

Issue 2786413003: PPC/s390: [es2015] Simplify contract between parser and stub for derived constructors. (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/builtins/ppc/builtins-ppc.cc ('k') | no next file » | 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 #if V8_TARGET_ARCH_S390 5 #if V8_TARGET_ARCH_S390
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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 __ LoadP(r3, MemOperand(sp)); 578 __ LoadP(r3, MemOperand(sp));
579 } 579 }
580 580
581 // Leave construct frame. 581 // Leave construct frame.
582 } 582 }
583 583
584 // ES6 9.2.2. Step 13+ 584 // ES6 9.2.2. Step 13+
585 // Check that the result is not a Smi, indicating that the constructor result 585 // Check that the result is not a Smi, indicating that the constructor result
586 // from a derived class is neither undefined nor an Object. 586 // from a derived class is neither undefined nor an Object.
587 if (check_derived_construct) { 587 if (check_derived_construct) {
588 Label dont_throw; 588 Label do_throw, dont_throw;
589 __ JumpIfNotSmi(r2, &dont_throw); 589 __ JumpIfSmi(r2, &do_throw);
590 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
591 __ CompareObjectType(r2, r5, r5, FIRST_JS_RECEIVER_TYPE);
592 __ bge(&dont_throw);
593 __ bind(&do_throw);
590 { 594 {
591 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 595 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
592 __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject); 596 __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject);
593 } 597 }
594 __ bind(&dont_throw); 598 __ bind(&dont_throw);
595 } 599 }
596 600
597 __ SmiToPtrArrayOffset(r3, r3); 601 __ SmiToPtrArrayOffset(r3, r3);
598 __ AddP(sp, sp, r3); 602 __ AddP(sp, sp, r3);
599 __ AddP(sp, sp, Operand(kPointerSize)); 603 __ AddP(sp, sp, Operand(kPointerSize));
(...skipping 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 // Now jump to the instructions of the returned code object. 3092 // Now jump to the instructions of the returned code object.
3089 __ Jump(ip); 3093 __ Jump(ip);
3090 } 3094 }
3091 3095
3092 #undef __ 3096 #undef __
3093 3097
3094 } // namespace internal 3098 } // namespace internal
3095 } // namespace v8 3099 } // namespace v8
3096 3100
3097 #endif // V8_TARGET_ARCH_S390 3101 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698