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/control-builders.h" | 8 #include "src/compiler/control-builders.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // Visit implicit declaration of the function name. | 80 // Visit implicit declaration of the function name. |
81 if (scope->is_function_scope() && scope->function() != NULL) { | 81 if (scope->is_function_scope() && scope->function() != NULL) { |
82 VisitVariableDeclaration(scope->function()); | 82 VisitVariableDeclaration(scope->function()); |
83 } | 83 } |
84 | 84 |
85 // Visit declarations within the function scope. | 85 // Visit declarations within the function scope. |
86 VisitDeclarations(scope->declarations()); | 86 VisitDeclarations(scope->declarations()); |
87 | 87 |
88 // TODO(mstarzinger): This should do an inlined stack check. | 88 // TODO(mstarzinger): This should do an inlined stack check. |
89 NewNode(javascript()->Runtime(Runtime::kStackGuard, 0)); | 89 Node* node = NewNode(javascript()->Runtime(Runtime::kStackGuard, 0)); |
| 90 PrepareFrameState(node, BailoutId::FunctionEntry()); |
90 | 91 |
91 // Visit statements in the function body. | 92 // Visit statements in the function body. |
92 VisitStatements(info()->function()->body()); | 93 VisitStatements(info()->function()->body()); |
93 if (HasStackOverflow()) return false; | 94 if (HasStackOverflow()) return false; |
94 | 95 |
95 // Emit tracing call if requested to do so. | 96 // Emit tracing call if requested to do so. |
96 if (FLAG_trace) { | 97 if (FLAG_trace) { |
97 // TODO(mstarzinger): Only traces implicit return. | 98 // TODO(mstarzinger): Only traces implicit return. |
98 Node* return_value = jsgraph()->UndefinedConstant(); | 99 Node* return_value = jsgraph()->UndefinedConstant(); |
99 NewNode(javascript()->Runtime(Runtime::kTraceExit, 1), return_value); | 100 NewNode(javascript()->Runtime(Runtime::kTraceExit, 1), return_value); |
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2024 | 2025 |
2025 // Continue with the original environment. | 2026 // Continue with the original environment. |
2026 set_environment(continuation_env); | 2027 set_environment(continuation_env); |
2027 NewNode(common()->Continuation()); | 2028 NewNode(common()->Continuation()); |
2028 } | 2029 } |
2029 } | 2030 } |
2030 | 2031 |
2031 } | 2032 } |
2032 } | 2033 } |
2033 } // namespace v8::internal::compiler | 2034 } // namespace v8::internal::compiler |
OLD | NEW |