OLD | NEW |
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-inlining.h" | 5 #include "src/compiler/js-inlining.h" |
6 | 6 |
7 #include "src/ast.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/compiler/all-nodes.h" | 10 #include "src/compiler/all-nodes.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 | 312 |
313 // TODO(turbofan): Inlining into a try-block is not yet supported. | 313 // TODO(turbofan): Inlining into a try-block is not yet supported. |
314 if (NodeProperties::IsExceptionalCall(node)) { | 314 if (NodeProperties::IsExceptionalCall(node)) { |
315 TRACE("Not inlining %s into %s because of surrounding try-block\n", | 315 TRACE("Not inlining %s into %s because of surrounding try-block\n", |
316 function->shared()->DebugName()->ToCString().get(), | 316 function->shared()->DebugName()->ToCString().get(), |
317 info_->shared_info()->DebugName()->ToCString().get()); | 317 info_->shared_info()->DebugName()->ToCString().get()); |
318 return NoChange(); | 318 return NoChange(); |
319 } | 319 } |
320 | 320 |
321 Zone zone; | 321 // TODO(mstarzinger): The correct thing would be to use a local zone here for |
322 ParseInfo parse_info(&zone, function); | 322 // the inner graph. This however leads to Zone-Types being allocated in the |
| 323 // wrong zone and makes the engine explode at high speeds. Explosion bad! |
| 324 // Zone zone; |
| 325 // ParseInfo parse_info(&zone, function); |
| 326 ParseInfo parse_info(jsgraph_->zone(), function); |
323 CompilationInfo info(&parse_info); | 327 CompilationInfo info(&parse_info); |
324 if (info_->is_deoptimization_enabled()) { | 328 if (info_->is_deoptimization_enabled()) { |
325 info.MarkAsDeoptimizationEnabled(); | 329 info.MarkAsDeoptimizationEnabled(); |
326 } | 330 } |
327 if (info_->is_native_context_specializing()) { | 331 if (info_->is_native_context_specializing()) { |
328 info.MarkAsNativeContextSpecializing(); | 332 info.MarkAsNativeContextSpecializing(); |
329 } | 333 } |
330 | 334 |
331 if (!Compiler::ParseAndAnalyze(info.parse_info())) { | 335 if (!Compiler::ParseAndAnalyze(info.parse_info())) { |
332 TRACE("Not inlining %s into %s because parsing failed\n", | 336 TRACE("Not inlining %s into %s because parsing failed\n", |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 | 409 |
406 // Remember that we inlined this function. | 410 // Remember that we inlined this function. |
407 info_->AddInlinedFunction(info.shared_info()); | 411 info_->AddInlinedFunction(info.shared_info()); |
408 | 412 |
409 return InlineCall(node, context, frame_state, start, end); | 413 return InlineCall(node, context, frame_state, start, end); |
410 } | 414 } |
411 | 415 |
412 } // namespace compiler | 416 } // namespace compiler |
413 } // namespace internal | 417 } // namespace internal |
414 } // namespace v8 | 418 } // namespace v8 |
OLD | NEW |