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

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

Issue 555283004: [turbofan] Next step towards shared operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/compiler/js-graph.h ('k') | src/compiler/js-inlining.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 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/compiler/js-graph.h" 5 #include "src/compiler/js-graph.h"
6 #include "src/compiler/node-properties-inl.h" 6 #include "src/compiler/node-properties-inl.h"
7 #include "src/compiler/typer.h" 7 #include "src/compiler/typer.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 namespace compiler { 11 namespace compiler {
12 12
13 Node* JSGraph::ImmovableHeapConstant(Handle<Object> object) { 13 Node* JSGraph::ImmovableHeapConstant(Handle<Object> object) {
14 Unique<Object> unique = Unique<Object>::CreateImmovable(object); 14 Unique<Object> unique = Unique<Object>::CreateImmovable(object);
15 return NewNode(common()->HeapConstant(unique)); 15 return NewNode(common()->HeapConstant(unique));
16 } 16 }
17 17
18 18
19 Node* JSGraph::NewNode(Operator* op) { 19 Node* JSGraph::NewNode(const Operator* op) {
20 Node* node = graph()->NewNode(op); 20 Node* node = graph()->NewNode(op);
21 typer_->Init(node); 21 typer_->Init(node);
22 return node; 22 return node;
23 } 23 }
24 24
25 25
26 Node* JSGraph::CEntryStubConstant() { 26 Node* JSGraph::CEntryStubConstant() {
27 if (!c_entry_stub_constant_.is_set()) { 27 if (!c_entry_stub_constant_.is_set()) {
28 c_entry_stub_constant_.set( 28 c_entry_stub_constant_.set(
29 ImmovableHeapConstant(CEntryStub(isolate(), 1).GetCode())); 29 ImmovableHeapConstant(CEntryStub(isolate(), 1).GetCode()));
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 Node* JSGraph::ExternalConstant(ExternalReference reference) { 177 Node* JSGraph::ExternalConstant(ExternalReference reference) {
178 Node** loc = cache_.FindExternalConstant(reference); 178 Node** loc = cache_.FindExternalConstant(reference);
179 if (*loc == NULL) { 179 if (*loc == NULL) {
180 *loc = NewNode(common()->ExternalConstant(reference)); 180 *loc = NewNode(common()->ExternalConstant(reference));
181 } 181 }
182 return *loc; 182 return *loc;
183 } 183 }
184 } // namespace compiler 184 } // namespace compiler
185 } // namespace internal 185 } // namespace internal
186 } // namespace v8 186 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.h ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698