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

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

Issue 1418623007: [runtime] Fix ES6 9.2.1 [[Call]] when encountering a classConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Do not use kNear jump on x64 Created 5 years, 1 month 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/objects.h ('k') | src/runtime/runtime-function.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 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 __ add(sp, sp, r0); 1562 __ add(sp, sp, r0);
1563 } 1563 }
1564 1564
1565 1565
1566 // static 1566 // static
1567 void Builtins::Generate_CallFunction(MacroAssembler* masm) { 1567 void Builtins::Generate_CallFunction(MacroAssembler* masm) {
1568 // ----------- S t a t e ------------- 1568 // ----------- S t a t e -------------
1569 // -- r3 : the number of arguments (not including the receiver) 1569 // -- r3 : the number of arguments (not including the receiver)
1570 // -- r4 : the function to call (checked to be a JSFunction) 1570 // -- r4 : the function to call (checked to be a JSFunction)
1571 // ----------------------------------- 1571 // -----------------------------------
1572 // See ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList)
1572 1573
1573 Label convert, convert_global_proxy, convert_to_object, done_convert; 1574 Label convert, convert_global_proxy, convert_to_object, done_convert;
1574 __ AssertFunction(r4); 1575 __ AssertFunction(r4);
1575 // TODO(bmeurer): Throw a TypeError if function's [[FunctionKind]] internal 1576 // TODO(bmeurer): Throw a TypeError if function's [[FunctionKind]] internal
1576 // slot is "classConstructor". 1577 // slot is "classConstructor".
1577 // Enter the context of the function; ToObject has to run in the function 1578 // Enter the context of the function; ToObject has to run in the function
1578 // context, and we also need to take the global proxy from the function 1579 // context, and we also need to take the global proxy from the function
1579 // context in case of conversion. 1580 // context in case of conversion.
1580 // See ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList)
1581 STATIC_ASSERT(SharedFunctionInfo::kNativeByteOffset == 1581 STATIC_ASSERT(SharedFunctionInfo::kNativeByteOffset ==
1582 SharedFunctionInfo::kStrictModeByteOffset); 1582 SharedFunctionInfo::kStrictModeByteOffset);
1583 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); 1583 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset));
1584 __ LoadP(r5, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); 1584 __ LoadP(r5, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
1585 // We need to convert the receiver for non-native sloppy mode functions. 1585 // We need to convert the receiver for non-native sloppy mode functions.
1586 __ lbz(r6, FieldMemOperand(r5, SharedFunctionInfo::kNativeByteOffset)); 1586 __ lbz(r6, FieldMemOperand(r5, SharedFunctionInfo::kNativeByteOffset));
1587 __ andi(r0, r6, Operand((1 << SharedFunctionInfo::kNativeBitWithinByte) | 1587 __ andi(r0, r6, Operand((1 << SharedFunctionInfo::kNativeBitWithinByte) |
1588 (1 << SharedFunctionInfo::kStrictModeBitWithinByte))); 1588 (1 << SharedFunctionInfo::kStrictModeBitWithinByte)));
1589 __ bne(&done_convert, cr0); 1589 __ bne(&done_convert, cr0);
1590 { 1590 {
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 __ bkpt(0); 1941 __ bkpt(0);
1942 } 1942 }
1943 } 1943 }
1944 1944
1945 1945
1946 #undef __ 1946 #undef __
1947 } // namespace internal 1947 } // namespace internal
1948 } // namespace v8 1948 } // namespace v8
1949 1949
1950 #endif // V8_TARGET_ARCH_PPC 1950 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698