| OLD | NEW |
| 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 3178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3189 __ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value()); | 3189 __ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value()); |
| 3190 DeoptimizeIf(equal, instr->environment()); | 3190 DeoptimizeIf(equal, instr->environment()); |
| 3191 } | 3191 } |
| 3192 | 3192 |
| 3193 // Store the value. | 3193 // Store the value. |
| 3194 __ mov(Operand::ForCell(cell_handle), value); | 3194 __ mov(Operand::ForCell(cell_handle), value); |
| 3195 // Cells are always rescanned, so no write barrier here. | 3195 // Cells are always rescanned, so no write barrier here. |
| 3196 } | 3196 } |
| 3197 | 3197 |
| 3198 | 3198 |
| 3199 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { | |
| 3200 ASSERT(ToRegister(instr->context()).is(esi)); | |
| 3201 ASSERT(ToRegister(instr->global_object()).is(edx)); | |
| 3202 ASSERT(ToRegister(instr->value()).is(eax)); | |
| 3203 | |
| 3204 __ mov(ecx, instr->name()); | |
| 3205 Handle<Code> ic = StoreIC::initialize_stub(isolate(), | |
| 3206 instr->strict_mode_flag(), | |
| 3207 CONTEXTUAL); | |
| 3208 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
| 3209 } | |
| 3210 | |
| 3211 | |
| 3212 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 3199 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 3213 Register context = ToRegister(instr->context()); | 3200 Register context = ToRegister(instr->context()); |
| 3214 Register result = ToRegister(instr->result()); | 3201 Register result = ToRegister(instr->result()); |
| 3215 __ mov(result, ContextOperand(context, instr->slot_index())); | 3202 __ mov(result, ContextOperand(context, instr->slot_index())); |
| 3216 | 3203 |
| 3217 if (instr->hydrogen()->RequiresHoleCheck()) { | 3204 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 3218 __ cmp(result, factory()->the_hole_value()); | 3205 __ cmp(result, factory()->the_hole_value()); |
| 3219 if (instr->hydrogen()->DeoptimizesOnHole()) { | 3206 if (instr->hydrogen()->DeoptimizesOnHole()) { |
| 3220 DeoptimizeIf(equal, instr->environment()); | 3207 DeoptimizeIf(equal, instr->environment()); |
| 3221 } else { | 3208 } else { |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4492 } | 4479 } |
| 4493 | 4480 |
| 4494 | 4481 |
| 4495 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { | 4482 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
| 4496 ASSERT(ToRegister(instr->context()).is(esi)); | 4483 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4497 ASSERT(ToRegister(instr->object()).is(edx)); | 4484 ASSERT(ToRegister(instr->object()).is(edx)); |
| 4498 ASSERT(ToRegister(instr->value()).is(eax)); | 4485 ASSERT(ToRegister(instr->value()).is(eax)); |
| 4499 | 4486 |
| 4500 __ mov(ecx, instr->name()); | 4487 __ mov(ecx, instr->name()); |
| 4501 Handle<Code> ic = StoreIC::initialize_stub(isolate(), | 4488 Handle<Code> ic = StoreIC::initialize_stub(isolate(), |
| 4502 instr->strict_mode_flag(), | 4489 instr->strict_mode_flag()); |
| 4503 NOT_CONTEXTUAL); | |
| 4504 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4490 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 4505 } | 4491 } |
| 4506 | 4492 |
| 4507 | 4493 |
| 4508 void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) { | 4494 void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) { |
| 4509 if (FLAG_debug_code && check->hydrogen()->skip_check()) { | 4495 if (FLAG_debug_code && check->hydrogen()->skip_check()) { |
| 4510 Label done; | 4496 Label done; |
| 4511 __ j(NegateCondition(cc), &done, Label::kNear); | 4497 __ j(NegateCondition(cc), &done, Label::kNear); |
| 4512 __ int3(); | 4498 __ int3(); |
| 4513 __ bind(&done); | 4499 __ bind(&done); |
| (...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6376 FixedArray::kHeaderSize - kPointerSize)); | 6362 FixedArray::kHeaderSize - kPointerSize)); |
| 6377 __ bind(&done); | 6363 __ bind(&done); |
| 6378 } | 6364 } |
| 6379 | 6365 |
| 6380 | 6366 |
| 6381 #undef __ | 6367 #undef __ |
| 6382 | 6368 |
| 6383 } } // namespace v8::internal | 6369 } } // namespace v8::internal |
| 6384 | 6370 |
| 6385 #endif // V8_TARGET_ARCH_IA32 | 6371 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |