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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 140943002: Fix logic error in assert in IsUndeclaredGlobal() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports and addressed comments. Created 6 years, 11 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/ia32/ic-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('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 3178 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
4478 } 4465 }
4479 4466
4480 4467
4481 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 4468 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
4482 ASSERT(ToRegister(instr->context()).is(esi)); 4469 ASSERT(ToRegister(instr->context()).is(esi));
4483 ASSERT(ToRegister(instr->object()).is(edx)); 4470 ASSERT(ToRegister(instr->object()).is(edx));
4484 ASSERT(ToRegister(instr->value()).is(eax)); 4471 ASSERT(ToRegister(instr->value()).is(eax));
4485 4472
4486 __ mov(ecx, instr->name()); 4473 __ mov(ecx, instr->name());
4487 Handle<Code> ic = StoreIC::initialize_stub(isolate(), 4474 Handle<Code> ic = StoreIC::initialize_stub(isolate(),
4488 instr->strict_mode_flag(), 4475 instr->strict_mode_flag());
4489 NOT_CONTEXTUAL);
4490 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4476 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4491 } 4477 }
4492 4478
4493 4479
4494 void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) { 4480 void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) {
4495 if (FLAG_debug_code && check->hydrogen()->skip_check()) { 4481 if (FLAG_debug_code && check->hydrogen()->skip_check()) {
4496 Label done; 4482 Label done;
4497 __ j(NegateCondition(cc), &done, Label::kNear); 4483 __ j(NegateCondition(cc), &done, Label::kNear);
4498 __ int3(); 4484 __ int3();
4499 __ bind(&done); 4485 __ bind(&done);
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after
6351 FixedArray::kHeaderSize - kPointerSize)); 6337 FixedArray::kHeaderSize - kPointerSize));
6352 __ bind(&done); 6338 __ bind(&done);
6353 } 6339 }
6354 6340
6355 6341
6356 #undef __ 6342 #undef __
6357 6343
6358 } } // namespace v8::internal 6344 } } // namespace v8::internal
6359 6345
6360 #endif // V8_TARGET_ARCH_IA32 6346 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698