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

Side by Side Diff: src/compilation-info.h

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month 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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #ifndef V8_COMPILATION_INFO_H_ 5 #ifndef V8_COMPILATION_INFO_H_
6 #define V8_COMPILATION_INFO_H_ 6 #define V8_COMPILATION_INFO_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/compilation-dependencies.h" 10 #include "src/compilation-dependencies.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 bool has_simple_parameters(); 276 bool has_simple_parameters();
277 277
278 struct InlinedFunctionHolder { 278 struct InlinedFunctionHolder {
279 Handle<SharedFunctionInfo> shared_info; 279 Handle<SharedFunctionInfo> shared_info;
280 280
281 // Root that holds the unoptimized code of the inlined function alive 281 // Root that holds the unoptimized code of the inlined function alive
282 // (and out of reach of code flushing) until we finish compilation. 282 // (and out of reach of code flushing) until we finish compilation.
283 // Do not remove. 283 // Do not remove.
284 Handle<Code> inlined_code_object_root; 284 Handle<Code> inlined_code_object_root;
285 285
286 InliningPosition position;
287
286 InlinedFunctionHolder(Handle<SharedFunctionInfo> inlined_shared_info, 288 InlinedFunctionHolder(Handle<SharedFunctionInfo> inlined_shared_info,
287 Handle<Code> inlined_code_object_root) 289 Handle<Code> inlined_code_object_root,
290 SourcePosition pos)
288 : shared_info(inlined_shared_info), 291 : shared_info(inlined_shared_info),
289 inlined_code_object_root(inlined_code_object_root) {} 292 inlined_code_object_root(inlined_code_object_root) {
293 position.position = pos;
294 // initialized when generating the deoptimization literals
295 position.inlined_function_id = -1;
296 }
297
298 void RegisterInlinedFunctionId(size_t inlined_function_id) {
299 position.inlined_function_id = static_cast<int>(inlined_function_id);
300 }
290 }; 301 };
291 302
292 typedef std::vector<InlinedFunctionHolder> InlinedFunctionList; 303 typedef std::vector<InlinedFunctionHolder> InlinedFunctionList;
293 InlinedFunctionList const& inlined_functions() const { 304 InlinedFunctionList& inlined_functions() { return inlined_functions_; }
294 return inlined_functions_;
295 }
296 305
297 void AddInlinedFunction(Handle<SharedFunctionInfo> inlined_function); 306 // Returns the inlining id for source position tracking.
307 int AddInlinedFunction(Handle<SharedFunctionInfo> inlined_function,
308 SourcePosition pos);
298 309
299 std::unique_ptr<char[]> GetDebugName() const; 310 std::unique_ptr<char[]> GetDebugName() const;
300 311
301 Code::Kind output_code_kind() const; 312 Code::Kind output_code_kind() const;
302 313
303 StackFrame::Type GetOutputStackFrameType() const; 314 StackFrame::Type GetOutputStackFrameType() const;
304 315
305 int GetDeclareGlobalsFlags() const; 316 int GetDeclareGlobalsFlags() const;
306 317
307 SourcePositionTableBuilder::RecordingMode SourcePositionRecordingMode() const; 318 SourcePositionTableBuilder::RecordingMode SourcePositionRecordingMode() const;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 387
377 Vector<const char> debug_name_; 388 Vector<const char> debug_name_;
378 389
379 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); 390 DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
380 }; 391 };
381 392
382 } // namespace internal 393 } // namespace internal
383 } // namespace v8 394 } // namespace v8
384 395
385 #endif // V8_COMPILATION_INFO_H_ 396 #endif // V8_COMPILATION_INFO_H_
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/compilation-info.cc » ('j') | src/crankshaft/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698