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

Side by Side Diff: src/hydrogen.cc

Issue 1010673004: Tweak the TurboFan pipeline for stub compilation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed spurious edit Created 5 years, 9 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
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 11697 matching lines...) Expand 10 before | Expand all | Expand 10 after
11708 { 11708 {
11709 // If the object is not a value return the object. 11709 // If the object is not a value return the object.
11710 Push(object); 11710 Push(object);
11711 Add<HSimulate>(call->id(), FIXED_SIMULATE); 11711 Add<HSimulate>(call->id(), FIXED_SIMULATE);
11712 } 11712 }
11713 if_objectisvalue.End(); 11713 if_objectisvalue.End();
11714 return ast_context()->ReturnValue(Pop()); 11714 return ast_context()->ReturnValue(Pop());
11715 } 11715 }
11716 11716
11717 11717
11718 void HOptimizedGraphBuilder::GenerateJSValueValue(CallRuntime* call) {
11719 DCHECK(call->arguments()->length() == 1);
11720 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11721 HValue* value = Pop();
11722 HInstruction* result = Add<HLoadNamedField>(
11723 value, nullptr,
11724 HObjectAccess::ForObservableJSObjectOffset(JSValue::kValueOffset));
11725 return ast_context()->ReturnInstruction(result, call->id());
11726 }
11727
11728
11718 void HOptimizedGraphBuilder::GenerateDateField(CallRuntime* call) { 11729 void HOptimizedGraphBuilder::GenerateDateField(CallRuntime* call) {
11719 DCHECK(call->arguments()->length() == 2); 11730 DCHECK(call->arguments()->length() == 2);
11720 DCHECK_NOT_NULL(call->arguments()->at(1)->AsLiteral()); 11731 DCHECK_NOT_NULL(call->arguments()->at(1)->AsLiteral());
11721 Smi* index = Smi::cast(*(call->arguments()->at(1)->AsLiteral()->value())); 11732 Smi* index = Smi::cast(*(call->arguments()->at(1)->AsLiteral()->value()));
11722 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 11733 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11723 HValue* date = Pop(); 11734 HValue* date = Pop();
11724 HDateField* result = New<HDateField>(date, index); 11735 HDateField* result = New<HDateField>(date, index);
11725 return ast_context()->ReturnInstruction(result, call->id()); 11736 return ast_context()->ReturnInstruction(result, call->id());
11726 } 11737 }
11727 11738
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
11869 // Fast support for StringCompare. 11880 // Fast support for StringCompare.
11870 void HOptimizedGraphBuilder::GenerateStringCompare(CallRuntime* call) { 11881 void HOptimizedGraphBuilder::GenerateStringCompare(CallRuntime* call) {
11871 DCHECK_EQ(2, call->arguments()->length()); 11882 DCHECK_EQ(2, call->arguments()->length());
11872 CHECK_ALIVE(VisitExpressions(call->arguments())); 11883 CHECK_ALIVE(VisitExpressions(call->arguments()));
11873 PushArgumentsFromEnvironment(call->arguments()->length()); 11884 PushArgumentsFromEnvironment(call->arguments()->length());
11874 HCallStub* result = New<HCallStub>(CodeStub::StringCompare, 2); 11885 HCallStub* result = New<HCallStub>(CodeStub::StringCompare, 2);
11875 return ast_context()->ReturnInstruction(result, call->id()); 11886 return ast_context()->ReturnInstruction(result, call->id());
11876 } 11887 }
11877 11888
11878 11889
11890 void HOptimizedGraphBuilder::GenerateStringLength(CallRuntime* call) {
11891 DCHECK(call->arguments()->length() == 1);
11892 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11893 HValue* string = Pop();
11894 HInstruction* result = AddLoadStringLength(string);
11895 return ast_context()->ReturnInstruction(result, call->id());
11896 }
11897
11898
11879 // Support for direct calls from JavaScript to native RegExp code. 11899 // Support for direct calls from JavaScript to native RegExp code.
11880 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { 11900 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
11881 DCHECK_EQ(4, call->arguments()->length()); 11901 DCHECK_EQ(4, call->arguments()->length());
11882 CHECK_ALIVE(VisitExpressions(call->arguments())); 11902 CHECK_ALIVE(VisitExpressions(call->arguments()));
11883 PushArgumentsFromEnvironment(call->arguments()->length()); 11903 PushArgumentsFromEnvironment(call->arguments()->length());
11884 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4); 11904 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4);
11885 return ast_context()->ReturnInstruction(result, call->id()); 11905 return ast_context()->ReturnInstruction(result, call->id());
11886 } 11906 }
11887 11907
11888 11908
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
13386 if (ShouldProduceTraceOutput()) { 13406 if (ShouldProduceTraceOutput()) {
13387 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13407 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13388 } 13408 }
13389 13409
13390 #ifdef DEBUG 13410 #ifdef DEBUG
13391 graph_->Verify(false); // No full verify. 13411 graph_->Verify(false); // No full verify.
13392 #endif 13412 #endif
13393 } 13413 }
13394 13414
13395 } } // namespace v8::internal 13415 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698