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

Side by Side Diff: src/compiler.h

Issue 17826004: Get rid of the ZoneScopeMode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « no previous file | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 }; 434 };
435 435
436 436
437 // Exactly like a CompilationInfo, except also creates and enters a 437 // Exactly like a CompilationInfo, except also creates and enters a
438 // Zone on construction and deallocates it on exit. 438 // Zone on construction and deallocates it on exit.
439 class CompilationInfoWithZone: public CompilationInfo { 439 class CompilationInfoWithZone: public CompilationInfo {
440 public: 440 public:
441 explicit CompilationInfoWithZone(Handle<Script> script) 441 explicit CompilationInfoWithZone(Handle<Script> script)
442 : CompilationInfo(script, &zone_, &phase_zone_), 442 : CompilationInfo(script, &zone_, &phase_zone_),
443 zone_(script->GetIsolate()), 443 zone_(script->GetIsolate()),
444 zone_scope_(&zone_, DELETE_ON_EXIT), 444 zone_scope_(&zone_),
445 phase_zone_(script->GetIsolate()) {} 445 phase_zone_(script->GetIsolate()) {}
446 explicit CompilationInfoWithZone(Handle<SharedFunctionInfo> shared_info) 446 explicit CompilationInfoWithZone(Handle<SharedFunctionInfo> shared_info)
447 : CompilationInfo(shared_info, &zone_, &phase_zone_), 447 : CompilationInfo(shared_info, &zone_, &phase_zone_),
448 zone_(shared_info->GetIsolate()), 448 zone_(shared_info->GetIsolate()),
449 zone_scope_(&zone_, DELETE_ON_EXIT), 449 zone_scope_(&zone_),
450 phase_zone_(shared_info->GetIsolate()) {} 450 phase_zone_(shared_info->GetIsolate()) {}
451 explicit CompilationInfoWithZone(Handle<JSFunction> closure) 451 explicit CompilationInfoWithZone(Handle<JSFunction> closure)
452 : CompilationInfo(closure, &zone_, &phase_zone_), 452 : CompilationInfo(closure, &zone_, &phase_zone_),
453 zone_(closure->GetIsolate()), 453 zone_(closure->GetIsolate()),
454 zone_scope_(&zone_, DELETE_ON_EXIT), 454 zone_scope_(&zone_),
455 phase_zone_(closure->GetIsolate()) {} 455 phase_zone_(closure->GetIsolate()) {}
456 CompilationInfoWithZone(HydrogenCodeStub* stub, Isolate* isolate) 456 CompilationInfoWithZone(HydrogenCodeStub* stub, Isolate* isolate)
457 : CompilationInfo(stub, isolate, &zone_, &phase_zone_), 457 : CompilationInfo(stub, isolate, &zone_, &phase_zone_),
458 zone_(isolate), 458 zone_(isolate),
459 zone_scope_(&zone_, DELETE_ON_EXIT), 459 zone_scope_(&zone_),
460 phase_zone_(isolate) {} 460 phase_zone_(isolate) {}
461 461
462 // Virtual destructor because a CompilationInfoWithZone has to exit the 462 // Virtual destructor because a CompilationInfoWithZone has to exit the
463 // zone scope and get rid of dependent maps even when the destructor is 463 // zone scope and get rid of dependent maps even when the destructor is
464 // called when cast as a CompilationInfo. 464 // called when cast as a CompilationInfo.
465 virtual ~CompilationInfoWithZone() { 465 virtual ~CompilationInfoWithZone() {
466 RollbackDependentMaps(); 466 RollbackDependentMaps();
467 } 467 }
468 468
469 private: 469 private:
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 unsigned start_allocation_size_; 652 unsigned start_allocation_size_;
653 int64_t start_ticks_; 653 int64_t start_ticks_;
654 654
655 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 655 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
656 }; 656 };
657 657
658 658
659 } } // namespace v8::internal 659 } } // namespace v8::internal
660 660
661 #endif // V8_COMPILER_H_ 661 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698