Commit 2ade6a5a authored by yangguo@chromium.org's avatar yangguo@chromium.org

Small fix for STATIC_ASSERT.

Review URL: http://codereview.chromium.org/7776007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8ab5b50f
......@@ -4389,8 +4389,8 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// a sequential string or an external string.
// In the case of a sliced string its offset has to be taken into account.
Label cons_string, check_encoding;
STATIC_ASSERT((kConsStringTag < kExternalStringTag));
STATIC_ASSERT((kSlicedStringTag > kExternalStringTag));
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
__ cmp(r1, Operand(kExternalStringTag));
__ b(lt, &cons_string);
__ b(eq, &runtime);
......@@ -4857,8 +4857,8 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
// Handle non-flat strings.
__ and_(result_, result_, Operand(kStringRepresentationMask));
STATIC_ASSERT((kConsStringTag < kExternalStringTag));
STATIC_ASSERT((kSlicedStringTag > kExternalStringTag));
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
__ cmp(result_, Operand(kExternalStringTag));
__ b(gt, &sliced_string);
__ b(eq, &call_runtime_);
......
......@@ -251,9 +251,9 @@ template <> class StaticAssertion<true> { };
// actually causes each use to introduce a new defined type with a
// name depending on the source line.
template <int> class StaticAssertionHelper { };
#define STATIC_CHECK(test) \
typedef \
StaticAssertionHelper<sizeof(StaticAssertion<static_cast<bool>(test)>)> \
#define STATIC_CHECK(test) \
typedef \
StaticAssertionHelper<sizeof(StaticAssertion<static_cast<bool>((test))>)> \
SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
......
......@@ -3396,8 +3396,8 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// a sequential string or an external string.
// In the case of a sliced string its offset has to be taken into account.
Label cons_string, check_encoding;
STATIC_ASSERT((kConsStringTag < kExternalStringTag));
STATIC_ASSERT((kSlicedStringTag > kExternalStringTag));
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
__ cmp(Operand(ebx), Immediate(kExternalStringTag));
__ j(less, &cons_string);
__ j(equal, &runtime);
......@@ -4872,8 +4872,8 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
// Handle non-flat strings.
__ and_(result_, kStringRepresentationMask);
STATIC_ASSERT((kConsStringTag < kExternalStringTag));
STATIC_ASSERT((kSlicedStringTag > kExternalStringTag));
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
__ cmp(result_, kExternalStringTag);
__ j(greater, &sliced_string, Label::kNear);
__ j(equal, &call_runtime_);
......
......@@ -4541,8 +4541,8 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// a sequential string or an external string.
// In the case of a sliced string its offset has to be taken into account.
Label cons_string, check_encoding;
STATIC_ASSERT((kConsStringTag < kExternalStringTag));
STATIC_ASSERT((kSlicedStringTag > kExternalStringTag));
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
__ Branch(&cons_string, lt, at, Operand(kExternalStringTag));
__ Branch(&runtime, eq, at, Operand(kExternalStringTag));
......@@ -5025,8 +5025,8 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
// Handle non-flat strings.
__ And(result_, result_, Operand(kStringRepresentationMask));
STATIC_ASSERT((kConsStringTag < kExternalStringTag));
STATIC_ASSERT((kSlicedStringTag > kExternalStringTag));
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
__ Branch(&sliced_string, gt, result_, Operand(kExternalStringTag));
__ Branch(&call_runtime_, eq, result_, Operand(kExternalStringTag));
......
......@@ -2470,8 +2470,8 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// a sequential string or an external string.
// In the case of a sliced string its offset has to be taken into account.
Label cons_string, check_encoding;
STATIC_ASSERT((kConsStringTag < kExternalStringTag));
STATIC_ASSERT((kSlicedStringTag > kExternalStringTag));
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
__ cmpq(rbx, Immediate(kExternalStringTag));
__ j(less, &cons_string, Label::kNear);
__ j(equal, &runtime);
......@@ -3903,8 +3903,8 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
// Handle non-flat strings.
__ and_(result_, Immediate(kStringRepresentationMask));
STATIC_ASSERT((kConsStringTag < kExternalStringTag));
STATIC_ASSERT((kSlicedStringTag > kExternalStringTag));
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
__ cmpb(result_, Immediate(kExternalStringTag));
__ j(greater, &sliced_string);
__ j(equal, &call_runtime_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment