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

Unified Diff: src/hydrogen.cc

Issue 1162603002: Version 4.3.61.24 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.3
Patch Set: Created 5 years, 7 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/full-codegen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 21a6979b3bc8ae623811c00a1b8182f3a41df99e..ae717e4ad9a014c6197c932b19e53a4e30b2ce87 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5554,19 +5554,13 @@ void HOptimizedGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
Handle<FixedArray> closure_literals(closure->literals(), isolate());
Handle<FixedArray> constant_properties = expr->constant_properties();
int literal_index = expr->literal_index();
- int flags = expr->fast_elements()
- ? ObjectLiteral::kFastElements : ObjectLiteral::kNoFlags;
- flags |= expr->has_function()
- ? ObjectLiteral::kHasFunction : ObjectLiteral::kNoFlags;
+ int flags = expr->ComputeFlags(true);
Add<HPushArguments>(Add<HConstant>(closure_literals),
Add<HConstant>(literal_index),
Add<HConstant>(constant_properties),
Add<HConstant>(flags));
- // TODO(mvstanton): Add a flag to turn off creation of any
- // AllocationMementos for this call: we are in crankshaft and should have
- // learned enough about transition behavior to stop emitting mementos.
Runtime::FunctionId function_id = Runtime::kCreateObjectLiteral;
literal = Add<HCallRuntime>(isolate()->factory()->empty_string(),
Runtime::FunctionForId(function_id),
@@ -5725,10 +5719,7 @@ void HOptimizedGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
// pass an empty fixed array to the runtime function instead.
Handle<FixedArray> constants = isolate()->factory()->empty_fixed_array();
int literal_index = expr->literal_index();
- int flags = expr->depth() == 1
- ? ArrayLiteral::kShallowElements
- : ArrayLiteral::kNoFlags;
- flags |= ArrayLiteral::kDisableMementos;
+ int flags = expr->ComputeFlags(true);
Add<HPushArguments>(Add<HConstant>(literals),
Add<HConstant>(literal_index),
« no previous file with comments | « src/full-codegen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698