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

Side by Side Diff: src/parsing/parser.cc

Issue 2348373004: Internalize the ast-value-factory before tracing in trace-parse. Otherwise the string-handle isn't … (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/ast/ast-expression-rewriter.h" 10 #include "src/ast/ast-expression-rewriter.h"
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 result = 877 result =
878 DoParseLazy(info, ast_value_factory()->GetString(name), stream.get()); 878 DoParseLazy(info, ast_value_factory()->GetString(name), stream.get());
879 if (result != nullptr) { 879 if (result != nullptr) {
880 Handle<String> inferred_name(shared_info->inferred_name()); 880 Handle<String> inferred_name(shared_info->inferred_name());
881 result->set_inferred_name(inferred_name); 881 result->set_inferred_name(inferred_name);
882 } 882 }
883 } 883 }
884 884
885 if (FLAG_trace_parse && result != NULL) { 885 if (FLAG_trace_parse && result != NULL) {
886 double ms = timer.Elapsed().InMillisecondsF(); 886 double ms = timer.Elapsed().InMillisecondsF();
887 // We need to make sure that the debug-name is available.
888 ast_value_factory()->Internalize(isolate);
887 std::unique_ptr<char[]> name_chars = result->debug_name()->ToCString(); 889 std::unique_ptr<char[]> name_chars = result->debug_name()->ToCString();
888 PrintF("[parsing function: %s - took %0.3f ms]\n", name_chars.get(), ms); 890 PrintF("[parsing function: %s - took %0.3f ms]\n", name_chars.get(), ms);
889 } 891 }
890 return result; 892 return result;
891 } 893 }
892 894
893 static FunctionLiteral::FunctionType ComputeFunctionType(ParseInfo* info) { 895 static FunctionLiteral::FunctionType ComputeFunctionType(ParseInfo* info) {
894 if (info->is_declaration()) { 896 if (info->is_declaration()) {
895 return FunctionLiteral::kDeclaration; 897 return FunctionLiteral::kDeclaration;
896 } else if (info->is_named_expression()) { 898 } else if (info->is_named_expression()) {
(...skipping 4936 matching lines...) Expand 10 before | Expand all | Expand 10 after
5833 node->Print(Isolate::Current()); 5835 node->Print(Isolate::Current());
5834 } 5836 }
5835 #endif // DEBUG 5837 #endif // DEBUG
5836 5838
5837 #undef CHECK_OK 5839 #undef CHECK_OK
5838 #undef CHECK_OK_VOID 5840 #undef CHECK_OK_VOID
5839 #undef CHECK_FAILED 5841 #undef CHECK_FAILED
5840 5842
5841 } // namespace internal 5843 } // namespace internal
5842 } // namespace v8 5844 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698