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

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

Issue 1722593002: [fullcodegen] Lift restriction on --debug-code flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/full-codegen/mips/full-codegen-mips.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 __ cmp(eax, isolate()->factory()->true_value()); 709 __ cmp(eax, isolate()->factory()->true_value());
710 Split(equal, if_true, if_false, NULL); 710 Split(equal, if_true, if_false, NULL);
711 __ bind(&skip); 711 __ bind(&skip);
712 } 712 }
713 } 713 }
714 714
715 715
716 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { 716 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) {
717 // The variable in the declaration always resides in the current context. 717 // The variable in the declaration always resides in the current context.
718 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); 718 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope()));
719 if (generate_debug_code_) { 719 if (FLAG_debug_code) {
720 // Check that we're not inside a with or catch context. 720 // Check that we're not inside a with or catch context.
721 __ mov(ebx, FieldOperand(esi, HeapObject::kMapOffset)); 721 __ mov(ebx, FieldOperand(esi, HeapObject::kMapOffset));
722 __ cmp(ebx, isolate()->factory()->with_context_map()); 722 __ cmp(ebx, isolate()->factory()->with_context_map());
723 __ Check(not_equal, kDeclarationInWithContext); 723 __ Check(not_equal, kDeclarationInWithContext);
724 __ cmp(ebx, isolate()->factory()->catch_context_map()); 724 __ cmp(ebx, isolate()->factory()->catch_context_map());
725 __ Check(not_equal, kDeclarationInCatchContext); 725 __ Check(not_equal, kDeclarationInCatchContext);
726 } 726 }
727 } 727 }
728 728
729 729
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
2347 __ Push(Immediate(var->name())); 2347 __ Push(Immediate(var->name()));
2348 __ Push(eax); 2348 __ Push(eax);
2349 __ CallRuntime(is_strict(language_mode()) 2349 __ CallRuntime(is_strict(language_mode())
2350 ? Runtime::kStoreLookupSlot_Strict 2350 ? Runtime::kStoreLookupSlot_Strict
2351 : Runtime::kStoreLookupSlot_Sloppy); 2351 : Runtime::kStoreLookupSlot_Sloppy);
2352 } else { 2352 } else {
2353 // Assignment to var or initializing assignment to let/const in harmony 2353 // Assignment to var or initializing assignment to let/const in harmony
2354 // mode. 2354 // mode.
2355 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 2355 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
2356 MemOperand location = VarOperand(var, ecx); 2356 MemOperand location = VarOperand(var, ecx);
2357 if (generate_debug_code_ && var->mode() == LET && op == Token::INIT) { 2357 if (FLAG_debug_code && var->mode() == LET && op == Token::INIT) {
2358 // Check for an uninitialized let binding. 2358 // Check for an uninitialized let binding.
2359 __ mov(edx, location); 2359 __ mov(edx, location);
2360 __ cmp(edx, isolate()->factory()->the_hole_value()); 2360 __ cmp(edx, isolate()->factory()->the_hole_value());
2361 __ Check(equal, kLetBindingReInitialization); 2361 __ Check(equal, kLetBindingReInitialization);
2362 } 2362 }
2363 EmitStoreToStackLocalOrContextSlot(var, location); 2363 EmitStoreToStackLocalOrContextSlot(var, location);
2364 } 2364 }
2365 2365
2366 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { 2366 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) {
2367 // Const initializers need a write barrier. 2367 // Const initializers need a write barrier.
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
4158 Assembler::target_address_at(call_target_address, 4158 Assembler::target_address_at(call_target_address,
4159 unoptimized_code)); 4159 unoptimized_code));
4160 return OSR_AFTER_STACK_CHECK; 4160 return OSR_AFTER_STACK_CHECK;
4161 } 4161 }
4162 4162
4163 4163
4164 } // namespace internal 4164 } // namespace internal
4165 } // namespace v8 4165 } // namespace v8
4166 4166
4167 #endif // V8_TARGET_ARCH_IA32 4167 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698