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

Unified Diff: runtime/vm/compiler.cc

Issue 1037333002: volatile -> const, where possible (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 44732)
+++ runtime/vm/compiler.cc (working copy)
@@ -178,7 +178,7 @@
RawError* Compiler::Compile(const Library& library, const Script& script) {
- Isolate* volatile isolate = Isolate::Current();
+ Isolate* const isolate = Isolate::Current();
StackZone zone(isolate);
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
@@ -279,7 +279,7 @@
}
}
- Isolate* volatile isolate = Isolate::Current();
+ Isolate* const isolate = Isolate::Current();
// We remember all the classes that are being compiled in these lists. This
// also allows us to reset the marked_for_parsing state in case we see an
// error.
@@ -374,9 +374,9 @@
}
TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer);
bool is_compiled = false;
- Thread* volatile thread = Thread::Current();
- Zone* volatile zone = thread->zone();
- Isolate* volatile isolate = thread->isolate();
+ Thread* const thread = Thread::Current();
+ Zone* const zone = thread->zone();
+ Isolate* const isolate = thread->isolate();
HANDLESCOPE(isolate);
// We may reattempt compilation if the function needs to be assembled using
@@ -964,10 +964,10 @@
const Function& function,
bool optimized,
intptr_t osr_id) {
- Thread* volatile thread = Thread::Current();
- Isolate* volatile isolate = thread->isolate();
+ Thread* const thread = Thread::Current();
+ Isolate* const isolate = thread->isolate();
StackZone stack_zone(isolate);
- Zone* volatile zone = stack_zone.GetZone();
+ Zone* const zone = stack_zone.GetZone();
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
TIMERSCOPE(isolate, time_compilation);
@@ -1065,7 +1065,7 @@
// This is only used from unit tests.
RawError* Compiler::CompileParsedFunction(
ParsedFunction* parsed_function) {
- Isolate* volatile isolate = Isolate::Current();
+ Isolate* const isolate = Isolate::Current();
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
// Non-optimized code generator.
@@ -1142,7 +1142,7 @@
// The VM sets the field's value to transiton_sentinel prior to
// evaluating the initializer value.
ASSERT(field.value() == Object::transition_sentinel().raw());
- Isolate* volatile isolate = Isolate::Current();
+ Isolate* const isolate = Isolate::Current();
StackZone zone(isolate);
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
@@ -1175,8 +1175,8 @@
RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
- Thread* volatile thread = Thread::Current();
- Isolate* volatile isolate = thread->isolate();
+ Thread* const thread = Thread::Current();
+ Isolate* const isolate = thread->isolate();
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
if (FLAG_trace_compiler) {
« no previous file with comments | « no previous file | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698