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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2113613002: [Interpereter] Inline FastNewClosure into CreateClosure bytecode handler (Closed) Base URL: ssh://rmcilroy.lon.corp.google.com///usr/local/google/code/v8_full/v8@int_context
Patch Set: Rebaseline bytecode expectations Created 4 years, 6 months 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/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 6154a4ebfb533561515bfb1473709ff70ddcc848..bdc5370f5a30ac5779f65f6999c3470256a712cf 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -1300,8 +1300,9 @@ void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
if (shared_info.is_null()) {
return SetStackOverflow();
}
- builder()->CreateClosure(shared_info,
- expr->pretenure() ? TENURED : NOT_TENURED);
+ uint8_t flags = CreateClosureFlags::Encode(expr->pretenure(),
+ scope()->is_function_scope());
+ builder()->CreateClosure(shared_info, flags);
execution_result()->SetResultInAccumulator();
}
@@ -1518,18 +1519,10 @@ void BytecodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
// Copy the literal boilerplate.
- int fast_clone_properties_count = 0;
- if (FastCloneShallowObjectStub::IsSupported(expr)) {
- STATIC_ASSERT(
- FastCloneShallowObjectStub::kMaximumClonedProperties <=
- 1 << CreateObjectLiteralFlags::FastClonePropertiesCountBits::kShift);
- fast_clone_properties_count =
- FastCloneShallowObjectStub::PropertiesCount(expr->properties_count());
- }
- uint8_t flags =
- CreateObjectLiteralFlags::FlagsBits::encode(expr->ComputeFlags()) |
- CreateObjectLiteralFlags::FastClonePropertiesCountBits::encode(
- fast_clone_properties_count);
+ uint8_t flags = CreateObjectLiteralFlags::Encode(
+ FastCloneShallowObjectStub::IsSupported(expr),
+ FastCloneShallowObjectStub::PropertiesCount(expr->properties_count()),
+ expr->ComputeFlags());
builder()->CreateObjectLiteral(expr->constant_properties(),
expr->literal_index(), flags);
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698