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

Side by Side Diff: src/compiler/js-graph.cc

Issue 709033002: Teach TurboFan to call C functions with result_size > 1. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments. Created 6 years, 1 month 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/compiler/js-graph.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/node-properties-inl.h" 7 #include "src/compiler/node-properties-inl.h"
8 #include "src/compiler/typer.h" 8 #include "src/compiler/typer.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 namespace compiler { 12 namespace compiler {
13 13
14 Node* JSGraph::ImmovableHeapConstant(Handle<HeapObject> object) { 14 Node* JSGraph::ImmovableHeapConstant(Handle<HeapObject> object) {
15 Unique<HeapObject> unique = Unique<HeapObject>::CreateImmovable(object); 15 Unique<HeapObject> unique = Unique<HeapObject>::CreateImmovable(object);
16 return graph()->NewNode(common()->HeapConstant(unique)); 16 return graph()->NewNode(common()->HeapConstant(unique));
17 } 17 }
18 18
19 19
20 Node* JSGraph::CEntryStubConstant() { 20 Node* JSGraph::CEntryStubConstant(int result_size) {
21 if (!c_entry_stub_constant_.is_set()) { 21 if (result_size == 1) {
22 c_entry_stub_constant_.set( 22 if (!c_entry_stub_constant_.is_set()) {
23 ImmovableHeapConstant(CEntryStub(isolate(), 1).GetCode())); 23 c_entry_stub_constant_.set(
24 ImmovableHeapConstant(CEntryStub(isolate(), 1).GetCode()));
25 }
26 return c_entry_stub_constant_.get();
24 } 27 }
25 return c_entry_stub_constant_.get(); 28
29 return ImmovableHeapConstant(CEntryStub(isolate(), result_size).GetCode());
26 } 30 }
27 31
28 32
29 Node* JSGraph::UndefinedConstant() { 33 Node* JSGraph::UndefinedConstant() {
30 if (!undefined_constant_.is_set()) { 34 if (!undefined_constant_.is_set()) {
31 undefined_constant_.set( 35 undefined_constant_.set(
32 ImmovableHeapConstant(factory()->undefined_value())); 36 ImmovableHeapConstant(factory()->undefined_value()));
33 } 37 }
34 return undefined_constant_.get(); 38 return undefined_constant_.get();
35 } 39 }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 &true_constant_, &false_constant_, &null_constant_, 204 &true_constant_, &false_constant_, &null_constant_,
201 &zero_constant_, &one_constant_, &nan_constant_}; 205 &zero_constant_, &one_constant_, &nan_constant_};
202 for (size_t i = 0; i < arraysize(ptrs); i++) { 206 for (size_t i = 0; i < arraysize(ptrs); i++) {
203 if (ptrs[i]->is_set()) nodes->push_back(ptrs[i]->get()); 207 if (ptrs[i]->is_set()) nodes->push_back(ptrs[i]->get());
204 } 208 }
205 } 209 }
206 210
207 } // namespace compiler 211 } // namespace compiler
208 } // namespace internal 212 } // namespace internal
209 } // namespace v8 213 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698