Author: [EMAIL PROTECTED]
Date: Mon Nov 3 04:08:01 2008
New Revision: 678
Modified:
branches/bleeding_edge/src/objects-inl.h
branches/bleeding_edge/src/objects.h
branches/bleeding_edge/src/runtime.cc
Log:
Fix place where linter complains about lonely {
Fix place where ARM compiler loses track of whether variables were
initialized.
Review URL: http://codereview.chromium.org/9244
Modified: branches/bleeding_edge/src/objects-inl.h
==============================================================================
--- branches/bleeding_edge/src/objects-inl.h (original)
+++ branches/bleeding_edge/src/objects-inl.h Mon Nov 3 04:08:01 2008
@@ -185,31 +185,22 @@
StringShape::StringShape(String* str)
- : type_(str->map()->instance_type())
-#ifdef DEBUG
- , valid_(true)
-#endif // def DEBUG
- {
+ : type_(str->map()->instance_type()) {
+ set_valid();
ASSERT((type_ & kIsNotStringMask) == kStringTag);
}
StringShape::StringShape(Map* map)
- : type_(map->instance_type())
-#ifdef DEBUG
- , valid_(true)
-#endif // def DEBUG
- {
+ : type_(map->instance_type()) {
+ set_valid();
ASSERT((type_ & kIsNotStringMask) == kStringTag);
}
StringShape::StringShape(InstanceType t)
- : type_(static_cast<uint32_t>(t))
-#ifdef DEBUG
- , valid_(true)
-#endif // def DEBUG
- {
+ : type_(static_cast<uint32_t>(t)) {
+ set_valid();
ASSERT((type_ & kIsNotStringMask) == kStringTag);
}
Modified: branches/bleeding_edge/src/objects.h
==============================================================================
--- branches/bleeding_edge/src/objects.h (original)
+++ branches/bleeding_edge/src/objects.h Mon Nov 3 04:08:01 2008
@@ -3060,7 +3060,10 @@
private:
uint32_t type_;
#ifdef DEBUG
+ inline void set_valid() { valid_ = true; }
bool valid_;
+#else
+ inline void set_valid() { }
#endif
};
Modified: branches/bleeding_edge/src/runtime.cc
==============================================================================
--- branches/bleeding_edge/src/runtime.cc (original)
+++ branches/bleeding_edge/src/runtime.cc Mon Nov 3 04:08:01 2008
@@ -2258,7 +2258,8 @@
int length,
int* step) {
uint16_t character = source->Get(shape, i);
- int32_t hi, lo;
+ int32_t hi = 0;
+ int32_t lo = 0;
if (character == '%' &&
i <= length - 6 &&
source->Get(shape, i + 1) == 'u' &&
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---