OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast/ast-numbering.h" | 10 #include "src/ast/ast-numbering.h" |
(...skipping 13144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13155 } | 13155 } |
13156 new_env->ClearHistory(); | 13156 new_env->ClearHistory(); |
13157 return new_env; | 13157 return new_env; |
13158 } | 13158 } |
13159 | 13159 |
13160 void HEnvironment::MarkAsTailCaller() { | 13160 void HEnvironment::MarkAsTailCaller() { |
13161 DCHECK_EQ(JS_FUNCTION, frame_type()); | 13161 DCHECK_EQ(JS_FUNCTION, frame_type()); |
13162 frame_type_ = TAIL_CALLER_FUNCTION; | 13162 frame_type_ = TAIL_CALLER_FUNCTION; |
13163 } | 13163 } |
13164 | 13164 |
| 13165 void HEnvironment::ClearTailCallerMark() { |
| 13166 DCHECK_EQ(TAIL_CALLER_FUNCTION, frame_type()); |
| 13167 frame_type_ = JS_FUNCTION; |
| 13168 } |
| 13169 |
13165 HEnvironment* HEnvironment::CopyForInlining( | 13170 HEnvironment* HEnvironment::CopyForInlining( |
13166 Handle<JSFunction> target, int arguments, FunctionLiteral* function, | 13171 Handle<JSFunction> target, int arguments, FunctionLiteral* function, |
13167 HConstant* undefined, InliningKind inlining_kind, | 13172 HConstant* undefined, InliningKind inlining_kind, |
13168 TailCallMode syntactic_tail_call_mode) const { | 13173 TailCallMode syntactic_tail_call_mode) const { |
13169 DCHECK_EQ(JS_FUNCTION, frame_type()); | 13174 DCHECK_EQ(JS_FUNCTION, frame_type()); |
13170 | 13175 |
13171 // Outer environment is a copy of this one without the arguments. | 13176 // Outer environment is a copy of this one without the arguments. |
13172 int arity = function->scope()->num_parameters(); | 13177 int arity = function->scope()->num_parameters(); |
13173 | 13178 |
13174 HEnvironment* outer = Copy(); | 13179 HEnvironment* outer = Copy(); |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13565 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13570 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13566 } | 13571 } |
13567 | 13572 |
13568 #ifdef DEBUG | 13573 #ifdef DEBUG |
13569 graph_->Verify(false); // No full verify. | 13574 graph_->Verify(false); // No full verify. |
13570 #endif | 13575 #endif |
13571 } | 13576 } |
13572 | 13577 |
13573 } // namespace internal | 13578 } // namespace internal |
13574 } // namespace v8 | 13579 } // namespace v8 |
OLD | NEW |