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

Unified Diff: src/mips64/builtins-mips64.cc

Issue 1415783006: Revert of [runtime] Fix ES6 9.2.1 [[Call]] when encountering a classConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/builtins-mips64.cc
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
index 6e28f896e2c48a91867986be17a3e6f1525576be..389d39be6c824ae1659a696ab04eaa58a13e21cb 100644
--- a/src/mips64/builtins-mips64.cc
+++ b/src/mips64/builtins-mips64.cc
@@ -1560,24 +1560,8 @@
Label convert, convert_global_proxy, convert_to_object, done_convert;
__ AssertFunction(a1);
- __ ld(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
-
- {
- Label non_class_constructor;
- // Check whether the current function is a classConstructor
- __ lbu(a3,
- FieldMemOperand(a2, SharedFunctionInfo::kFunctionKindByteOffset));
- __ And(at, a3,
- Operand(SharedFunctionInfo::kClassConstructorBitsWithinByte));
- __ Branch(&non_class_constructor, eq, at, Operand(zero_reg));
- // Step: 2, If we call a classConstructor Function throw a TypeError.
- {
- FrameScope frame(masm, StackFrame::INTERNAL);
- __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 0);
- }
- __ bind(&non_class_constructor);
- }
-
+ // TODO(bmeurer): Throw a TypeError if function's [[FunctionKind]] internal
+ // slot is "classConstructor".
// Enter the context of the function; ToObject has to run in the function
// context, and we also need to take the global proxy from the function
// context in case of conversion.
@@ -1585,6 +1569,7 @@
STATIC_ASSERT(SharedFunctionInfo::kNativeByteOffset ==
SharedFunctionInfo::kStrictModeByteOffset);
__ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset));
+ __ ld(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset));
// We need to convert the receiver for non-native sloppy mode functions.
__ lbu(a3, FieldMemOperand(a2, SharedFunctionInfo::kNativeByteOffset));
__ And(at, a3, Operand((1 << SharedFunctionInfo::kNativeBitWithinByte) |
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698