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

Unified Diff: src/ia32/code-stubs-ia32.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/ia32/builtins-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index 874478b54e88cdcaa62509d490569b45dde55594..36b8c0ba9d32dc2912bbd3d5e75d69e8837bb57b 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -2030,17 +2030,14 @@
static void EmitContinueIfStrictOrNative(MacroAssembler* masm, Label* cont) {
- // ----------- S t a t e -------------
- // -- edi : the function to call
- // -- edx : the function's shared function info
- // -----------------------------------
// Do not transform the receiver for strict mode functions.
- __ test_b(FieldOperand(edx, SharedFunctionInfo::kStrictModeByteOffset),
+ __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
+ __ test_b(FieldOperand(ecx, SharedFunctionInfo::kStrictModeByteOffset),
1 << SharedFunctionInfo::kStrictModeBitWithinByte);
__ j(not_equal, cont);
// Do not transform the receiver for natives (shared already in ecx).
- __ test_b(FieldOperand(edx, SharedFunctionInfo::kNativeByteOffset),
+ __ test_b(FieldOperand(ecx, SharedFunctionInfo::kNativeByteOffset),
1 << SharedFunctionInfo::kNativeBitWithinByte);
__ j(not_equal, cont);
}
@@ -2065,24 +2062,6 @@
}
-static void EmitClassConstructorCallCheck(MacroAssembler* masm) {
- // ----------- S t a t e -------------
- // -- edi : the function to call
- // -- edx : the function's shared function info
- // -----------------------------------
- // ClassConstructor Check: ES6 section 9.2.1 [[Call]]
- Label non_class_constructor;
- // Check whether the current function is a classConstructor.
- __ test_b(FieldOperand(edx, SharedFunctionInfo::kFunctionKindByteOffset),
- SharedFunctionInfo::kClassConstructorBitsWithinByte);
- __ j(zero, &non_class_constructor, Label::kNear);
- // If we call a classConstructor Function throw a TypeError
- // indirectly via the CallFunction builtin.
- __ Jump(masm->isolate()->builtins()->CallFunction(), RelocInfo::CODE_TARGET);
- __ bind(&non_class_constructor);
-}
-
-
static void CallFunctionNoFeedback(MacroAssembler* masm,
int argc, bool needs_checks,
bool call_as_method) {
@@ -2097,9 +2076,6 @@
__ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx);
__ j(not_equal, &slow);
}
-
- __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
- EmitClassConstructorCallCheck(masm);
// Fast-case: Just invoke the function.
ParameterCount actual(argc);
@@ -2273,10 +2249,6 @@
Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement)));
__ bind(&have_js_function);
-
- __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
- EmitClassConstructorCallCheck(masm);
-
if (CallAsMethod()) {
EmitContinueIfStrictOrNative(masm, &cont);
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698