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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 const char* str = debug_name_ ? debug_name_ : "unknown"; | 302 const char* str = debug_name_ ? debug_name_ : "unknown"; |
303 size_t len = strlen(str) + 1; | 303 size_t len = strlen(str) + 1; |
304 base::SmartArrayPointer<char> name(new char[len]); | 304 base::SmartArrayPointer<char> name(new char[len]); |
305 memcpy(name.get(), str, len); | 305 memcpy(name.get(), str, len); |
306 return name; | 306 return name; |
307 } | 307 } |
308 | 308 |
309 StackFrame::Type CompilationInfo::GetOutputStackFrameType() const { | 309 StackFrame::Type CompilationInfo::GetOutputStackFrameType() const { |
310 switch (output_code_kind()) { | 310 switch (output_code_kind()) { |
311 case Code::STUB: | 311 case Code::STUB: |
| 312 case Code::BYTECODE_HANDLER: |
312 case Code::HANDLER: | 313 case Code::HANDLER: |
313 case Code::BUILTIN: | 314 case Code::BUILTIN: |
314 return StackFrame::STUB; | 315 return StackFrame::STUB; |
315 case Code::WASM_FUNCTION: | 316 case Code::WASM_FUNCTION: |
316 return StackFrame::WASM; | 317 return StackFrame::WASM; |
317 case Code::JS_TO_WASM_FUNCTION: | 318 case Code::JS_TO_WASM_FUNCTION: |
318 return StackFrame::JS_TO_WASM; | 319 return StackFrame::JS_TO_WASM; |
319 case Code::WASM_TO_JS_FUNCTION: | 320 case Code::WASM_TO_JS_FUNCTION: |
320 return StackFrame::WASM_TO_JS; | 321 return StackFrame::WASM_TO_JS; |
321 default: | 322 default: |
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 | 1958 |
1958 #if DEBUG | 1959 #if DEBUG |
1959 void CompilationInfo::PrintAstForTesting() { | 1960 void CompilationInfo::PrintAstForTesting() { |
1960 PrintF("--- Source from AST ---\n%s\n", | 1961 PrintF("--- Source from AST ---\n%s\n", |
1961 PrettyPrinter(isolate()).PrintProgram(literal())); | 1962 PrettyPrinter(isolate()).PrintProgram(literal())); |
1962 } | 1963 } |
1963 #endif | 1964 #endif |
1964 | 1965 |
1965 } // namespace internal | 1966 } // namespace internal |
1966 } // namespace v8 | 1967 } // namespace v8 |
OLD | NEW |