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

Unified Diff: runtime/vm/scopes.h

Issue 9447102: Implement x64 compilation for loading and storing local variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Bugfix and rebase to HEAD. Created 8 years, 10 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
Index: runtime/vm/scopes.h
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index 5a09dec713289e16a970445d23a74da92a88bc2b..11e3e11b48a5e47a8b9dab4d83042c7afc29739d 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -28,7 +28,7 @@ class LocalVariable : public ZoneAllocated {
is_final_(false),
is_captured_(false),
is_invisible_(false),
- index_(LocalVariable::kUnitializedIndex_) {
+ index_(LocalVariable::kUnitializedIndex) {
ASSERT(type.IsZoneHandle());
ASSERT(type.IsFinalized());
}
@@ -50,15 +50,15 @@ class LocalVariable : public ZoneAllocated {
void set_is_captured() { is_captured_ = true; }
bool HasIndex() const {
- return index_ != kUnitializedIndex_;
+ return index_ != kUnitializedIndex;
}
int index() const {
ASSERT(HasIndex());
return index_;
}
void set_index(int index) {
- ASSERT(!HasIndex());
- ASSERT(index != kUnitializedIndex_);
+ ASSERT(!HasIndex() || (index_ == index));
srdjan 2012/02/27 23:23:53 Add a comment why it can happen that the same inde
Kevin Millikin (Google) 2012/02/28 09:13:12 Good idea, done.
+ ASSERT(index != kUnitializedIndex);
index_ = index;
}
@@ -69,7 +69,7 @@ class LocalVariable : public ZoneAllocated {
bool Equals(const LocalVariable& other) const;
private:
- static const int kUnitializedIndex_ = INT_MIN;
+ static const int kUnitializedIndex = INT_MIN;
const intptr_t token_index_;
const String& name_;
@@ -169,7 +169,7 @@ class LocalScope : public ZoneAllocated {
// The context level is only set in a scope that is either the owner scope of
// a captured variable or that is the owner scope of a context.
bool HasContextLevel() const {
- return context_level_ != kUnitializedContextLevel_;
+ return context_level_ != kUnitializedContextLevel;
}
int context_level() const {
ASSERT(HasContextLevel());
@@ -177,7 +177,7 @@ class LocalScope : public ZoneAllocated {
}
void set_context_level(int context_level) {
ASSERT(!HasContextLevel());
- ASSERT(context_level != kUnitializedContextLevel_);
+ ASSERT(context_level != kUnitializedContextLevel);
context_level_ = context_level;
}
@@ -283,7 +283,7 @@ class LocalScope : public ZoneAllocated {
void CollectLocalVariables(GrowableArray<LocalVariable*>* vars);
- static const int kUnitializedContextLevel_ = INT_MIN;
+ static const int kUnitializedContextLevel = INT_MIN;
LocalScope* parent_;
LocalScope* child_;
LocalScope* sibling_;

Powered by Google App Engine
This is Rietveld 408576698