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

Side by Side Diff: src/compiler/pipeline.cc

Issue 631433002: Classes runtime (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove kConstructorFunction Created 6 years, 2 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/ast-graph-builder.cc ('k') | src/full-codegen.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/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/base/platform/elapsed-timer.h" 9 #include "src/base/platform/elapsed-timer.h"
10 #include "src/compiler/ast-graph-builder.h" 10 #include "src/compiler/ast-graph-builder.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 SourcePositionTable* source_positions) 138 SourcePositionTable* source_positions)
139 : AstGraphBuilder(info, jsgraph), source_positions_(source_positions) {} 139 : AstGraphBuilder(info, jsgraph), source_positions_(source_positions) {}
140 140
141 bool CreateGraph() { 141 bool CreateGraph() {
142 SourcePositionTable::Scope pos(source_positions_, 142 SourcePositionTable::Scope pos(source_positions_,
143 SourcePosition::Unknown()); 143 SourcePosition::Unknown());
144 return AstGraphBuilder::CreateGraph(); 144 return AstGraphBuilder::CreateGraph();
145 } 145 }
146 146
147 #define DEF_VISIT(type) \ 147 #define DEF_VISIT(type) \
148 virtual void Visit##type(type* node) OVERRIDE { \ 148 virtual void Visit##type(type* node) OVERRIDE { \
149 SourcePositionTable::Scope pos(source_positions_, \ 149 SourcePositionTable::Scope pos(source_positions_, \
150 SourcePosition(node->position())); \ 150 SourcePosition(node->position())); \
151 AstGraphBuilder::Visit##type(node); \ 151 AstGraphBuilder::Visit##type(node); \
152 } 152 }
153 AST_NODE_LIST(DEF_VISIT) 153 AST_NODE_LIST(DEF_VISIT)
154 #undef DEF_VISIT 154 #undef DEF_VISIT
155 155
156 private: 156 private:
157 SourcePositionTable* source_positions_; 157 SourcePositionTable* source_positions_;
158 }; 158 };
159 159
160 160
161 static void TraceSchedule(Schedule* schedule) { 161 static void TraceSchedule(Schedule* schedule) {
162 if (!FLAG_trace_turbo) return; 162 if (!FLAG_trace_turbo) return;
163 OFStream os(stdout); 163 OFStream os(stdout);
164 os << "-- Schedule --------------------------------------\n" << *schedule; 164 os << "-- Schedule --------------------------------------\n" << *schedule;
165 } 165 }
166 166
167 167
168 Handle<Code> Pipeline::GenerateCode() { 168 Handle<Code> Pipeline::GenerateCode() {
169 // This list must be kept in sync with DONT_TURBOFAN_NODE in ast.cc. 169 // This list must be kept in sync with DONT_TURBOFAN_NODE in ast.cc.
170 if (info()->function()->dont_optimize_reason() == kTryCatchStatement || 170 if (info()->function()->dont_optimize_reason() == kTryCatchStatement ||
171 info()->function()->dont_optimize_reason() == kTryFinallyStatement || 171 info()->function()->dont_optimize_reason() == kTryFinallyStatement ||
172 // TODO(turbofan): Make ES6 for-of work and remove this bailout. 172 // TODO(turbofan): Make ES6 for-of work and remove this bailout.
173 info()->function()->dont_optimize_reason() == kForOfStatement || 173 info()->function()->dont_optimize_reason() == kForOfStatement ||
174 // TODO(turbofan): Make super work and remove this bailout. 174 // TODO(turbofan): Make super work and remove this bailout.
175 info()->function()->dont_optimize_reason() == kSuperReference || 175 info()->function()->dont_optimize_reason() == kSuperReference ||
176 // TODO(turbofan): Make classliterals work and remove this bailout. 176 // TODO(turbofan): Make class literals work and remove this bailout.
177 info()->function()->dont_optimize_reason() == kClassLiteral || 177 info()->function()->dont_optimize_reason() == kClassLiteral ||
178 // TODO(turbofan): Make OSR work and remove this bailout. 178 // TODO(turbofan): Make OSR work and remove this bailout.
179 info()->is_osr()) { 179 info()->is_osr()) {
180 return Handle<Code>::null(); 180 return Handle<Code>::null();
181 } 181 }
182 182
183 if (FLAG_turbo_stats) isolate()->GetTStatistics()->Initialize(info_); 183 if (FLAG_turbo_stats) isolate()->GetTStatistics()->Initialize(info_);
184 184
185 if (FLAG_trace_turbo) { 185 if (FLAG_trace_turbo) {
186 OFStream os(stdout); 186 OFStream os(stdout);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } 447 }
448 448
449 449
450 void Pipeline::TearDown() { 450 void Pipeline::TearDown() {
451 InstructionOperand::TearDownCaches(); 451 InstructionOperand::TearDownCaches();
452 } 452 }
453 453
454 } // namespace compiler 454 } // namespace compiler
455 } // namespace internal 455 } // namespace internal
456 } // namespace v8 456 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698