Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: src/compiler.cc

Issue 1696043002: [runtime] Unify and simplify how frames are marked (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge problems Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 if (parse_info() && !parse_info()->shared_info().is_null()) { 299 if (parse_info() && !parse_info()->shared_info().is_null()) {
300 return parse_info()->shared_info()->DebugName()->ToCString(); 300 return parse_info()->shared_info()->DebugName()->ToCString();
301 } 301 }
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 {
310 switch (output_code_kind()) {
311 case Code::STUB:
312 case Code::HANDLER:
313 case Code::BUILTIN:
314 return StackFrame::STUB;
315 case Code::WASM_FUNCTION:
316 return StackFrame::WASM;
317 case Code::JS_TO_WASM_FUNCTION:
318 return StackFrame::JS_TO_WASM;
319 case Code::WASM_TO_JS_FUNCTION:
320 return StackFrame::WASM_TO_JS;
321 default:
322 UNIMPLEMENTED();
323 return StackFrame::NONE;
324 }
325 }
309 326
310 bool CompilationInfo::ExpectsJSReceiverAsReceiver() { 327 bool CompilationInfo::ExpectsJSReceiverAsReceiver() {
311 return is_sloppy(language_mode()) && !is_native(); 328 return is_sloppy(language_mode()) && !is_native();
312 } 329 }
313 330
314 331
315 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder { 332 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
316 public: 333 public:
317 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) 334 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
318 : HOptimizedGraphBuilder(info) { 335 : HOptimizedGraphBuilder(info) {
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 1961
1945 #if DEBUG 1962 #if DEBUG
1946 void CompilationInfo::PrintAstForTesting() { 1963 void CompilationInfo::PrintAstForTesting() {
1947 PrintF("--- Source from AST ---\n%s\n", 1964 PrintF("--- Source from AST ---\n%s\n",
1948 PrettyPrinter(isolate()).PrintProgram(literal())); 1965 PrettyPrinter(isolate()).PrintProgram(literal()));
1949 } 1966 }
1950 #endif 1967 #endif
1951 1968
1952 } // namespace internal 1969 } // namespace internal
1953 } // namespace v8 1970 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698