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

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

Issue 2581683003: Introduce {ConstantElementsPair} struct for type safety. (Closed)
Patch Set: Re-cemment bytecode tests. 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
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 5623 matching lines...) Expand 10 before | Expand all | Expand 10 after
5634 if (!boilerplate_object.is_null() && 5634 if (!boilerplate_object.is_null() &&
5635 IsFastLiteral(boilerplate_object, kMaxFastLiteralDepth, 5635 IsFastLiteral(boilerplate_object, kMaxFastLiteralDepth,
5636 &max_properties)) { 5636 &max_properties)) {
5637 DCHECK(site->SitePointsToLiteral()); 5637 DCHECK(site->SitePointsToLiteral());
5638 AllocationSiteUsageContext site_context(isolate(), site, false); 5638 AllocationSiteUsageContext site_context(isolate(), site, false);
5639 site_context.EnterNewScope(); 5639 site_context.EnterNewScope();
5640 literal = BuildFastLiteral(boilerplate_object, &site_context); 5640 literal = BuildFastLiteral(boilerplate_object, &site_context);
5641 site_context.ExitScope(site, boilerplate_object); 5641 site_context.ExitScope(site, boilerplate_object);
5642 } else { 5642 } else {
5643 NoObservableSideEffectsScope no_effects(this); 5643 NoObservableSideEffectsScope no_effects(this);
5644 Handle<FixedArray> constants = expr->constant_elements(); 5644 Handle<ConstantElementsPair> constants = expr->constant_elements();
5645 int literal_index = expr->literal_index(); 5645 int literal_index = expr->literal_index();
5646 int flags = expr->ComputeFlags(true); 5646 int flags = expr->ComputeFlags(true);
5647 5647
5648 Add<HPushArguments>(AddThisFunction(), Add<HConstant>(literal_index), 5648 Add<HPushArguments>(AddThisFunction(), Add<HConstant>(literal_index),
5649 Add<HConstant>(constants), Add<HConstant>(flags)); 5649 Add<HConstant>(constants), Add<HConstant>(flags));
5650 5650
5651 Runtime::FunctionId function_id = Runtime::kCreateArrayLiteral; 5651 Runtime::FunctionId function_id = Runtime::kCreateArrayLiteral;
5652 literal = Add<HCallRuntime>(Runtime::FunctionForId(function_id), 4); 5652 literal = Add<HCallRuntime>(Runtime::FunctionForId(function_id), 4);
5653 5653
5654 // Register to deopt if the boilerplate ElementsKind changes. 5654 // Register to deopt if the boilerplate ElementsKind changes.
(...skipping 7382 matching lines...) Expand 10 before | Expand all | Expand 10 after
13037 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13037 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13038 } 13038 }
13039 13039
13040 #ifdef DEBUG 13040 #ifdef DEBUG
13041 graph_->Verify(false); // No full verify. 13041 graph_->Verify(false); // No full verify.
13042 #endif 13042 #endif
13043 } 13043 }
13044 13044
13045 } // namespace internal 13045 } // namespace internal
13046 } // namespace v8 13046 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/types.cc ('k') | src/factory.h » ('j') | src/objects-printer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698