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

Unified Diff: test/cctest/test-code-stub-assembler.cc

Issue 2467513002: [builtins]: Uniformly push argument count in TF-generated builtins (Closed)
Patch Set: Fix windows build Created 4 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 | « test/cctest/compiler/code-assembler-tester.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-code-stub-assembler.cc
diff --git a/test/cctest/test-code-stub-assembler.cc b/test/cctest/test-code-stub-assembler.cc
index 45c4aefec41edd46482f3dee4cf905cdcc91f912..3d8b214483b0e04c2cff8011046130ad31021acd 100644
--- a/test/cctest/test-code-stub-assembler.cc
+++ b/test/cctest/test-code-stub-assembler.cc
@@ -1510,7 +1510,8 @@ TEST(GotoIfException) {
Isolate* isolate(CcTest::InitIsolateOnce());
const int kNumParams = 1;
- CodeStubAssemblerTester m(isolate, kNumParams);
+ // Emulate TFJ builtin
+ CodeStubAssemblerTester m(isolate, kNumParams, Code::BUILTIN);
Node* context = m.HeapConstant(Handle<Context>(isolate->native_context()));
Node* to_string_tag =
@@ -1529,9 +1530,6 @@ TEST(GotoIfException) {
Handle<Code> code = m.GenerateCode();
CHECK(!code.is_null());
- // Emulate TFJ builtin
- code->set_flags(Code::ComputeFlags(Code::BUILTIN));
-
FunctionTester ft(code, kNumParams);
Handle<Object> result = ft.Call().ToHandleChecked();
@@ -1551,7 +1549,8 @@ TEST(GotoIfExceptionMultiple) {
Isolate* isolate(CcTest::InitIsolateOnce());
const int kNumParams = 4; // receiver, first, second, third
- CodeStubAssemblerTester m(isolate, kNumParams);
+ // Emulate TFJ builtin
+ CodeStubAssemblerTester m(isolate, kNumParams, Code::BUILTIN);
Node* context = m.HeapConstant(Handle<Context>(isolate->native_context()));
Node* first_value = m.Parameter(0);
@@ -1596,9 +1595,6 @@ TEST(GotoIfExceptionMultiple) {
Handle<Code> code = m.GenerateCode();
CHECK(!code.is_null());
- // Emulate TFJ builtin
- code->set_flags(Code::ComputeFlags(Code::BUILTIN));
-
FunctionTester ft(code, kNumParams);
Handle<Object> result;
@@ -1776,13 +1772,11 @@ TEST(PopAndReturnVariable) {
FunctionTester ft(code, kNumParams);
Handle<Object> result;
for (int test_count = 0; test_count < 100; ++test_count) {
- result =
- ft.Call(isolate->factory()->undefined_value(),
- Handle<Smi>(Smi::FromInt(1234), isolate),
- isolate->factory()->undefined_value(),
- Handle<Smi>(Smi::FromInt(kNumProgramaticParams * kPointerSize),
- isolate))
- .ToHandleChecked();
+ result = ft.Call(isolate->factory()->undefined_value(),
+ Handle<Smi>(Smi::FromInt(1234), isolate),
+ isolate->factory()->undefined_value(),
+ Handle<Smi>(Smi::FromInt(kNumProgramaticParams), isolate))
+ .ToHandleChecked();
CHECK_EQ(1234, Handle<Smi>::cast(result)->value());
}
}
« no previous file with comments | « test/cctest/compiler/code-assembler-tester.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698