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

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

Issue 2598973002: [stubs] Remove %_NewObject intrinsic (Closed)
Patch Set: Rebase Created 3 years, 12 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/full-codegen/full-codegen.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 12083 matching lines...) Expand 10 before | Expand all | Expand 10 after
12094 HValue* to = Pop(); 12094 HValue* to = Pop();
12095 HValue* from = Pop(); 12095 HValue* from = Pop();
12096 HValue* string = Pop(); 12096 HValue* string = Pop();
12097 HValue* values[] = {string, from, to}; 12097 HValue* values[] = {string, from, to};
12098 HInstruction* result = New<HCallWithDescriptor>( 12098 HInstruction* result = New<HCallWithDescriptor>(
12099 stub, 0, callable.descriptor(), ArrayVector(values)); 12099 stub, 0, callable.descriptor(), ArrayVector(values));
12100 result->set_type(HType::String()); 12100 result->set_type(HType::String());
12101 return ast_context()->ReturnInstruction(result, call->id()); 12101 return ast_context()->ReturnInstruction(result, call->id());
12102 } 12102 }
12103 12103
12104 // Support for direct creation of new objects.
12105 void HOptimizedGraphBuilder::GenerateNewObject(CallRuntime* call) {
12106 DCHECK_EQ(2, call->arguments()->length());
12107 CHECK_ALIVE(VisitExpressions(call->arguments()));
12108 FastNewObjectStub stub(isolate());
12109 FastNewObjectDescriptor descriptor(isolate());
12110 HValue* values[] = {Pop(), Pop()};
12111 HConstant* stub_value = Add<HConstant>(stub.GetCode());
12112 HInstruction* result =
12113 New<HCallWithDescriptor>(stub_value, 0, descriptor, ArrayVector(values));
12114 return ast_context()->ReturnInstruction(result, call->id());
12115 }
12116
12117 // Support for direct calls from JavaScript to native RegExp code. 12104 // Support for direct calls from JavaScript to native RegExp code.
12118 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { 12105 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
12119 DCHECK_EQ(4, call->arguments()->length()); 12106 DCHECK_EQ(4, call->arguments()->length());
12120 CHECK_ALIVE(VisitExpressions(call->arguments())); 12107 CHECK_ALIVE(VisitExpressions(call->arguments()));
12121 Callable callable = CodeFactory::RegExpExec(isolate()); 12108 Callable callable = CodeFactory::RegExpExec(isolate());
12122 HValue* last_match_info = Pop(); 12109 HValue* last_match_info = Pop();
12123 HValue* index = Pop(); 12110 HValue* index = Pop();
12124 HValue* subject = Pop(); 12111 HValue* subject = Pop();
12125 HValue* regexp_object = Pop(); 12112 HValue* regexp_object = Pop();
12126 HValue* stub = Add<HConstant>(callable.code()); 12113 HValue* stub = Add<HConstant>(callable.code());
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
13011 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12998 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13012 } 12999 }
13013 13000
13014 #ifdef DEBUG 13001 #ifdef DEBUG
13015 graph_->Verify(false); // No full verify. 13002 graph_->Verify(false); // No full verify.
13016 #endif 13003 #endif
13017 } 13004 }
13018 13005
13019 } // namespace internal 13006 } // namespace internal
13020 } // namespace v8 13007 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698