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

Side by Side Diff: src/assert-scope.h

Issue 394793002: Verify that source string matches serialized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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') | test/cctest/test-serialize.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ASSERT_SCOPE_H_ 5 #ifndef V8_ASSERT_SCOPE_H_
6 #define V8_ASSERT_SCOPE_H_ 6 #define V8_ASSERT_SCOPE_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/utils.h" 10 #include "src/utils.h"
(...skipping 10 matching lines...) Expand all
21 DEFERRED_HANDLE_DEREFERENCE_ASSERT, 21 DEFERRED_HANDLE_DEREFERENCE_ASSERT,
22 CODE_DEPENDENCY_CHANGE_ASSERT, 22 CODE_DEPENDENCY_CHANGE_ASSERT,
23 LAST_PER_THREAD_ASSERT_TYPE 23 LAST_PER_THREAD_ASSERT_TYPE
24 }; 24 };
25 25
26 26
27 enum PerIsolateAssertType { 27 enum PerIsolateAssertType {
28 JAVASCRIPT_EXECUTION_ASSERT, 28 JAVASCRIPT_EXECUTION_ASSERT,
29 JAVASCRIPT_EXECUTION_THROWS, 29 JAVASCRIPT_EXECUTION_THROWS,
30 ALLOCATION_FAILURE_ASSERT, 30 ALLOCATION_FAILURE_ASSERT,
31 DEOPTIMIZATION_ASSERT 31 DEOPTIMIZATION_ASSERT,
32 COMPILATION_ASSERT
32 }; 33 };
33 34
34 35
35 class PerThreadAssertData { 36 class PerThreadAssertData {
36 public: 37 public:
37 PerThreadAssertData() : nesting_level_(0) { 38 PerThreadAssertData() : nesting_level_(0) {
38 for (int i = 0; i < LAST_PER_THREAD_ASSERT_TYPE; i++) { 39 for (int i = 0; i < LAST_PER_THREAD_ASSERT_TYPE; i++) {
39 assert_states_[i] = true; 40 assert_states_[i] = true;
40 } 41 }
41 } 42 }
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 AllowAllocationFailure; 248 AllowAllocationFailure;
248 249
249 // Scope to document where we do not expect deoptimization. 250 // Scope to document where we do not expect deoptimization.
250 typedef PerIsolateAssertScopeDebugOnly<DEOPTIMIZATION_ASSERT, false> 251 typedef PerIsolateAssertScopeDebugOnly<DEOPTIMIZATION_ASSERT, false>
251 DisallowDeoptimization; 252 DisallowDeoptimization;
252 253
253 // Scope to introduce an exception to DisallowDeoptimization. 254 // Scope to introduce an exception to DisallowDeoptimization.
254 typedef PerIsolateAssertScopeDebugOnly<DEOPTIMIZATION_ASSERT, true> 255 typedef PerIsolateAssertScopeDebugOnly<DEOPTIMIZATION_ASSERT, true>
255 AllowDeoptimization; 256 AllowDeoptimization;
256 257
258 // Scope to document where we do not expect deoptimization.
259 typedef PerIsolateAssertScopeDebugOnly<COMPILATION_ASSERT, false>
260 DisallowCompilation;
261
262 // Scope to introduce an exception to DisallowDeoptimization.
263 typedef PerIsolateAssertScopeDebugOnly<COMPILATION_ASSERT, true>
264 AllowCompilation;
257 } } // namespace v8::internal 265 } } // namespace v8::internal
258 266
259 #endif // V8_ASSERT_SCOPE_H_ 267 #endif // V8_ASSERT_SCOPE_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | test/cctest/test-serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698