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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 12330012: ES6 symbols: Allow symbols as property names (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Platform ports Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 Label* fail) { 1227 Label* fail) {
1228 ASSERT(kNotStringTag != 0); 1228 ASSERT(kNotStringTag != 0);
1229 1229
1230 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 1230 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
1231 ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); 1231 ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
1232 tst(scratch, Operand(kIsNotStringMask)); 1232 tst(scratch, Operand(kIsNotStringMask));
1233 b(ne, fail); 1233 b(ne, fail);
1234 } 1234 }
1235 1235
1236 1236
1237 void MacroAssembler::IsObjectNameType(Register object,
1238 Register scratch,
1239 Label* fail) {
1240 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
1241 ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
1242 cmp(scratch, Operand(LAST_NAME_TYPE));
1243 b(hi, fail);
1244 }
1245
1246
1237 #ifdef ENABLE_DEBUGGER_SUPPORT 1247 #ifdef ENABLE_DEBUGGER_SUPPORT
1238 void MacroAssembler::DebugBreak() { 1248 void MacroAssembler::DebugBreak() {
1239 mov(r0, Operand::Zero()); 1249 mov(r0, Operand::Zero());
1240 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate()))); 1250 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate())));
1241 CEntryStub ces(1); 1251 CEntryStub ces(1);
1242 ASSERT(AllowThisStubCall(&ces)); 1252 ASSERT(AllowThisStubCall(&ces));
1243 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 1253 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
1244 } 1254 }
1245 #endif 1255 #endif
1246 1256
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after
3171 Check(ne, "Operand is a smi and not a string"); 3181 Check(ne, "Operand is a smi and not a string");
3172 push(object); 3182 push(object);
3173 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); 3183 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset));
3174 CompareInstanceType(object, object, FIRST_NONSTRING_TYPE); 3184 CompareInstanceType(object, object, FIRST_NONSTRING_TYPE);
3175 pop(object); 3185 pop(object);
3176 Check(lo, "Operand is not a string"); 3186 Check(lo, "Operand is not a string");
3177 } 3187 }
3178 } 3188 }
3179 3189
3180 3190
3191 void MacroAssembler::AssertName(Register object) {
3192 if (emit_debug_code()) {
3193 STATIC_ASSERT(kSmiTag == 0);
3194 tst(object, Operand(kSmiTagMask));
3195 Check(ne, "Operand is a smi and not a name");
3196 push(object);
3197 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset));
3198 CompareInstanceType(object, object, LAST_NAME_TYPE);
3199 pop(object);
3200 Check(le, "Operand is not a name");
3201 }
3202 }
3203
3204
3181 3205
3182 void MacroAssembler::AssertRootValue(Register src, 3206 void MacroAssembler::AssertRootValue(Register src,
3183 Heap::RootListIndex root_value_index, 3207 Heap::RootListIndex root_value_index,
3184 const char* message) { 3208 const char* message) {
3185 if (emit_debug_code()) { 3209 if (emit_debug_code()) {
3186 CompareRoot(src, root_value_index); 3210 CompareRoot(src, root_value_index);
3187 Check(eq, message); 3211 Check(eq, message);
3188 } 3212 }
3189 } 3213 }
3190 3214
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
3985 void CodePatcher::EmitCondition(Condition cond) { 4009 void CodePatcher::EmitCondition(Condition cond) {
3986 Instr instr = Assembler::instr_at(masm_.pc_); 4010 Instr instr = Assembler::instr_at(masm_.pc_);
3987 instr = (instr & ~kCondMask) | cond; 4011 instr = (instr & ~kCondMask) | cond;
3988 masm_.emit(instr); 4012 masm_.emit(instr);
3989 } 4013 }
3990 4014
3991 4015
3992 } } // namespace v8::internal 4016 } } // namespace v8::internal
3993 4017
3994 #endif // V8_TARGET_ARCH_ARM 4018 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698