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

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

Issue 2607303002: [crankshaft] Don't bailout on uninitialized access to arguments object. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | test/mjsunit/regress/regress-5790.js » ('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 7381 matching lines...) Expand 10 before | Expand all | Expand 10 after
7392 result = New<HArgumentsLength>(elements); 7392 result = New<HArgumentsLength>(elements);
7393 } else { 7393 } else {
7394 // Number of arguments without receiver. 7394 // Number of arguments without receiver.
7395 int argument_count = environment()-> 7395 int argument_count = environment()->
7396 arguments_environment()->parameter_count() - 1; 7396 arguments_environment()->parameter_count() - 1;
7397 result = New<HConstant>(argument_count); 7397 result = New<HConstant>(argument_count);
7398 } 7398 }
7399 } else { 7399 } else {
7400 // We need to take into account the KEYED_LOAD_IC feedback to guard the 7400 // We need to take into account the KEYED_LOAD_IC feedback to guard the
7401 // HBoundsCheck instructions below. 7401 // HBoundsCheck instructions below.
7402 if (!expr->IsMonomorphic()) return false; 7402 if (!expr->IsMonomorphic() && !expr->IsUninitialized()) return false;
7403 if (IsAnyParameterContextAllocated()) return false; 7403 if (IsAnyParameterContextAllocated()) return false;
7404 CHECK_ALIVE_OR_RETURN(VisitForValue(expr->obj(), ARGUMENTS_ALLOWED), true); 7404 CHECK_ALIVE_OR_RETURN(VisitForValue(expr->obj(), ARGUMENTS_ALLOWED), true);
7405 CHECK_ALIVE_OR_RETURN(VisitForValue(expr->key()), true); 7405 CHECK_ALIVE_OR_RETURN(VisitForValue(expr->key()), true);
7406 HValue* key = Pop(); 7406 HValue* key = Pop();
7407 Drop(1); // Arguments object. 7407 Drop(1); // Arguments object.
7408 if (function_state()->outer() == NULL) { 7408 if (function_state()->outer() == NULL) {
7409 HInstruction* elements = Add<HArgumentsElements>(false); 7409 HInstruction* elements = Add<HArgumentsElements>(false);
7410 HInstruction* length = Add<HArgumentsLength>(elements); 7410 HInstruction* length = Add<HArgumentsLength>(elements);
7411 HInstruction* checked_key = Add<HBoundsCheck>(key, length); 7411 HInstruction* checked_key = Add<HBoundsCheck>(key, length);
7412 result = New<HAccessArgumentsAt>(elements, length, checked_key); 7412 result = New<HAccessArgumentsAt>(elements, length, checked_key);
(...skipping 5584 matching lines...) Expand 10 before | Expand all | Expand 10 after
12997 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12997 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12998 } 12998 }
12999 12999
13000 #ifdef DEBUG 13000 #ifdef DEBUG
13001 graph_->Verify(false); // No full verify. 13001 graph_->Verify(false); // No full verify.
13002 #endif 13002 #endif
13003 } 13003 }
13004 13004
13005 } // namespace internal 13005 } // namespace internal
13006 } // namespace v8 13006 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-5790.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698