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

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

Issue 2427673004: [intrinsics] Nuke %HasCachedArrayIndex and %GetCachedArrayIndex. (Closed)
Patch Set: Created 4 years, 2 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/crankshaft/hydrogen.h ('k') | src/crankshaft/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/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 11983 matching lines...) Expand 10 before | Expand all | Expand 10 after
11994 DCHECK(call->arguments()->length() == 1); 11994 DCHECK(call->arguments()->length() == 1);
11995 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 11995 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11996 HValue* value = Pop(); 11996 HValue* value = Pop();
11997 HHasInstanceTypeAndBranch* result = 11997 HHasInstanceTypeAndBranch* result =
11998 New<HHasInstanceTypeAndBranch>(value, 11998 New<HHasInstanceTypeAndBranch>(value,
11999 FIRST_JS_RECEIVER_TYPE, 11999 FIRST_JS_RECEIVER_TYPE,
12000 LAST_JS_RECEIVER_TYPE); 12000 LAST_JS_RECEIVER_TYPE);
12001 return ast_context()->ReturnControl(result, call->id()); 12001 return ast_context()->ReturnControl(result, call->id());
12002 } 12002 }
12003 12003
12004
12005 void HOptimizedGraphBuilder::GenerateHasCachedArrayIndex(CallRuntime* call) {
12006 DCHECK(call->arguments()->length() == 1);
12007 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12008 HValue* value = Pop();
12009 HHasCachedArrayIndexAndBranch* result =
12010 New<HHasCachedArrayIndexAndBranch>(value);
12011 return ast_context()->ReturnControl(result, call->id());
12012 }
12013
12014
12015 void HOptimizedGraphBuilder::GenerateIsArray(CallRuntime* call) { 12004 void HOptimizedGraphBuilder::GenerateIsArray(CallRuntime* call) {
12016 DCHECK(call->arguments()->length() == 1); 12005 DCHECK(call->arguments()->length() == 1);
12017 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12006 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12018 HValue* value = Pop(); 12007 HValue* value = Pop();
12019 HHasInstanceTypeAndBranch* result = 12008 HHasInstanceTypeAndBranch* result =
12020 New<HHasInstanceTypeAndBranch>(value, JS_ARRAY_TYPE); 12009 New<HHasInstanceTypeAndBranch>(value, JS_ARRAY_TYPE);
12021 return ast_context()->ReturnControl(result, call->id()); 12010 return ast_context()->ReturnControl(result, call->id());
12022 } 12011 }
12023 12012
12024 12013
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
12453 void HOptimizedGraphBuilder::GenerateMapClear(CallRuntime* call) { 12442 void HOptimizedGraphBuilder::GenerateMapClear(CallRuntime* call) {
12454 DCHECK(call->arguments()->length() == 1); 12443 DCHECK(call->arguments()->length() == 1);
12455 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12444 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12456 HValue* receiver = Pop(); 12445 HValue* receiver = Pop();
12457 12446
12458 NoObservableSideEffectsScope no_effects(this); 12447 NoObservableSideEffectsScope no_effects(this);
12459 BuildOrderedHashTableClear<OrderedHashMap>(receiver); 12448 BuildOrderedHashTableClear<OrderedHashMap>(receiver);
12460 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); 12449 return ast_context()->ReturnValue(graph()->GetConstantUndefined());
12461 } 12450 }
12462 12451
12463
12464 void HOptimizedGraphBuilder::GenerateGetCachedArrayIndex(CallRuntime* call) {
12465 DCHECK(call->arguments()->length() == 1);
12466 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12467 HValue* value = Pop();
12468 HGetCachedArrayIndex* result = New<HGetCachedArrayIndex>(value);
12469 return ast_context()->ReturnInstruction(result, call->id());
12470 }
12471
12472
12473 void HOptimizedGraphBuilder::GenerateDebugBreakInOptimizedCode( 12452 void HOptimizedGraphBuilder::GenerateDebugBreakInOptimizedCode(
12474 CallRuntime* call) { 12453 CallRuntime* call) {
12475 Add<HDebugBreak>(); 12454 Add<HDebugBreak>();
12476 return ast_context()->ReturnValue(graph()->GetConstant0()); 12455 return ast_context()->ReturnValue(graph()->GetConstant0());
12477 } 12456 }
12478 12457
12479 12458
12480 void HOptimizedGraphBuilder::GenerateDebugIsActive(CallRuntime* call) { 12459 void HOptimizedGraphBuilder::GenerateDebugIsActive(CallRuntime* call) {
12481 DCHECK(call->arguments()->length() == 0); 12460 DCHECK(call->arguments()->length() == 0);
12482 HValue* ref = 12461 HValue* ref =
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
13144 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13123 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13145 } 13124 }
13146 13125
13147 #ifdef DEBUG 13126 #ifdef DEBUG
13148 graph_->Verify(false); // No full verify. 13127 graph_->Verify(false); // No full verify.
13149 #endif 13128 #endif
13150 } 13129 }
13151 13130
13152 } // namespace internal 13131 } // namespace internal
13153 } // namespace v8 13132 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698