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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2581683003: Introduce {ConstantElementsPair} struct for type safety. (Closed)
Patch Set: Rebased. Created 4 years 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
« no previous file with comments | « src/compiler/types.cc ('k') | src/factory.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 5624 matching lines...) Expand 10 before | Expand all | Expand 10 after
5635 if (!boilerplate_object.is_null() && 5635 if (!boilerplate_object.is_null() &&
5636 IsFastLiteral(boilerplate_object, kMaxFastLiteralDepth, 5636 IsFastLiteral(boilerplate_object, kMaxFastLiteralDepth,
5637 &max_properties)) { 5637 &max_properties)) {
5638 DCHECK(site->SitePointsToLiteral()); 5638 DCHECK(site->SitePointsToLiteral());
5639 AllocationSiteUsageContext site_context(isolate(), site, false); 5639 AllocationSiteUsageContext site_context(isolate(), site, false);
5640 site_context.EnterNewScope(); 5640 site_context.EnterNewScope();
5641 literal = BuildFastLiteral(boilerplate_object, &site_context); 5641 literal = BuildFastLiteral(boilerplate_object, &site_context);
5642 site_context.ExitScope(site, boilerplate_object); 5642 site_context.ExitScope(site, boilerplate_object);
5643 } else { 5643 } else {
5644 NoObservableSideEffectsScope no_effects(this); 5644 NoObservableSideEffectsScope no_effects(this);
5645 Handle<FixedArray> constants = expr->constant_elements(); 5645 Handle<ConstantElementsPair> constants = expr->constant_elements();
5646 int literal_index = expr->literal_index(); 5646 int literal_index = expr->literal_index();
5647 int flags = expr->ComputeFlags(true); 5647 int flags = expr->ComputeFlags(true);
5648 5648
5649 Add<HPushArguments>(AddThisFunction(), Add<HConstant>(literal_index), 5649 Add<HPushArguments>(AddThisFunction(), Add<HConstant>(literal_index),
5650 Add<HConstant>(constants), Add<HConstant>(flags)); 5650 Add<HConstant>(constants), Add<HConstant>(flags));
5651 5651
5652 Runtime::FunctionId function_id = Runtime::kCreateArrayLiteral; 5652 Runtime::FunctionId function_id = Runtime::kCreateArrayLiteral;
5653 literal = Add<HCallRuntime>(Runtime::FunctionForId(function_id), 4); 5653 literal = Add<HCallRuntime>(Runtime::FunctionForId(function_id), 4);
5654 5654
5655 // Register to deopt if the boilerplate ElementsKind changes. 5655 // Register to deopt if the boilerplate ElementsKind changes.
(...skipping 7382 matching lines...) Expand 10 before | Expand all | Expand 10 after
13038 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13038 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13039 } 13039 }
13040 13040
13041 #ifdef DEBUG 13041 #ifdef DEBUG
13042 graph_->Verify(false); // No full verify. 13042 graph_->Verify(false); // No full verify.
13043 #endif 13043 #endif
13044 } 13044 }
13045 13045
13046 } // namespace internal 13046 } // namespace internal
13047 } // namespace v8 13047 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/types.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698