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

Unified Diff: src/factory.cc

Issue 2811183005: Do not use new struct type where unnecessary. (Closed)
Patch Set: rebase Created 3 years, 8 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/deoptimizer.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 91110ed98fd3dc5b8bc419fde7ec04a0aeff8ed1..7d8198cb7bc03f5e7a26246437777b682bd26d7b 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -128,8 +128,8 @@ Handle<ContextExtension> Factory::NewContextExtension(
Handle<ConstantElementsPair> Factory::NewConstantElementsPair(
ElementsKind elements_kind, Handle<FixedArrayBase> constant_values) {
- Handle<ConstantElementsPair> result = Handle<ConstantElementsPair>::cast(
- NewStruct(CONSTANT_ELEMENTS_PAIR_TYPE));
+ Handle<ConstantElementsPair> result =
+ Handle<ConstantElementsPair>::cast(NewStruct(TUPLE2_TYPE));
result->set_elements_kind(elements_kind);
result->set_constant_values(*constant_values);
return result;
@@ -260,7 +260,7 @@ Handle<AccessorPair> Factory::NewAccessorPair() {
Handle<TypeFeedbackInfo> Factory::NewTypeFeedbackInfo() {
Handle<TypeFeedbackInfo> info =
- Handle<TypeFeedbackInfo>::cast(NewStruct(TYPE_FEEDBACK_INFO_TYPE));
+ Handle<TypeFeedbackInfo>::cast(NewStruct(TUPLE3_TYPE));
info->initialize_storage();
return info;
}
@@ -2601,7 +2601,7 @@ Handle<DebugInfo> Factory::NewDebugInfo(Handle<SharedFunctionInfo> shared) {
Handle<BreakPointInfo> Factory::NewBreakPointInfo(int source_position) {
Handle<BreakPointInfo> new_break_point_info =
- Handle<BreakPointInfo>::cast(NewStruct(BREAK_POINT_INFO_TYPE));
+ Handle<BreakPointInfo>::cast(NewStruct(TUPLE2_TYPE));
new_break_point_info->set_source_position(source_position);
new_break_point_info->set_break_point_objects(*undefined_value());
return new_break_point_info;
« no previous file with comments | « src/deoptimizer.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698