| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "src/compiler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "src/ast/ast-numbering.h" | 9 #include "src/ast/ast-numbering.h" |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 switch (output_code_kind()) { | 197 switch (output_code_kind()) { |
| 198 case Code::STUB: | 198 case Code::STUB: |
| 199 case Code::BYTECODE_HANDLER: | 199 case Code::BYTECODE_HANDLER: |
| 200 case Code::HANDLER: | 200 case Code::HANDLER: |
| 201 case Code::BUILTIN: | 201 case Code::BUILTIN: |
| 202 #define CASE_KIND(kind) case Code::kind: | 202 #define CASE_KIND(kind) case Code::kind: |
| 203 IC_KIND_LIST(CASE_KIND) | 203 IC_KIND_LIST(CASE_KIND) |
| 204 #undef CASE_KIND | 204 #undef CASE_KIND |
| 205 return StackFrame::STUB; | 205 return StackFrame::STUB; |
| 206 case Code::WASM_FUNCTION: | 206 case Code::WASM_FUNCTION: |
| 207 return StackFrame::WASM; | 207 return StackFrame::WASM_COMPILED; |
| 208 case Code::JS_TO_WASM_FUNCTION: | 208 case Code::JS_TO_WASM_FUNCTION: |
| 209 return StackFrame::JS_TO_WASM; | 209 return StackFrame::JS_TO_WASM; |
| 210 case Code::WASM_TO_JS_FUNCTION: | 210 case Code::WASM_TO_JS_FUNCTION: |
| 211 return StackFrame::WASM_TO_JS; | 211 return StackFrame::WASM_TO_JS; |
| 212 case Code::WASM_TO_INTERPRETER: |
| 213 return StackFrame::WASM_INTERPRETED; |
| 212 default: | 214 default: |
| 213 UNIMPLEMENTED(); | 215 UNIMPLEMENTED(); |
| 214 return StackFrame::NONE; | 216 return StackFrame::NONE; |
| 215 } | 217 } |
| 216 } | 218 } |
| 217 | 219 |
| 218 int CompilationInfo::GetDeclareGlobalsFlags() const { | 220 int CompilationInfo::GetDeclareGlobalsFlags() const { |
| 219 DCHECK(DeclareGlobalsLanguageMode::is_valid(parse_info()->language_mode())); | 221 DCHECK(DeclareGlobalsLanguageMode::is_valid(parse_info()->language_mode())); |
| 220 return DeclareGlobalsEvalFlag::encode(parse_info()->is_eval()) | | 222 return DeclareGlobalsEvalFlag::encode(parse_info()->is_eval()) | |
| 221 DeclareGlobalsNativeFlag::encode(parse_info()->is_native()) | | 223 DeclareGlobalsNativeFlag::encode(parse_info()->is_native()) | |
| (...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1820 DCHECK(shared->is_compiled()); | 1822 DCHECK(shared->is_compiled()); |
| 1821 function->set_literals(cached.literals); | 1823 function->set_literals(cached.literals); |
| 1822 } else if (shared->is_compiled()) { | 1824 } else if (shared->is_compiled()) { |
| 1823 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. | 1825 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. |
| 1824 JSFunction::EnsureLiterals(function); | 1826 JSFunction::EnsureLiterals(function); |
| 1825 } | 1827 } |
| 1826 } | 1828 } |
| 1827 | 1829 |
| 1828 } // namespace internal | 1830 } // namespace internal |
| 1829 } // namespace v8 | 1831 } // namespace v8 |
| OLD | NEW |