| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |