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

Side by Side Diff: src/hydrogen.cc

Issue 651223002: Implement inline %_IsJSProxy() for full codegen and Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ia32/full-codegen-ia32.cc » ('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 11441 matching lines...) Expand 10 before | Expand all | Expand 10 after
11452 11452
11453 void HOptimizedGraphBuilder::GenerateIsObject(CallRuntime* call) { 11453 void HOptimizedGraphBuilder::GenerateIsObject(CallRuntime* call) {
11454 DCHECK(call->arguments()->length() == 1); 11454 DCHECK(call->arguments()->length() == 1);
11455 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 11455 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11456 HValue* value = Pop(); 11456 HValue* value = Pop();
11457 HIsObjectAndBranch* result = New<HIsObjectAndBranch>(value); 11457 HIsObjectAndBranch* result = New<HIsObjectAndBranch>(value);
11458 return ast_context()->ReturnControl(result, call->id()); 11458 return ast_context()->ReturnControl(result, call->id());
11459 } 11459 }
11460 11460
11461 11461
11462 void HOptimizedGraphBuilder::GenerateIsJSProxy(CallRuntime* call) {
11463 DCHECK(call->arguments()->length() == 1);
11464 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11465 HValue* value = Pop();
11466 HIfContinuation continuation;
11467 IfBuilder if_proxy(this);
11468
11469 HValue* smicheck = if_proxy.IfNot<HIsSmiAndBranch>(value);
11470 if_proxy.And();
11471 HValue* map = Add<HLoadNamedField>(value, smicheck, HObjectAccess::ForMap());
11472 HValue* instance_type = Add<HLoadNamedField>(
11473 map, static_cast<HValue*>(NULL), HObjectAccess::ForMapInstanceType());
11474 if_proxy.If<HCompareNumericAndBranch>(
11475 instance_type, Add<HConstant>(FIRST_JS_PROXY_TYPE), Token::GTE);
11476 if_proxy.And();
11477 if_proxy.If<HCompareNumericAndBranch>(
11478 instance_type, Add<HConstant>(LAST_JS_PROXY_TYPE), Token::LTE);
11479
11480 if_proxy.CaptureContinuation(&continuation);
11481 return ast_context()->ReturnContinuation(&continuation, call->id());
11482 }
11483
11484
11462 void HOptimizedGraphBuilder::GenerateIsNonNegativeSmi(CallRuntime* call) { 11485 void HOptimizedGraphBuilder::GenerateIsNonNegativeSmi(CallRuntime* call) {
11463 return Bailout(kInlinedRuntimeFunctionIsNonNegativeSmi); 11486 return Bailout(kInlinedRuntimeFunctionIsNonNegativeSmi);
11464 } 11487 }
11465 11488
11466 11489
11467 void HOptimizedGraphBuilder::GenerateIsUndetectableObject(CallRuntime* call) { 11490 void HOptimizedGraphBuilder::GenerateIsUndetectableObject(CallRuntime* call) {
11468 DCHECK(call->arguments()->length() == 1); 11491 DCHECK(call->arguments()->length() == 1);
11469 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 11492 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11470 HValue* value = Pop(); 11493 HValue* value = Pop();
11471 HIsUndetectableAndBranch* result = New<HIsUndetectableAndBranch>(value); 11494 HIsUndetectableAndBranch* result = New<HIsUndetectableAndBranch>(value);
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
12539 if (ShouldProduceTraceOutput()) { 12562 if (ShouldProduceTraceOutput()) {
12540 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12563 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12541 } 12564 }
12542 12565
12543 #ifdef DEBUG 12566 #ifdef DEBUG
12544 graph_->Verify(false); // No full verify. 12567 graph_->Verify(false); // No full verify.
12545 #endif 12568 #endif
12546 } 12569 }
12547 12570
12548 } } // namespace v8::internal 12571 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698