Chromium Code Reviews| 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/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
| 8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
| 9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
| 10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
| (...skipping 2583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2594 ast_context()->ProduceValue(jsgraph()->TheHoleConstant()); | 2594 ast_context()->ProduceValue(jsgraph()->TheHoleConstant()); |
| 2595 return SetStackOverflow(); | 2595 return SetStackOverflow(); |
| 2596 } | 2596 } |
| 2597 | 2597 |
| 2598 // Evaluate all arguments to the runtime call. | 2598 // Evaluate all arguments to the runtime call. |
| 2599 ZoneList<Expression*>* args = expr->arguments(); | 2599 ZoneList<Expression*>* args = expr->arguments(); |
| 2600 VisitForValues(args); | 2600 VisitForValues(args); |
| 2601 | 2601 |
| 2602 // Create node to perform the runtime call. | 2602 // Create node to perform the runtime call. |
| 2603 Runtime::FunctionId functionId = function->function_id; | 2603 Runtime::FunctionId functionId = function->function_id; |
| 2604 const Operator* call = javascript()->CallRuntime(functionId, args->length()); | 2604 // Outer-most frame of calls into native function chains must have a frame in |
| 2605 // the stack crawl. | |
| 2606 TailCallMode mode = | |
|
Benedikt Meurer
2015/07/30 06:47:24
IMHO this will be highly confusing and might be a
| |
| 2607 info()->shared_info()->native() ? NO_TAIL_CALLS : ALLOW_TAIL_CALLS; | |
| 2608 const Operator* call = | |
| 2609 javascript()->CallRuntime(functionId, args->length(), mode); | |
| 2605 FrameStateBeforeAndAfter states(this, expr->CallId()); | 2610 FrameStateBeforeAndAfter states(this, expr->CallId()); |
| 2606 Node* value = ProcessArguments(call, args->length()); | 2611 Node* value = ProcessArguments(call, args->length()); |
| 2607 states.AddToNode(value, expr->id(), ast_context()->GetStateCombine()); | 2612 states.AddToNode(value, expr->id(), ast_context()->GetStateCombine()); |
| 2608 ast_context()->ProduceValue(value); | 2613 ast_context()->ProduceValue(value); |
| 2609 } | 2614 } |
| 2610 | 2615 |
| 2611 | 2616 |
| 2612 void AstGraphBuilder::VisitUnaryOperation(UnaryOperation* expr) { | 2617 void AstGraphBuilder::VisitUnaryOperation(UnaryOperation* expr) { |
| 2613 switch (expr->op()) { | 2618 switch (expr->op()) { |
| 2614 case Token::DELETE: | 2619 case Token::DELETE: |
| (...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4316 // Phi does not exist yet, introduce one. | 4321 // Phi does not exist yet, introduce one. |
| 4317 value = NewPhi(inputs, value, control); | 4322 value = NewPhi(inputs, value, control); |
| 4318 value->ReplaceInput(inputs - 1, other); | 4323 value->ReplaceInput(inputs - 1, other); |
| 4319 } | 4324 } |
| 4320 return value; | 4325 return value; |
| 4321 } | 4326 } |
| 4322 | 4327 |
| 4323 } // namespace compiler | 4328 } // namespace compiler |
| 4324 } // namespace internal | 4329 } // namespace internal |
| 4325 } // namespace v8 | 4330 } // namespace v8 |
| OLD | NEW |