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

Side by Side Diff: src/hydrogen.cc

Issue 14972008: Remove obsolete HObjectLiteral instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix after rebase. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6740 matching lines...) Expand 10 before | Expand all | Expand 10 after
6751 Handle<JSObject> boilerplate_object = 6751 Handle<JSObject> boilerplate_object =
6752 DeepCopy(original_boilerplate_object); 6752 DeepCopy(original_boilerplate_object);
6753 6753
6754 literal = BuildFastLiteral(context, 6754 literal = BuildFastLiteral(context,
6755 boilerplate_object, 6755 boilerplate_object,
6756 original_boilerplate_object, 6756 original_boilerplate_object,
6757 data_size, 6757 data_size,
6758 pointer_size, 6758 pointer_size,
6759 DONT_TRACK_ALLOCATION_SITE); 6759 DONT_TRACK_ALLOCATION_SITE);
6760 } else { 6760 } else {
6761 NoObservableSideEffectsScope no_effects(this);
6761 Handle<FixedArray> closure_literals(closure->literals(), isolate()); 6762 Handle<FixedArray> closure_literals(closure->literals(), isolate());
6763 Handle<FixedArray> constant_properties = expr->constant_properties();
6764 int literal_index = expr->literal_index();
6765 int flags = expr->fast_elements()
6766 ? ObjectLiteral::kFastElements : ObjectLiteral::kNoFlags;
6767 flags |= expr->has_function()
6768 ? ObjectLiteral::kHasFunction : ObjectLiteral::kNoFlags;
6769
6770 AddInstruction(new(zone()) HPushArgument(AddInstruction(
6771 new(zone()) HConstant(closure_literals, Representation::Tagged()))));
6772 AddInstruction(new(zone()) HPushArgument(AddInstruction(
6773 new(zone()) HConstant(literal_index, Representation::Tagged()))));
6774 AddInstruction(new(zone()) HPushArgument(AddInstruction(
6775 new(zone()) HConstant(constant_properties, Representation::Tagged()))));
6776 AddInstruction(new(zone()) HPushArgument(AddInstruction(
6777 new(zone()) HConstant(flags, Representation::Tagged()))));
6778
6779 Runtime::FunctionId function_id =
6780 (expr->depth() > 1 || expr->may_store_doubles())
6781 ? Runtime::kCreateObjectLiteral : Runtime::kCreateObjectLiteralShallow;
6762 literal = AddInstruction( 6782 literal = AddInstruction(
6763 new(zone()) HObjectLiteral(context, 6783 new(zone()) HCallRuntime(context,
6764 expr->constant_properties(), 6784 isolate()->factory()->empty_string(),
6765 closure_literals, 6785 Runtime::FunctionForId(function_id),
6766 expr->fast_elements(), 6786 4));
6767 expr->literal_index(),
6768 expr->depth(),
6769 expr->may_store_doubles(),
6770 expr->has_function()));
6771 } 6787 }
6772 6788
6773 // The object is expected in the bailout environment during computation 6789 // The object is expected in the bailout environment during computation
6774 // of the property values and is the value of the entire expression. 6790 // of the property values and is the value of the entire expression.
6775 Push(literal); 6791 Push(literal);
6776 6792
6777 expr->CalculateEmitStore(zone()); 6793 expr->CalculateEmitStore(zone());
6778 6794
6779 for (int i = 0; i < expr->properties()->length(); i++) { 6795 for (int i = 0; i < expr->properties()->length(); i++) {
6780 ObjectLiteral::Property* property = expr->properties()->at(i); 6796 ObjectLiteral::Property* property = expr->properties()->at(i);
(...skipping 5589 matching lines...) Expand 10 before | Expand all | Expand 10 after
12370 } 12386 }
12371 } 12387 }
12372 12388
12373 #ifdef DEBUG 12389 #ifdef DEBUG
12374 if (graph_ != NULL) graph_->Verify(false); // No full verify. 12390 if (graph_ != NULL) graph_->Verify(false); // No full verify.
12375 if (allocator_ != NULL) allocator_->Verify(); 12391 if (allocator_ != NULL) allocator_->Verify();
12376 #endif 12392 #endif
12377 } 12393 }
12378 12394
12379 } } // namespace v8::internal 12395 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698