summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/interpreter/test-bytecode-generator.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-08-01 08:38:30 +0200
committerMichaël Zasso <targos@protonmail.com>2019-08-01 12:53:56 +0200
commit2dcc3665abf57c3607cebffdeeca062f5894885d (patch)
tree4f560748132edcfb4c22d6f967a7e80d23d7ea2c /deps/v8/test/cctest/interpreter/test-bytecode-generator.cc
parent1ee47d550c6de132f06110aa13eceb7551d643b3 (diff)
downloadnode-new-2dcc3665abf57c3607cebffdeeca062f5894885d.tar.gz
deps: update V8 to 7.6.303.28
PR-URL: https://github.com/nodejs/node/pull/28016 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'deps/v8/test/cctest/interpreter/test-bytecode-generator.cc')
-rw-r--r--deps/v8/test/cctest/interpreter/test-bytecode-generator.cc48
1 files changed, 34 insertions, 14 deletions
diff --git a/deps/v8/test/cctest/interpreter/test-bytecode-generator.cc b/deps/v8/test/cctest/interpreter/test-bytecode-generator.cc
index 168dabd8dc..3a4d089786 100644
--- a/deps/v8/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/deps/v8/test/cctest/interpreter/test-bytecode-generator.cc
@@ -4,12 +4,12 @@
#include <fstream>
-#include "src/v8.h"
+#include "src/init/v8.h"
#include "src/interpreter/bytecode-array-iterator.h"
#include "src/interpreter/bytecode-generator.h"
#include "src/interpreter/interpreter.h"
-#include "src/objects-inl.h"
+#include "src/objects/objects-inl.h"
#include "test/cctest/cctest.h"
#include "test/cctest/interpreter/bytecode-expectations-printer.h"
#include "test/cctest/test-feedback-vector.h"
@@ -2650,8 +2650,6 @@ TEST(ClassAndSuperClass) {
}
TEST(PublicClassFields) {
- bool old_flag = i::FLAG_harmony_public_fields;
- i::FLAG_harmony_public_fields = true;
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate());
@@ -2700,12 +2698,9 @@ TEST(PublicClassFields) {
CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("PublicClassFields.golden")));
- i::FLAG_harmony_public_fields = old_flag;
}
TEST(PrivateClassFields) {
- bool old_flag = i::FLAG_harmony_private_fields;
- i::FLAG_harmony_private_fields = true;
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate());
@@ -2760,14 +2755,41 @@ TEST(PrivateClassFields) {
CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("PrivateClassFields.golden")));
- i::FLAG_harmony_private_fields = old_flag;
+}
+
+TEST(PrivateMethods) {
+ bool old_methods_flag = i::FLAG_harmony_private_methods;
+ i::FLAG_harmony_private_methods = true;
+ InitializedIgnitionHandleScope scope;
+ BytecodeExpectationsPrinter printer(CcTest::isolate());
+
+ const char* snippets[] = {
+ "{\n"
+ " class A {\n"
+ " #a() { return 1; }\n"
+ " }\n"
+ "\n"
+ " new A;\n"
+ "}\n",
+
+ "{\n"
+ " class D {\n"
+ " #d() {}\n"
+ " }\n"
+ "\n"
+ " class E extends D {\n"
+ " #e() {}\n"
+ " }\n"
+ "\n"
+ " new D;\n"
+ " new E;\n"
+ "}\n"};
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("PrivateMethods.golden")));
+ i::FLAG_harmony_private_methods = old_methods_flag;
}
TEST(StaticClassFields) {
- bool old_flag = i::FLAG_harmony_public_fields;
- bool old_static_flag = i::FLAG_harmony_static_fields;
- i::FLAG_harmony_public_fields = true;
- i::FLAG_harmony_static_fields = true;
InitializedIgnitionHandleScope scope;
BytecodeExpectationsPrinter printer(CcTest::isolate());
@@ -2826,8 +2848,6 @@ TEST(StaticClassFields) {
CHECK(CompareTexts(BuildActual(printer, snippets),
LoadGolden("StaticClassFields.golden")));
- i::FLAG_harmony_public_fields = old_flag;
- i::FLAG_harmony_static_fields = old_static_flag;
}
TEST(Generators) {