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

Side by Side Diff: src/compiler.h

Issue 490173002: Take ast node id counting away from Isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/ast.cc ('k') | src/compiler.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_COMPILER_H_ 5 #ifndef V8_COMPILER_H_
6 #define V8_COMPILER_H_ 6 #define V8_COMPILER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 int optimization_id() const { return optimization_id_; } 359 int optimization_id() const { return optimization_id_; }
360 360
361 AstValueFactory* ast_value_factory() const { return ast_value_factory_; } 361 AstValueFactory* ast_value_factory() const { return ast_value_factory_; }
362 void SetAstValueFactory(AstValueFactory* ast_value_factory, 362 void SetAstValueFactory(AstValueFactory* ast_value_factory,
363 bool owned = true) { 363 bool owned = true) {
364 ast_value_factory_ = ast_value_factory; 364 ast_value_factory_ = ast_value_factory;
365 ast_value_factory_owned_ = owned; 365 ast_value_factory_owned_ = owned;
366 } 366 }
367 367
368 AstNode::IdGen* ast_node_id_gen() { return &ast_node_id_gen_; }
369
368 protected: 370 protected:
369 CompilationInfo(Handle<Script> script, 371 CompilationInfo(Handle<Script> script,
370 Zone* zone); 372 Zone* zone);
371 CompilationInfo(Handle<SharedFunctionInfo> shared_info, 373 CompilationInfo(Handle<SharedFunctionInfo> shared_info,
372 Zone* zone); 374 Zone* zone);
373 CompilationInfo(HydrogenCodeStub* stub, 375 CompilationInfo(HydrogenCodeStub* stub,
374 Isolate* isolate, 376 Isolate* isolate,
375 Zone* zone); 377 Zone* zone);
376 378
377 private: 379 private:
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 int parameter_count_; 506 int parameter_count_;
505 507
506 bool this_has_uses_; 508 bool this_has_uses_;
507 509
508 Handle<Foreign> object_wrapper_; 510 Handle<Foreign> object_wrapper_;
509 511
510 int optimization_id_; 512 int optimization_id_;
511 513
512 AstValueFactory* ast_value_factory_; 514 AstValueFactory* ast_value_factory_;
513 bool ast_value_factory_owned_; 515 bool ast_value_factory_owned_;
516 AstNode::IdGen ast_node_id_gen_;
514 517
515 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); 518 DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
516 }; 519 };
517 520
518 521
519 // Exactly like a CompilationInfo, except also creates and enters a 522 // Exactly like a CompilationInfo, except also creates and enters a
520 // Zone on construction and deallocates it on exit. 523 // Zone on construction and deallocates it on exit.
521 class CompilationInfoWithZone: public CompilationInfo { 524 class CompilationInfoWithZone: public CompilationInfo {
522 public: 525 public:
523 explicit CompilationInfoWithZone(Handle<Script> script) 526 explicit CompilationInfoWithZone(Handle<Script> script)
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 Zone zone_; 739 Zone zone_;
737 unsigned info_zone_start_allocation_size_; 740 unsigned info_zone_start_allocation_size_;
738 base::ElapsedTimer timer_; 741 base::ElapsedTimer timer_;
739 742
740 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 743 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
741 }; 744 };
742 745
743 } } // namespace v8::internal 746 } } // namespace v8::internal
744 747
745 #endif // V8_COMPILER_H_ 748 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698