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

Side by Side Diff: src/compiler.h

Issue 1026513004: Remove dangerous constructor from CompilationInfoWithZone. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 years, 9 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/code-stubs-hydrogen.cc ('k') | test/cctest/compiler/test-instruction.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/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); 483 DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
484 }; 484 };
485 485
486 486
487 // Exactly like a CompilationInfo, except also creates and enters a 487 // Exactly like a CompilationInfo, except also creates and enters a
488 // Zone on construction and deallocates it on exit. 488 // Zone on construction and deallocates it on exit.
489 class CompilationInfoWithZone: public CompilationInfo { 489 class CompilationInfoWithZone: public CompilationInfo {
490 public: 490 public:
491 explicit CompilationInfoWithZone(Handle<Script> script); 491 explicit CompilationInfoWithZone(Handle<Script> script);
492 explicit CompilationInfoWithZone(Handle<JSFunction> closure); 492 explicit CompilationInfoWithZone(Handle<JSFunction> closure);
493 CompilationInfoWithZone(CodeStub* stub, Isolate* isolate)
494 : CompilationInfo(stub, isolate, &zone_) {}
495 493
496 // Virtual destructor because a CompilationInfoWithZone has to exit the 494 // Virtual destructor because a CompilationInfoWithZone has to exit the
497 // zone scope and get rid of dependent maps even when the destructor is 495 // zone scope and get rid of dependent maps even when the destructor is
498 // called when cast as a CompilationInfo. 496 // called when cast as a CompilationInfo.
499 virtual ~CompilationInfoWithZone(); 497 virtual ~CompilationInfoWithZone();
500 498
501 private: 499 private:
502 Zone zone_; 500 Zone zone_;
503 }; 501 };
504 502
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 Zone zone_; 699 Zone zone_;
702 size_t info_zone_start_allocation_size_; 700 size_t info_zone_start_allocation_size_;
703 base::ElapsedTimer timer_; 701 base::ElapsedTimer timer_;
704 702
705 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 703 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
706 }; 704 };
707 705
708 } } // namespace v8::internal 706 } } // namespace v8::internal
709 707
710 #endif // V8_COMPILER_H_ 708 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698