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

Side by Side Diff: src/hydrogen.cc

Issue 1086873003: Array() in optimized code can create with wrong ElementsKind in corner cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments and test failure. Created 5 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 unified diff | Download patch
« no previous file with comments | « src/arm64/lithium-codegen-arm64.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 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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 8953 matching lines...) Expand 10 before | Expand all | Expand 10 after
8964 HValue* function, 8964 HValue* function,
8965 Handle<AllocationSite> site) { 8965 Handle<AllocationSite> site) {
8966 Add<HCheckValue>(function, array_function()); 8966 Add<HCheckValue>(function, array_function());
8967 8967
8968 if (IsCallArrayInlineable(arguments_count, site)) { 8968 if (IsCallArrayInlineable(arguments_count, site)) {
8969 BuildInlinedCallArray(expression, arguments_count, site); 8969 BuildInlinedCallArray(expression, arguments_count, site);
8970 return; 8970 return;
8971 } 8971 }
8972 8972
8973 HInstruction* call = PreProcessCall(New<HCallNewArray>( 8973 HInstruction* call = PreProcessCall(New<HCallNewArray>(
8974 function, arguments_count + 1, site->GetElementsKind())); 8974 function, arguments_count + 1, site->GetElementsKind(), site));
8975 if (expression->IsCall()) { 8975 if (expression->IsCall()) {
8976 Drop(1); 8976 Drop(1);
8977 } 8977 }
8978 ast_context()->ReturnInstruction(call, expression->id()); 8978 ast_context()->ReturnInstruction(call, expression->id());
8979 } 8979 }
8980 8980
8981 8981
8982 HValue* HOptimizedGraphBuilder::BuildArrayIndexOf(HValue* receiver, 8982 HValue* HOptimizedGraphBuilder::BuildArrayIndexOf(HValue* receiver,
8983 HValue* search_element, 8983 HValue* search_element,
8984 ElementsKind kind, 8984 ElementsKind kind,
(...skipping 3963 matching lines...) Expand 10 before | Expand all | Expand 10 after
12948 if (ShouldProduceTraceOutput()) { 12948 if (ShouldProduceTraceOutput()) {
12949 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12949 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12950 } 12950 }
12951 12951
12952 #ifdef DEBUG 12952 #ifdef DEBUG
12953 graph_->Verify(false); // No full verify. 12953 graph_->Verify(false); // No full verify.
12954 #endif 12954 #endif
12955 } 12955 }
12956 12956
12957 } } // namespace v8::internal 12957 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698