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

Unified Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 1474103002: Re-reland "[Interpreter] Add CreateClosure to BytecodeGraphBuilder." (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 | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/interpreter/bytecode-array-builder-unittest.cc
diff --git a/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
index 1e4eb460b4832e0eafdd664cd1907634800d4cfb..e9dd452f95ae9a796a0c4457e8074af7e2384153 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -94,7 +94,11 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.StoreKeyedProperty(reg, reg, 2056, LanguageMode::STRICT);
// Emit closure operations.
- builder.CreateClosure(NOT_TENURED);
+ Factory* factory = isolate()->factory();
+ Handle<SharedFunctionInfo> shared_info = factory->NewSharedFunctionInfo(
+ factory->NewStringFromStaticChars("function_a"), MaybeHandle<Code>(),
+ false);
+ builder.CreateClosure(shared_info, NOT_TENURED);
// Emit argument creation operations.
builder.CreateArguments(CreateArgumentsType::kMappedArguments)
@@ -215,6 +219,12 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
}
builder.LoadLiteral(Smi::FromInt(20000000));
+ // CreateClosureWide
+ Handle<SharedFunctionInfo> shared_info2 = factory->NewSharedFunctionInfo(
+ factory->NewStringFromStaticChars("function_b"), MaybeHandle<Code>(),
+ false);
+ builder.CreateClosure(shared_info2, NOT_TENURED);
+
builder.Return();
// Generate BytecodeArray.
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698