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

Side by Side Diff: src/builtins/ppc/builtins-ppc.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 | « no previous file | src/builtins/s390/builtins-s390.cc » ('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 #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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 __ LoadP(r4, MemOperand(sp)); 581 __ LoadP(r4, MemOperand(sp));
582 } 582 }
583 583
584 // Leave construct frame. 584 // Leave construct frame.
585 } 585 }
586 586
587 // ES6 9.2.2. Step 13+ 587 // ES6 9.2.2. Step 13+
588 // Check that the result is not a Smi, indicating that the constructor result 588 // Check that the result is not a Smi, indicating that the constructor result
589 // from a derived class is neither undefined nor an Object. 589 // from a derived class is neither undefined nor an Object.
590 if (check_derived_construct) { 590 if (check_derived_construct) {
591 Label dont_throw; 591 Label do_throw, dont_throw;
592 __ JumpIfNotSmi(r3, &dont_throw); 592 __ JumpIfSmi(r3, &do_throw);
593 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
594 __ CompareObjectType(r3, r6, r6, FIRST_JS_RECEIVER_TYPE);
595 __ bge(&dont_throw);
596 __ bind(&do_throw);
593 { 597 {
594 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 598 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
595 __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject); 599 __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject);
596 } 600 }
597 __ bind(&dont_throw); 601 __ bind(&dont_throw);
598 } 602 }
599 603
600 __ SmiToPtrArrayOffset(r4, r4); 604 __ SmiToPtrArrayOffset(r4, r4);
601 __ add(sp, sp, r4); 605 __ add(sp, sp, r4);
602 __ addi(sp, sp, Operand(kPointerSize)); 606 __ addi(sp, sp, Operand(kPointerSize));
(...skipping 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 } 3077 }
3074 // Now jump to the instructions of the returned code object. 3078 // Now jump to the instructions of the returned code object.
3075 __ Jump(r11); 3079 __ Jump(r11);
3076 } 3080 }
3077 3081
3078 #undef __ 3082 #undef __
3079 } // namespace internal 3083 } // namespace internal
3080 } // namespace v8 3084 } // namespace v8
3081 3085
3082 #endif // V8_TARGET_ARCH_PPC 3086 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/builtins/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698