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

Side by Side Diff: src/crankshaft/hydrogen.h

Issue 1977473002: [compiler] Move list of inlined functions to Crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-sidechannel-3
Patch Set: Fix tha leeeek. Created 4 years, 7 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 | « src/compiler.h ('k') | src/crankshaft/hydrogen.cc » ('j') | 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 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_
6 #define V8_CRANKSHAFT_HYDROGEN_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_H_
7 7
8 #include "src/accessors.h" 8 #include "src/accessors.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 private: 310 private:
311 void AddBlock(HBasicBlock* block); 311 void AddBlock(HBasicBlock* block);
312 312
313 ZoneList<HBasicBlock*> back_edges_; 313 ZoneList<HBasicBlock*> back_edges_;
314 HBasicBlock* loop_header_; 314 HBasicBlock* loop_header_;
315 ZoneList<HBasicBlock*> blocks_; 315 ZoneList<HBasicBlock*> blocks_;
316 HStackCheck* stack_check_; 316 HStackCheck* stack_check_;
317 }; 317 };
318 318
319 struct HInlinedFunctionInfo {
320 explicit HInlinedFunctionInfo(int start_position)
321 : start_position(start_position) {}
322 int start_position;
323 };
319 324
320 class HGraph final : public ZoneObject { 325 class HGraph final : public ZoneObject {
321 public: 326 public:
322 explicit HGraph(CompilationInfo* info, CallInterfaceDescriptor descriptor); 327 explicit HGraph(CompilationInfo* info, CallInterfaceDescriptor descriptor);
323 328
324 Isolate* isolate() const { return isolate_; } 329 Isolate* isolate() const { return isolate_; }
325 Zone* zone() const { return zone_; } 330 Zone* zone() const { return zone_; }
326 CompilationInfo* info() const { return info_; } 331 CompilationInfo* info() const { return info_; }
327 CallInterfaceDescriptor descriptor() const { return descriptor_; } 332 CallInterfaceDescriptor descriptor() const { return descriptor_; }
328 333
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 // If we are tracking source positions then this function assigns a unique 463 // If we are tracking source positions then this function assigns a unique
459 // identifier to each inlining and dumps function source if it was inlined 464 // identifier to each inlining and dumps function source if it was inlined
460 // for the first time during the current optimization. 465 // for the first time during the current optimization.
461 int TraceInlinedFunction(Handle<SharedFunctionInfo> shared, 466 int TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
462 SourcePosition position); 467 SourcePosition position);
463 468
464 // Converts given SourcePosition to the absolute offset from the start of 469 // Converts given SourcePosition to the absolute offset from the start of
465 // the corresponding script. 470 // the corresponding script.
466 int SourcePositionToScriptPosition(SourcePosition position); 471 int SourcePositionToScriptPosition(SourcePosition position);
467 472
473 ZoneVector<HInlinedFunctionInfo>& inlined_function_infos() {
474 return inlined_function_infos_;
475 }
476
468 private: 477 private:
469 HConstant* ReinsertConstantIfNecessary(HConstant* constant); 478 HConstant* ReinsertConstantIfNecessary(HConstant* constant);
470 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, 479 HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
471 int32_t integer_value); 480 int32_t integer_value);
472 481
473 template<class Phase> 482 template<class Phase>
474 void Run() { 483 void Run() {
475 Phase phase(this); 484 Phase phase(this);
476 phase.Run(); 485 phase.Run();
477 } 486 }
(...skipping 24 matching lines...) Expand all
502 Zone* zone_; 511 Zone* zone_;
503 512
504 bool allow_code_motion_; 513 bool allow_code_motion_;
505 bool use_optimistic_licm_; 514 bool use_optimistic_licm_;
506 bool depends_on_empty_array_proto_elements_; 515 bool depends_on_empty_array_proto_elements_;
507 int type_change_checksum_; 516 int type_change_checksum_;
508 int maximum_environment_size_; 517 int maximum_environment_size_;
509 int no_side_effects_scope_count_; 518 int no_side_effects_scope_count_;
510 bool disallow_adding_new_values_; 519 bool disallow_adding_new_values_;
511 520
521 ZoneVector<HInlinedFunctionInfo> inlined_function_infos_;
522
512 DISALLOW_COPY_AND_ASSIGN(HGraph); 523 DISALLOW_COPY_AND_ASSIGN(HGraph);
513 }; 524 };
514 525
515 526
516 Zone* HBasicBlock::zone() const { return graph_->zone(); } 527 Zone* HBasicBlock::zone() const { return graph_->zone(); }
517 528
518 529
519 // Type of stack frame an environment might refer to. 530 // Type of stack frame an environment might refer to.
520 enum FrameType { 531 enum FrameType {
521 JS_FUNCTION, 532 JS_FUNCTION,
(...skipping 2580 matching lines...) Expand 10 before | Expand all | Expand 10 after
3102 } 3113 }
3103 3114
3104 private: 3115 private:
3105 HOptimizedGraphBuilder* builder_; 3116 HOptimizedGraphBuilder* builder_;
3106 }; 3117 };
3107 3118
3108 } // namespace internal 3119 } // namespace internal
3109 } // namespace v8 3120 } // namespace v8
3110 3121
3111 #endif // V8_CRANKSHAFT_HYDROGEN_H_ 3122 #endif // V8_CRANKSHAFT_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698