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

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

Issue 1850643002: Adding %_NewObject intrinsic (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: formatting Created 4 years, 8 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 <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 12525 matching lines...) Expand 10 before | Expand all | Expand 10 after
12536 Callable callable = CodeFactory::SubString(isolate()); 12536 Callable callable = CodeFactory::SubString(isolate());
12537 HValue* stub = Add<HConstant>(callable.code()); 12537 HValue* stub = Add<HConstant>(callable.code());
12538 HValue* values[] = {context()}; 12538 HValue* values[] = {context()};
12539 HInstruction* result = New<HCallWithDescriptor>( 12539 HInstruction* result = New<HCallWithDescriptor>(
12540 stub, call->arguments()->length(), callable.descriptor(), 12540 stub, call->arguments()->length(), callable.descriptor(),
12541 Vector<HValue*>(values, arraysize(values))); 12541 Vector<HValue*>(values, arraysize(values)));
12542 result->set_type(HType::String()); 12542 result->set_type(HType::String());
12543 return ast_context()->ReturnInstruction(result, call->id()); 12543 return ast_context()->ReturnInstruction(result, call->id());
12544 } 12544 }
12545 12545
12546 // Support for direct creation of new objects.
12547 void HOptimizedGraphBuilder::GenerateNewObject(CallRuntime* call) {
12548 DCHECK_EQ(2, call->arguments()->length());
12549 CHECK_ALIVE(VisitExpressions(call->arguments()));
12550 FastNewObjectStub stub(isolate());
12551 FastNewObjectDescriptor descriptor(isolate());
12552 HValue* values[] = {context(), Pop(), Pop()};
12553 HConstant* stub_value = Add<HConstant>(stub.GetCode());
12554 HInstruction* result = New<HCallWithDescriptor>(
12555 stub_value, 0, descriptor, Vector<HValue*>(values, arraysize(values)));
12556 return ast_context()->ReturnInstruction(result, call->id());
12557 }
12546 12558
12547 // Support for direct calls from JavaScript to native RegExp code. 12559 // Support for direct calls from JavaScript to native RegExp code.
12548 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { 12560 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
12549 DCHECK_EQ(4, call->arguments()->length()); 12561 DCHECK_EQ(4, call->arguments()->length());
12550 CHECK_ALIVE(VisitExpressions(call->arguments())); 12562 CHECK_ALIVE(VisitExpressions(call->arguments()));
12551 PushArgumentsFromEnvironment(call->arguments()->length()); 12563 PushArgumentsFromEnvironment(call->arguments()->length());
12552 Callable callable = CodeFactory::RegExpExec(isolate()); 12564 Callable callable = CodeFactory::RegExpExec(isolate());
12553 HValue* stub = Add<HConstant>(callable.code()); 12565 HValue* stub = Add<HConstant>(callable.code());
12554 HValue* values[] = {context()}; 12566 HValue* values[] = {context()};
12555 HInstruction* result = New<HCallWithDescriptor>( 12567 HInstruction* result = New<HCallWithDescriptor>(
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
13571 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13583 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13572 } 13584 }
13573 13585
13574 #ifdef DEBUG 13586 #ifdef DEBUG
13575 graph_->Verify(false); // No full verify. 13587 graph_->Verify(false); // No full verify.
13576 #endif 13588 #endif
13577 } 13589 }
13578 13590
13579 } // namespace internal 13591 } // namespace internal
13580 } // namespace v8 13592 } // 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