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

Side by Side Diff: src/compiler.h

Issue 724053004: Revert "Soft fail for invalid cache data." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/api.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/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 21 matching lines...) Expand all
32 32
33 class ScriptData { 33 class ScriptData {
34 public: 34 public:
35 ScriptData(const byte* data, int length); 35 ScriptData(const byte* data, int length);
36 ~ScriptData() { 36 ~ScriptData() {
37 if (owns_data_) DeleteArray(data_); 37 if (owns_data_) DeleteArray(data_);
38 } 38 }
39 39
40 const byte* data() const { return data_; } 40 const byte* data() const { return data_; }
41 int length() const { return length_; } 41 int length() const { return length_; }
42 bool rejected() const { return rejected_; }
43
44 void Reject() { rejected_ = true; }
45 42
46 void AcquireDataOwnership() { 43 void AcquireDataOwnership() {
47 DCHECK(!owns_data_); 44 DCHECK(!owns_data_);
48 owns_data_ = true; 45 owns_data_ = true;
49 } 46 }
50 47
51 void ReleaseDataOwnership() { 48 void ReleaseDataOwnership() {
52 DCHECK(owns_data_); 49 DCHECK(owns_data_);
53 owns_data_ = false; 50 owns_data_ = false;
54 } 51 }
55 52
56 private: 53 private:
57 bool owns_data_ : 1; 54 bool owns_data_;
58 bool rejected_ : 1;
59 const byte* data_; 55 const byte* data_;
60 int length_; 56 int length_;
61 57
62 DISALLOW_COPY_AND_ASSIGN(ScriptData); 58 DISALLOW_COPY_AND_ASSIGN(ScriptData);
63 }; 59 };
64 60
65 // CompilationInfo encapsulates some information known at compile time. It 61 // CompilationInfo encapsulates some information known at compile time. It
66 // is constructed based on the resources available at compile-time. 62 // is constructed based on the resources available at compile-time.
67 class CompilationInfo { 63 class CompilationInfo {
68 public: 64 public:
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 Zone zone_; 748 Zone zone_;
753 unsigned info_zone_start_allocation_size_; 749 unsigned info_zone_start_allocation_size_;
754 base::ElapsedTimer timer_; 750 base::ElapsedTimer timer_;
755 751
756 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 752 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
757 }; 753 };
758 754
759 } } // namespace v8::internal 755 } } // namespace v8::internal
760 756
761 #endif // V8_COMPILER_H_ 757 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698