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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | no next file » | 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_X87 5 #if V8_TARGET_ARCH_X87
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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 __ cmp(eax, isolate()->factory()->true_value()); 706 __ cmp(eax, isolate()->factory()->true_value());
707 Split(equal, if_true, if_false, NULL); 707 Split(equal, if_true, if_false, NULL);
708 __ bind(&skip); 708 __ bind(&skip);
709 } 709 }
710 } 710 }
711 711
712 712
713 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { 713 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) {
714 // The variable in the declaration always resides in the current context. 714 // The variable in the declaration always resides in the current context.
715 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); 715 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope()));
716 if (generate_debug_code_) { 716 if (FLAG_debug_code) {
717 // Check that we're not inside a with or catch context. 717 // Check that we're not inside a with or catch context.
718 __ mov(ebx, FieldOperand(esi, HeapObject::kMapOffset)); 718 __ mov(ebx, FieldOperand(esi, HeapObject::kMapOffset));
719 __ cmp(ebx, isolate()->factory()->with_context_map()); 719 __ cmp(ebx, isolate()->factory()->with_context_map());
720 __ Check(not_equal, kDeclarationInWithContext); 720 __ Check(not_equal, kDeclarationInWithContext);
721 __ cmp(ebx, isolate()->factory()->catch_context_map()); 721 __ cmp(ebx, isolate()->factory()->catch_context_map());
722 __ Check(not_equal, kDeclarationInCatchContext); 722 __ Check(not_equal, kDeclarationInCatchContext);
723 } 723 }
724 } 724 }
725 725
726 726
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2339 __ Push(Immediate(var->name())); 2339 __ Push(Immediate(var->name()));
2340 __ Push(eax); 2340 __ Push(eax);
2341 __ CallRuntime(is_strict(language_mode()) 2341 __ CallRuntime(is_strict(language_mode())
2342 ? Runtime::kStoreLookupSlot_Strict 2342 ? Runtime::kStoreLookupSlot_Strict
2343 : Runtime::kStoreLookupSlot_Sloppy); 2343 : Runtime::kStoreLookupSlot_Sloppy);
2344 } else { 2344 } else {
2345 // Assignment to var or initializing assignment to let/const in harmony 2345 // Assignment to var or initializing assignment to let/const in harmony
2346 // mode. 2346 // mode.
2347 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 2347 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
2348 MemOperand location = VarOperand(var, ecx); 2348 MemOperand location = VarOperand(var, ecx);
2349 if (generate_debug_code_ && var->mode() == LET && op == Token::INIT) { 2349 if (FLAG_debug_code && var->mode() == LET && op == Token::INIT) {
2350 // Check for an uninitialized let binding. 2350 // Check for an uninitialized let binding.
2351 __ mov(edx, location); 2351 __ mov(edx, location);
2352 __ cmp(edx, isolate()->factory()->the_hole_value()); 2352 __ cmp(edx, isolate()->factory()->the_hole_value());
2353 __ Check(equal, kLetBindingReInitialization); 2353 __ Check(equal, kLetBindingReInitialization);
2354 } 2354 }
2355 EmitStoreToStackLocalOrContextSlot(var, location); 2355 EmitStoreToStackLocalOrContextSlot(var, location);
2356 } 2356 }
2357 2357
2358 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { 2358 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) {
2359 // Const initializers need a write barrier. 2359 // Const initializers need a write barrier.
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
4150 Assembler::target_address_at(call_target_address, 4150 Assembler::target_address_at(call_target_address,
4151 unoptimized_code)); 4151 unoptimized_code));
4152 return OSR_AFTER_STACK_CHECK; 4152 return OSR_AFTER_STACK_CHECK;
4153 } 4153 }
4154 4154
4155 4155
4156 } // namespace internal 4156 } // namespace internal
4157 } // namespace v8 4157 } // namespace v8
4158 4158
4159 #endif // V8_TARGET_ARCH_X87 4159 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698