Bug 1530745 - Part 4: Remove INTERPRETED_METHOD_GENERATOR_OR_ASYNC in favour of using only INTERPRETED_METHOD. r=arai
authorAndré Bargull <andre.bargull@gmail.com>
Fri, 08 Mar 2019 12:37:02 +0000
changeset 521219 d6cab6cee202052a53f91f1f8c9f781aaab8265b
parent 521218 588b9eec2edbb5f0420619e2858d31971cad09d2
child 521220 b499a1eec1b1169757cc93928f9c987df1884097
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1530745
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530745 - Part 4: Remove INTERPRETED_METHOD_GENERATOR_OR_ASYNC in favour of using only INTERPRETED_METHOD. r=arai Depends on D22668 Differential Revision: https://phabricator.services.mozilla.com/D22669
js/src/frontend/Parser.cpp
js/src/vm/JSFunction.h
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -1944,20 +1944,17 @@ JSFunction* AllocNewFunction(JSContext* 
                    ? JSFunction::INTERPRETED_LAMBDA
                    : JSFunction::INTERPRETED_LAMBDA_GENERATOR_OR_ASYNC);
       break;
     case FunctionSyntaxKind::Arrow:
       flags = JSFunction::INTERPRETED_LAMBDA_ARROW;
       allocKind = gc::AllocKind::FUNCTION_EXTENDED;
       break;
     case FunctionSyntaxKind::Method:
-      flags = (generatorKind == GeneratorKind::NotGenerator &&
-                       asyncKind == FunctionAsyncKind::SyncFunction
-                   ? JSFunction::INTERPRETED_METHOD
-                   : JSFunction::INTERPRETED_METHOD_GENERATOR_OR_ASYNC);
+      flags = JSFunction::INTERPRETED_METHOD;
       allocKind = gc::AllocKind::FUNCTION_EXTENDED;
       break;
     case FunctionSyntaxKind::ClassConstructor:
     case FunctionSyntaxKind::DerivedClassConstructor:
       flags = JSFunction::INTERPRETED_CLASS_CONSTRUCTOR;
       allocKind = gc::AllocKind::FUNCTION_EXTENDED;
       break;
     case FunctionSyntaxKind::Getter:
--- a/js/src/vm/JSFunction.h
+++ b/js/src/vm/JSFunction.h
@@ -95,17 +95,16 @@ class JSFunction : public js::NativeObje
     NATIVE_FUN = 0,
     NATIVE_CTOR = NATIVE_FUN | CONSTRUCTOR,
     NATIVE_CLASS_CTOR = NATIVE_FUN | CONSTRUCTOR | CLASSCONSTRUCTOR_KIND,
     ASMJS_CTOR = ASMJS_KIND | NATIVE_CTOR,
     ASMJS_LAMBDA_CTOR = ASMJS_KIND | NATIVE_CTOR | LAMBDA,
     ASMJS_NATIVE = ASMJS_KIND | NATIVE_FUN,
     WASM_FUN = NATIVE_FUN | WASM_OPTIMIZED,
     INTERPRETED_METHOD = INTERPRETED | METHOD_KIND,
-    INTERPRETED_METHOD_GENERATOR_OR_ASYNC = INTERPRETED | METHOD_KIND,
     INTERPRETED_CLASS_CONSTRUCTOR =
         INTERPRETED | CLASSCONSTRUCTOR_KIND | CONSTRUCTOR,
     INTERPRETED_GETTER = INTERPRETED | GETTER_KIND,
     INTERPRETED_SETTER = INTERPRETED | SETTER_KIND,
     INTERPRETED_LAMBDA = INTERPRETED | LAMBDA | CONSTRUCTOR,
     INTERPRETED_LAMBDA_ARROW = INTERPRETED | LAMBDA | ARROW_KIND,
     INTERPRETED_LAMBDA_GENERATOR_OR_ASYNC = INTERPRETED | LAMBDA,
     INTERPRETED_NORMAL = INTERPRETED | CONSTRUCTOR,