Commit 7846721d authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Fixes needed to compile on gcc-4.4.1 on ARM. It is still necessary

to add -fno-strict-aliasing.
Review URL: http://codereview.chromium.org/6123007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6a4df379
...@@ -72,7 +72,6 @@ ANDROID_FLAGS = ['-march=armv7-a', ...@@ -72,7 +72,6 @@ ANDROID_FLAGS = ['-march=armv7-a',
'-fgcse-after-reload', '-fgcse-after-reload',
'-frerun-cse-after-loop', '-frerun-cse-after-loop',
'-frename-registers', '-frename-registers',
'-fomit-frame-pointer',
'-finline-limit=64', '-finline-limit=64',
'-DCAN_USE_VFP_INSTRUCTIONS=1', '-DCAN_USE_VFP_INSTRUCTIONS=1',
'-DCAN_USE_ARMV7_INSTRUCTIONS=1', '-DCAN_USE_ARMV7_INSTRUCTIONS=1',
...@@ -143,10 +142,10 @@ LIBRARY_FLAGS = { ...@@ -143,10 +142,10 @@ LIBRARY_FLAGS = {
} }
}, },
'mode:release': { 'mode:release': {
'CCFLAGS': ['-O3', '-fomit-frame-pointer', '-fdata-sections', 'CCFLAGS': ['-O2', '-fdata-sections',
'-ffunction-sections'], '-ffunction-sections'],
'os:android': { 'os:android': {
'CCFLAGS': ['-mthumb', '-Os'], 'CCFLAGS': ['-mthumb'],
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
} }
}, },
......
...@@ -502,7 +502,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { ...@@ -502,7 +502,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
// Load the first arguments in r0 and get rid of the rest. // Load the first arguments in r0 and get rid of the rest.
Label no_arguments; Label no_arguments;
__ cmp(r0, Operand(0)); __ cmp(r0, Operand(0, RelocInfo::NONE));
__ b(eq, &no_arguments); __ b(eq, &no_arguments);
// First args = sp[(argc - 1) * 4]. // First args = sp[(argc - 1) * 4].
__ sub(r0, r0, Operand(1)); __ sub(r0, r0, Operand(1));
...@@ -546,7 +546,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { ...@@ -546,7 +546,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
__ cmp(r4, Operand(JSValue::kSize >> kPointerSizeLog2)); __ cmp(r4, Operand(JSValue::kSize >> kPointerSizeLog2));
__ Assert(eq, "Unexpected string wrapper instance size"); __ Assert(eq, "Unexpected string wrapper instance size");
__ ldrb(r4, FieldMemOperand(map, Map::kUnusedPropertyFieldsOffset)); __ ldrb(r4, FieldMemOperand(map, Map::kUnusedPropertyFieldsOffset));
__ cmp(r4, Operand(0)); __ cmp(r4, Operand(0, RelocInfo::NONE));
__ Assert(eq, "Unexpected unused properties of string wrapper"); __ Assert(eq, "Unexpected unused properties of string wrapper");
} }
__ str(map, FieldMemOperand(r0, HeapObject::kMapOffset)); __ str(map, FieldMemOperand(r0, HeapObject::kMapOffset));
......
...@@ -2516,7 +2516,7 @@ void CEntryStub::GenerateThrowUncatchable(MacroAssembler* masm, ...@@ -2516,7 +2516,7 @@ void CEntryStub::GenerateThrowUncatchable(MacroAssembler* masm,
if (type == OUT_OF_MEMORY) { if (type == OUT_OF_MEMORY) {
// Set external caught exception to false. // Set external caught exception to false.
ExternalReference external_caught(Top::k_external_caught_exception_address); ExternalReference external_caught(Top::k_external_caught_exception_address);
__ mov(r0, Operand(false)); __ mov(r0, Operand(false, RelocInfo::NONE));
__ mov(r2, Operand(external_caught)); __ mov(r2, Operand(external_caught));
__ str(r0, MemOperand(r2)); __ str(r0, MemOperand(r2));
......
...@@ -1591,7 +1591,7 @@ void KeyedLoadIC::GenerateExternalArray(MacroAssembler* masm, ...@@ -1591,7 +1591,7 @@ void KeyedLoadIC::GenerateExternalArray(MacroAssembler* masm,
__ and_(r1, r1, Operand(kBinary32ExponentMask >> kBinary32MantissaBits)); __ and_(r1, r1, Operand(kBinary32ExponentMask >> kBinary32MantissaBits));
Label exponent_rebiased; Label exponent_rebiased;
__ teq(r1, Operand(0x00)); __ teq(r1, Operand(0x00, RelocInfo::NONE));
__ b(eq, &exponent_rebiased); __ b(eq, &exponent_rebiased);
__ teq(r1, Operand(0xff)); __ teq(r1, Operand(0xff));
......
...@@ -417,8 +417,8 @@ void RegExpMacroAssemblerARM::CheckNotBackReference( ...@@ -417,8 +417,8 @@ void RegExpMacroAssemblerARM::CheckNotBackReference(
void RegExpMacroAssemblerARM::CheckNotRegistersEqual(int reg1, void RegExpMacroAssemblerARM::CheckNotRegistersEqual(int reg1,
int reg2, int reg2,
Label* on_not_equal) { Label* on_not_equal) {
__ ldr(r0, register_location(reg1)); __ ldr(r0, register_location(reg1));
__ ldr(r1, register_location(reg2)); __ ldr(r1, register_location(reg2));
__ cmp(r0, r1); __ cmp(r0, r1);
...@@ -426,7 +426,7 @@ void RegExpMacroAssemblerARM::CheckNotRegistersEqual(int reg1, ...@@ -426,7 +426,7 @@ void RegExpMacroAssemblerARM::CheckNotRegistersEqual(int reg1,
} }
void RegExpMacroAssemblerARM::CheckNotCharacter(uint32_t c, void RegExpMacroAssemblerARM::CheckNotCharacter(unsigned c,
Label* on_not_equal) { Label* on_not_equal) {
__ cmp(current_character(), Operand(c)); __ cmp(current_character(), Operand(c));
BranchOrBacktrack(ne, on_not_equal); BranchOrBacktrack(ne, on_not_equal);
...@@ -442,8 +442,8 @@ void RegExpMacroAssemblerARM::CheckCharacterAfterAnd(uint32_t c, ...@@ -442,8 +442,8 @@ void RegExpMacroAssemblerARM::CheckCharacterAfterAnd(uint32_t c,
} }
void RegExpMacroAssemblerARM::CheckNotCharacterAfterAnd(uint32_t c, void RegExpMacroAssemblerARM::CheckNotCharacterAfterAnd(unsigned c,
uint32_t mask, unsigned mask,
Label* on_not_equal) { Label* on_not_equal) {
__ and_(r0, current_character(), Operand(mask)); __ and_(r0, current_character(), Operand(mask));
__ cmp(r0, Operand(c)); __ cmp(r0, Operand(c));
......
...@@ -50,9 +50,9 @@ class RegExpMacroAssemblerARM: public NativeRegExpMacroAssembler { ...@@ -50,9 +50,9 @@ class RegExpMacroAssemblerARM: public NativeRegExpMacroAssembler {
virtual void Backtrack(); virtual void Backtrack();
virtual void Bind(Label* label); virtual void Bind(Label* label);
virtual void CheckAtStart(Label* on_at_start); virtual void CheckAtStart(Label* on_at_start);
virtual void CheckCharacter(uint32_t c, Label* on_equal); virtual void CheckCharacter(unsigned c, Label* on_equal);
virtual void CheckCharacterAfterAnd(uint32_t c, virtual void CheckCharacterAfterAnd(unsigned c,
uint32_t mask, unsigned mask,
Label* on_equal); Label* on_equal);
virtual void CheckCharacterGT(uc16 limit, Label* on_greater); virtual void CheckCharacterGT(uc16 limit, Label* on_greater);
virtual void CheckCharacterLT(uc16 limit, Label* on_less); virtual void CheckCharacterLT(uc16 limit, Label* on_less);
...@@ -68,9 +68,9 @@ class RegExpMacroAssemblerARM: public NativeRegExpMacroAssembler { ...@@ -68,9 +68,9 @@ class RegExpMacroAssemblerARM: public NativeRegExpMacroAssembler {
virtual void CheckNotBackReferenceIgnoreCase(int start_reg, virtual void CheckNotBackReferenceIgnoreCase(int start_reg,
Label* on_no_match); Label* on_no_match);
virtual void CheckNotRegistersEqual(int reg1, int reg2, Label* on_not_equal); virtual void CheckNotRegistersEqual(int reg1, int reg2, Label* on_not_equal);
virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); virtual void CheckNotCharacter(unsigned c, Label* on_not_equal);
virtual void CheckNotCharacterAfterAnd(uint32_t c, virtual void CheckNotCharacterAfterAnd(unsigned c,
uint32_t mask, unsigned mask,
Label* on_not_equal); Label* on_not_equal);
virtual void CheckNotCharacterAfterMinusAnd(uc16 c, virtual void CheckNotCharacterAfterMinusAnd(uc16 c,
uc16 minus, uc16 minus,
......
...@@ -1965,7 +1965,7 @@ MaybeObject* CallStubCompiler::CompileMathFloorCall(Object* object, ...@@ -1965,7 +1965,7 @@ MaybeObject* CallStubCompiler::CompileMathFloorCall(Object* object,
__ mov(r0, Operand(r0, LSL, kSmiTagSize)); __ mov(r0, Operand(r0, LSL, kSmiTagSize));
// Check for -0. // Check for -0.
__ cmp(r0, Operand(0)); __ cmp(r0, Operand(0, RelocInfo::NONE));
__ b(&restore_fpscr_and_return, ne); __ b(&restore_fpscr_and_return, ne);
// r5 already holds the HeapNumber exponent. // r5 already holds the HeapNumber exponent.
__ tst(r5, Operand(HeapNumber::kSignMask)); __ tst(r5, Operand(HeapNumber::kSignMask));
......
...@@ -1865,7 +1865,7 @@ class GCTracer BASE_EMBEDDED { ...@@ -1865,7 +1865,7 @@ class GCTracer BASE_EMBEDDED {
} }
~Scope() { ~Scope() {
ASSERT((0 <= scope_) && (scope_ < kNumberOfScopes)); ASSERT(scope_ < kNumberOfScopes); // scope_ is unsigned.
tracer_->scopes_[scope_] += OS::TimeCurrentMillis() - start_time_; tracer_->scopes_[scope_] += OS::TimeCurrentMillis() - start_time_;
} }
......
...@@ -425,7 +425,7 @@ RegExpImpl::IrregexpResult RegExpImpl::IrregexpExecOnce( ...@@ -425,7 +425,7 @@ RegExpImpl::IrregexpResult RegExpImpl::IrregexpExecOnce(
Handle<JSRegExp> regexp, Handle<JSRegExp> regexp,
Handle<String> subject, Handle<String> subject,
int index, int index,
Vector<int32_t> output) { Vector<int> output) {
Handle<FixedArray> irregexp(FixedArray::cast(regexp->data())); Handle<FixedArray> irregexp(FixedArray::cast(regexp->data()));
ASSERT(index >= 0); ASSERT(index >= 0);
...@@ -521,8 +521,8 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> jsregexp, ...@@ -521,8 +521,8 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> jsregexp,
OffsetsVector registers(required_registers); OffsetsVector registers(required_registers);
IrregexpResult res = RegExpImpl::IrregexpExecOnce( IrregexpResult res = RegExpImpl::IrregexpExecOnce(
jsregexp, subject, previous_index, Vector<int32_t>(registers.vector(), jsregexp, subject, previous_index, Vector<int>(registers.vector(),
registers.length())); registers.length()));
if (res == RE_SUCCESS) { if (res == RE_SUCCESS) {
int capture_register_count = int capture_register_count =
(IrregexpNumberOfCaptures(FixedArray::cast(jsregexp->data())) + 1) * 2; (IrregexpNumberOfCaptures(FixedArray::cast(jsregexp->data())) + 1) * 2;
......
...@@ -114,7 +114,7 @@ class RegExpImpl { ...@@ -114,7 +114,7 @@ class RegExpImpl {
static IrregexpResult IrregexpExecOnce(Handle<JSRegExp> regexp, static IrregexpResult IrregexpExecOnce(Handle<JSRegExp> regexp,
Handle<String> subject, Handle<String> subject,
int index, int index,
Vector<int32_t> registers); Vector<int> registers);
// Execute an Irregexp bytecode pattern. // Execute an Irregexp bytecode pattern.
// On a successful match, the result is a JSArray containing // On a successful match, the result is a JSArray containing
......
...@@ -2238,7 +2238,6 @@ InstanceType Map::instance_type() { ...@@ -2238,7 +2238,6 @@ InstanceType Map::instance_type() {
void Map::set_instance_type(InstanceType value) { void Map::set_instance_type(InstanceType value) {
ASSERT(0 <= value && value < 256);
WRITE_BYTE_FIELD(this, kInstanceTypeOffset, value); WRITE_BYTE_FIELD(this, kInstanceTypeOffset, value);
} }
...@@ -3216,28 +3215,28 @@ int JSFunction::NumberOfLiterals() { ...@@ -3216,28 +3215,28 @@ int JSFunction::NumberOfLiterals() {
Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) {
ASSERT(0 <= id && id < kJSBuiltinsCount); ASSERT(id < kJSBuiltinsCount); // id is unsigned.
return READ_FIELD(this, OffsetOfFunctionWithId(id)); return READ_FIELD(this, OffsetOfFunctionWithId(id));
} }
void JSBuiltinsObject::set_javascript_builtin(Builtins::JavaScript id, void JSBuiltinsObject::set_javascript_builtin(Builtins::JavaScript id,
Object* value) { Object* value) {
ASSERT(0 <= id && id < kJSBuiltinsCount); ASSERT(id < kJSBuiltinsCount); // id is unsigned.
WRITE_FIELD(this, OffsetOfFunctionWithId(id), value); WRITE_FIELD(this, OffsetOfFunctionWithId(id), value);
WRITE_BARRIER(this, OffsetOfFunctionWithId(id)); WRITE_BARRIER(this, OffsetOfFunctionWithId(id));
} }
Code* JSBuiltinsObject::javascript_builtin_code(Builtins::JavaScript id) { Code* JSBuiltinsObject::javascript_builtin_code(Builtins::JavaScript id) {
ASSERT(0 <= id && id < kJSBuiltinsCount); ASSERT(id < kJSBuiltinsCount); // id is unsigned.
return Code::cast(READ_FIELD(this, OffsetOfCodeWithId(id))); return Code::cast(READ_FIELD(this, OffsetOfCodeWithId(id)));
} }
void JSBuiltinsObject::set_javascript_builtin_code(Builtins::JavaScript id, void JSBuiltinsObject::set_javascript_builtin_code(Builtins::JavaScript id,
Code* value) { Code* value) {
ASSERT(0 <= id && id < kJSBuiltinsCount); ASSERT(id < kJSBuiltinsCount); // id is unsigned.
WRITE_FIELD(this, OffsetOfCodeWithId(id), value); WRITE_FIELD(this, OffsetOfCodeWithId(id), value);
ASSERT(!Heap::InNewSpace(value)); ASSERT(!Heap::InNewSpace(value));
} }
......
...@@ -146,7 +146,7 @@ class VisitorDispatchTable { ...@@ -146,7 +146,7 @@ class VisitorDispatchTable {
} }
void Register(StaticVisitorBase::VisitorId id, Callback callback) { void Register(StaticVisitorBase::VisitorId id, Callback callback) {
ASSERT((0 <= id) && (id < StaticVisitorBase::kVisitorIdCount)); ASSERT(id < StaticVisitorBase::kVisitorIdCount); // id is unsigned.
callbacks_[id] = callback; callbacks_[id] = callback;
} }
......
...@@ -76,18 +76,18 @@ class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler { ...@@ -76,18 +76,18 @@ class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler {
Label* on_end_of_input, Label* on_end_of_input,
bool check_bounds = true, bool check_bounds = true,
int characters = 1); int characters = 1);
virtual void CheckCharacter(uint32_t c, Label* on_equal); virtual void CheckCharacter(unsigned c, Label* on_equal);
virtual void CheckCharacterAfterAnd(uint32_t c, virtual void CheckCharacterAfterAnd(unsigned c,
uint32_t mask, unsigned mask,
Label* on_equal); Label* on_equal);
virtual void CheckCharacterGT(uc16 limit, Label* on_greater); virtual void CheckCharacterGT(uc16 limit, Label* on_greater);
virtual void CheckCharacterLT(uc16 limit, Label* on_less); virtual void CheckCharacterLT(uc16 limit, Label* on_less);
virtual void CheckGreedyLoop(Label* on_tos_equals_current_position); virtual void CheckGreedyLoop(Label* on_tos_equals_current_position);
virtual void CheckAtStart(Label* on_at_start); virtual void CheckAtStart(Label* on_at_start);
virtual void CheckNotAtStart(Label* on_not_at_start); virtual void CheckNotAtStart(Label* on_not_at_start);
virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); virtual void CheckNotCharacter(unsigned c, Label* on_not_equal);
virtual void CheckNotCharacterAfterAnd(uint32_t c, virtual void CheckNotCharacterAfterAnd(unsigned c,
uint32_t mask, unsigned mask,
Label* on_not_equal); Label* on_not_equal);
virtual void CheckNotCharacterAfterMinusAnd(uc16 c, virtual void CheckNotCharacterAfterMinusAnd(uc16 c,
uc16 minus, uc16 minus,
......
...@@ -213,7 +213,7 @@ void RegExpMacroAssemblerTracer::CheckCharacterGT(uc16 limit, ...@@ -213,7 +213,7 @@ void RegExpMacroAssemblerTracer::CheckCharacterGT(uc16 limit,
} }
void RegExpMacroAssemblerTracer::CheckCharacter(uint32_t c, Label* on_equal) { void RegExpMacroAssemblerTracer::CheckCharacter(unsigned c, Label* on_equal) {
PrintF(" CheckCharacter(c='u%04x', label[%08x]);\n", PrintF(" CheckCharacter(c='u%04x', label[%08x]);\n",
c, LabelToInt(on_equal)); c, LabelToInt(on_equal));
assembler_->CheckCharacter(c, on_equal); assembler_->CheckCharacter(c, on_equal);
...@@ -232,7 +232,7 @@ void RegExpMacroAssemblerTracer::CheckNotAtStart(Label* on_not_at_start) { ...@@ -232,7 +232,7 @@ void RegExpMacroAssemblerTracer::CheckNotAtStart(Label* on_not_at_start) {
} }
void RegExpMacroAssemblerTracer::CheckNotCharacter(uint32_t c, void RegExpMacroAssemblerTracer::CheckNotCharacter(unsigned c,
Label* on_not_equal) { Label* on_not_equal) {
PrintF(" CheckNotCharacter(c='u%04x', label[%08x]);\n", PrintF(" CheckNotCharacter(c='u%04x', label[%08x]);\n",
c, LabelToInt(on_not_equal)); c, LabelToInt(on_not_equal));
...@@ -241,8 +241,8 @@ void RegExpMacroAssemblerTracer::CheckNotCharacter(uint32_t c, ...@@ -241,8 +241,8 @@ void RegExpMacroAssemblerTracer::CheckNotCharacter(uint32_t c,
void RegExpMacroAssemblerTracer::CheckCharacterAfterAnd( void RegExpMacroAssemblerTracer::CheckCharacterAfterAnd(
uint32_t c, unsigned c,
uint32_t mask, unsigned mask,
Label* on_equal) { Label* on_equal) {
PrintF(" CheckCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n", PrintF(" CheckCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n",
c, c,
...@@ -253,8 +253,8 @@ void RegExpMacroAssemblerTracer::CheckCharacterAfterAnd( ...@@ -253,8 +253,8 @@ void RegExpMacroAssemblerTracer::CheckCharacterAfterAnd(
void RegExpMacroAssemblerTracer::CheckNotCharacterAfterAnd( void RegExpMacroAssemblerTracer::CheckNotCharacterAfterAnd(
uint32_t c, unsigned c,
uint32_t mask, unsigned mask,
Label* on_not_equal) { Label* on_not_equal) {
PrintF(" CheckNotCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n", PrintF(" CheckNotCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n",
c, c,
......
...@@ -43,9 +43,9 @@ class RegExpMacroAssemblerTracer: public RegExpMacroAssembler { ...@@ -43,9 +43,9 @@ class RegExpMacroAssemblerTracer: public RegExpMacroAssembler {
virtual void Backtrack(); virtual void Backtrack();
virtual void Bind(Label* label); virtual void Bind(Label* label);
virtual void CheckAtStart(Label* on_at_start); virtual void CheckAtStart(Label* on_at_start);
virtual void CheckCharacter(uint32_t c, Label* on_equal); virtual void CheckCharacter(unsigned c, Label* on_equal);
virtual void CheckCharacterAfterAnd(uint32_t c, virtual void CheckCharacterAfterAnd(unsigned c,
uint32_t and_with, unsigned and_with,
Label* on_equal); Label* on_equal);
virtual void CheckCharacterGT(uc16 limit, Label* on_greater); virtual void CheckCharacterGT(uc16 limit, Label* on_greater);
virtual void CheckCharacterLT(uc16 limit, Label* on_less); virtual void CheckCharacterLT(uc16 limit, Label* on_less);
...@@ -60,9 +60,9 @@ class RegExpMacroAssemblerTracer: public RegExpMacroAssembler { ...@@ -60,9 +60,9 @@ class RegExpMacroAssemblerTracer: public RegExpMacroAssembler {
virtual void CheckNotBackReferenceIgnoreCase(int start_reg, virtual void CheckNotBackReferenceIgnoreCase(int start_reg,
Label* on_no_match); Label* on_no_match);
virtual void CheckNotRegistersEqual(int reg1, int reg2, Label* on_not_equal); virtual void CheckNotRegistersEqual(int reg1, int reg2, Label* on_not_equal);
virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); virtual void CheckNotCharacter(unsigned c, Label* on_not_equal);
virtual void CheckNotCharacterAfterAnd(uint32_t c, virtual void CheckNotCharacterAfterAnd(unsigned c,
uint32_t and_with, unsigned and_with,
Label* on_not_equal); Label* on_not_equal);
virtual void CheckNotCharacterAfterMinusAnd(uc16 c, virtual void CheckNotCharacterAfterMinusAnd(uc16 c,
uc16 minus, uc16 minus,
......
...@@ -73,11 +73,11 @@ class RegExpMacroAssembler { ...@@ -73,11 +73,11 @@ class RegExpMacroAssembler {
virtual void CheckAtStart(Label* on_at_start) = 0; virtual void CheckAtStart(Label* on_at_start) = 0;
// Dispatch after looking the current character up in a 2-bits-per-entry // Dispatch after looking the current character up in a 2-bits-per-entry
// map. The destinations vector has up to 4 labels. // map. The destinations vector has up to 4 labels.
virtual void CheckCharacter(uint32_t c, Label* on_equal) = 0; virtual void CheckCharacter(unsigned c, Label* on_equal) = 0;
// Bitwise and the current character with the given constant and then // Bitwise and the current character with the given constant and then
// check for a match with c. // check for a match with c.
virtual void CheckCharacterAfterAnd(uint32_t c, virtual void CheckCharacterAfterAnd(unsigned c,
uint32_t and_with, unsigned and_with,
Label* on_equal) = 0; Label* on_equal) = 0;
virtual void CheckCharacterGT(uc16 limit, Label* on_greater) = 0; virtual void CheckCharacterGT(uc16 limit, Label* on_greater) = 0;
virtual void CheckCharacterLT(uc16 limit, Label* on_less) = 0; virtual void CheckCharacterLT(uc16 limit, Label* on_less) = 0;
...@@ -101,9 +101,9 @@ class RegExpMacroAssembler { ...@@ -101,9 +101,9 @@ class RegExpMacroAssembler {
// fail to match then goto the on_failure label. End of input always // fail to match then goto the on_failure label. End of input always
// matches. If the label is NULL then we should pop a backtrack address off // matches. If the label is NULL then we should pop a backtrack address off
// the stack and go to that. // the stack and go to that.
virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal) = 0; virtual void CheckNotCharacter(unsigned c, Label* on_not_equal) = 0;
virtual void CheckNotCharacterAfterAnd(uint32_t c, virtual void CheckNotCharacterAfterAnd(unsigned c,
uint32_t and_with, unsigned and_with,
Label* on_not_equal) = 0; Label* on_not_equal) = 0;
// Subtract a constant from the current character, then or with the given // Subtract a constant from the current character, then or with the given
// constant and then check for a match with c. // constant and then check for a match with c.
......
...@@ -217,7 +217,7 @@ class Token { ...@@ -217,7 +217,7 @@ class Token {
// Returns a string corresponding to the C++ token name // Returns a string corresponding to the C++ token name
// (e.g. "LT" for the token LT). // (e.g. "LT" for the token LT).
static const char* Name(Value tok) { static const char* Name(Value tok) {
ASSERT(0 <= tok && tok < NUM_TOKENS); ASSERT(tok < NUM_TOKENS); // tok is unsigned
return name_[tok]; return name_[tok];
} }
...@@ -292,14 +292,14 @@ class Token { ...@@ -292,14 +292,14 @@ class Token {
// (.e., "<" for the token LT) or NULL if the token doesn't // (.e., "<" for the token LT) or NULL if the token doesn't
// have a (unique) string (e.g. an IDENTIFIER). // have a (unique) string (e.g. an IDENTIFIER).
static const char* String(Value tok) { static const char* String(Value tok) {
ASSERT(0 <= tok && tok < NUM_TOKENS); ASSERT(tok < NUM_TOKENS); // tok is unsigned.
return string_[tok]; return string_[tok];
} }
// Returns the precedence > 0 for binary and compare // Returns the precedence > 0 for binary and compare
// operators; returns 0 otherwise. // operators; returns 0 otherwise.
static int Precedence(Value tok) { static int Precedence(Value tok) {
ASSERT(0 <= tok && tok < NUM_TOKENS); ASSERT(tok < NUM_TOKENS); // tok is unsigned.
return precedence_[tok]; return precedence_[tok];
} }
......
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