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

Side by Side Diff: src/compiler.cc

Issue 2537313005: [debug] Revert debug API removal (Closed)
Patch Set: Created 4 years 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 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode"); 955 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode");
956 PostponeInterruptsScope postpone(isolate); 956 PostponeInterruptsScope postpone(isolate);
957 DCHECK(!isolate->native_context().is_null()); 957 DCHECK(!isolate->native_context().is_null());
958 ParseInfo* parse_info = info->parse_info(); 958 ParseInfo* parse_info = info->parse_info();
959 Handle<Script> script = parse_info->script(); 959 Handle<Script> script = parse_info->script();
960 960
961 // TODO(svenpanne) Obscure place for this, perhaps move to OnBeforeCompile? 961 // TODO(svenpanne) Obscure place for this, perhaps move to OnBeforeCompile?
962 FixedArray* array = isolate->native_context()->embedder_data(); 962 FixedArray* array = isolate->native_context()->embedder_data();
963 script->set_context_data(array->get(v8::Context::kDebugIdIndex)); 963 script->set_context_data(array->get(v8::Context::kDebugIdIndex));
964 964
965 isolate->debug()->OnBeforeCompile(script);
966
965 Handle<SharedFunctionInfo> result; 967 Handle<SharedFunctionInfo> result;
966 968
967 { VMState<COMPILER> state(info->isolate()); 969 { VMState<COMPILER> state(info->isolate());
968 if (parse_info->literal() == nullptr && 970 if (parse_info->literal() == nullptr &&
969 !parsing::ParseProgram(parse_info)) { 971 !parsing::ParseProgram(parse_info)) {
970 return Handle<SharedFunctionInfo>::null(); 972 return Handle<SharedFunctionInfo>::null();
971 } 973 }
972 974
973 FunctionLiteral* lit = parse_info->literal(); 975 FunctionLiteral* lit = parse_info->literal();
974 976
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 DCHECK(shared->is_compiled()); 1723 DCHECK(shared->is_compiled());
1722 function->set_literals(cached.literals); 1724 function->set_literals(cached.literals);
1723 } else if (shared->is_compiled()) { 1725 } else if (shared->is_compiled()) {
1724 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1726 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1725 JSFunction::EnsureLiterals(function); 1727 JSFunction::EnsureLiterals(function);
1726 } 1728 }
1727 } 1729 }
1728 1730
1729 } // namespace internal 1731 } // namespace internal
1730 } // namespace v8 1732 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698