Permalink
Browse files

all: fix left linting issues

* test: add lint to tests
  • Loading branch information...
1 parent b790b61 commit acd8be35a5b802de38f786af46c1ef72444f9f60 @indutny committed Nov 18, 2012
Showing with 11 additions and 52 deletions.
  1. +1 −0 Makefile
  2. +0 −1 src/code-space.h
  3. +0 −1 src/cpu.cc
  4. +0 −1 src/fullgen-instructions.cc
  5. +0 −1 src/fullgen-instructions.h
  6. +1 −1 src/heap.cc
  7. +7 −1 src/heap.h
  8. +1 −1 src/ia32/macroassembler-ia32.cc
  9. +0 −44 src/utils.h
  10. +1 −1 src/x64/macroassembler-x64.cc
View
@@ -20,6 +20,7 @@ test-runner: build
ln -sf out/$(BUILDTYPE)/test test-runner
test: test-runner can
+ @./tools/presubmit.py
@./test-runner splaytree
@./test-runner list
@./test-runner parser
View
@@ -127,7 +127,6 @@ class CodeChunk {
friend class CodeSpace;
};
-
} // internal
} // candor
View
@@ -58,6 +58,5 @@ void CPU::Probe() {
cpu_features_.SSE4_1 = (features & (1 << 19)) != 0;
probed_ = true;
}
-
} // internal
} // candor
@@ -85,6 +85,5 @@ void FIf::Print(PrintBuffer* p) {
inputs[0]->Print(p);
p->Print(") => %d Else %d\n", t_->id, f_->id);
}
-
} // internal
} // candor
@@ -466,7 +466,6 @@ class FCall : public FInstruction {
};
#undef FULLGEN_DEFAULT_METHODS
-
} // internal
} // candor
View
@@ -234,7 +234,7 @@ HValue* HValue::CopyTo(Space* old_space, Space* new_space) {
size += 4 * kPointerSize;
break;
case Heap::kTagNumber:
- size += sizeof(double);
+ size += HNumber::kDoubleSize;
break;
case Heap::kTagBoolean:
size += kPointerSize;
View
@@ -315,7 +315,11 @@ class HValue {
*reinterpret_cast<uint8_t*>(addr + kRepresentationOffset) = r;
}
- static const int kPointerSize = sizeof(char*);
+#if CANDOR_ARCH_x64
+ static const int kPointerSize = 8;
+#elif CANDOR_ARCH_ia32
+ static const int kPointerSize = 4;
+#endif
static const int kTagOffset = HINTERIOR_OFFSET(0);
static const int kGCMarkOffset = HINTERIOR_OFFSET(1) - 1;
@@ -431,6 +435,8 @@ class HNumber : public HValue {
static inline bool IsIntegral(char* addr);
+ static const int kDoubleSize = 8;
+
static const int kValueOffset = HINTERIOR_OFFSET(1);
static const Heap::HeapTag class_tag = Heap::kTagNumber;
@@ -242,7 +242,7 @@ void Masm::AllocateContext(uint32_t slots) {
void Masm::AllocateNumber(DoubleRegister value, Register result) {
- Allocate(Heap::kTagNumber, reg_nil, sizeof(double), result);
+ Allocate(Heap::kTagNumber, reg_nil, HNumber::kDoubleSize, result);
Operand qvalue(result, HNumber::kValueOffset);
movd(qvalue, value);
View
@@ -569,50 +569,6 @@ class NumberKey {
}
};
-
-template <class T, int size>
-class FreeList {
- public:
- FreeList() : length_(0) {
- }
-
- inline bool IsEmpty() { return length_ == 0; }
- inline T Get() { return list_[--length_]; }
- inline void Release(T value) {
- assert(!Has(value));
- list_[length_++] = value;
- }
-
- inline void Remove(T value) {
- for (int i = 0; i < length_; i++) {
- // TODO(indutny): Use Shape class here
- if (list_[i] != value) continue;
-
- // Shift all registers to the left
- for (int j = i + 1; j < length_; j++) {
- list_[j - 1] = list_[j];
- }
-
- // Decrement length
- length_--;
- return;
- }
- }
-
- inline bool Has(T value) {
- for (int i = 0; i < length_; i++) {
- // TODO(indutny): Use Shape class here
- if (list_[i] == value) return true;
- }
-
- return false;
- }
-
- private:
- T list_[size];
- int length_;
-};
-
template <class Base>
class BitField : public Base {
public:
@@ -239,7 +239,7 @@ void Masm::AllocateContext(uint32_t slots) {
void Masm::AllocateNumber(DoubleRegister value, Register result) {
- Allocate(Heap::kTagNumber, reg_nil, sizeof(double), result);
+ Allocate(Heap::kTagNumber, reg_nil, HNumber::kDoubleSize, result);
Operand qvalue(result, HNumber::kValueOffset);
movd(qvalue, value);

0 comments on commit acd8be3

Please sign in to comment.