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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 Split(eq, a0, Operand(t0), if_true, if_false, NULL); 758 Split(eq, a0, Operand(t0), if_true, if_false, NULL);
759 __ bind(&skip); 759 __ bind(&skip);
760 } 760 }
761 } 761 }
762 762
763 763
764 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { 764 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) {
765 // The variable in the declaration always resides in the current function 765 // The variable in the declaration always resides in the current function
766 // context. 766 // context.
767 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); 767 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope()));
768 if (generate_debug_code_) { 768 if (FLAG_debug_code) {
769 // Check that we're not inside a with or catch context. 769 // Check that we're not inside a with or catch context.
770 __ lw(a1, FieldMemOperand(cp, HeapObject::kMapOffset)); 770 __ lw(a1, FieldMemOperand(cp, HeapObject::kMapOffset));
771 __ LoadRoot(t0, Heap::kWithContextMapRootIndex); 771 __ LoadRoot(t0, Heap::kWithContextMapRootIndex);
772 __ Check(ne, kDeclarationInWithContext, 772 __ Check(ne, kDeclarationInWithContext,
773 a1, Operand(t0)); 773 a1, Operand(t0));
774 __ LoadRoot(t0, Heap::kCatchContextMapRootIndex); 774 __ LoadRoot(t0, Heap::kCatchContextMapRootIndex);
775 __ Check(ne, kDeclarationInCatchContext, 775 __ Check(ne, kDeclarationInCatchContext,
776 a1, Operand(t0)); 776 a1, Operand(t0));
777 } 777 }
778 } 778 }
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 __ Push(var->name()); 2438 __ Push(var->name());
2439 __ Push(v0); 2439 __ Push(v0);
2440 __ CallRuntime(is_strict(language_mode()) 2440 __ CallRuntime(is_strict(language_mode())
2441 ? Runtime::kStoreLookupSlot_Strict 2441 ? Runtime::kStoreLookupSlot_Strict
2442 : Runtime::kStoreLookupSlot_Sloppy); 2442 : Runtime::kStoreLookupSlot_Sloppy);
2443 } else { 2443 } else {
2444 // Assignment to var or initializing assignment to let/const in harmony 2444 // Assignment to var or initializing assignment to let/const in harmony
2445 // mode. 2445 // mode.
2446 DCHECK((var->IsStackAllocated() || var->IsContextSlot())); 2446 DCHECK((var->IsStackAllocated() || var->IsContextSlot()));
2447 MemOperand location = VarOperand(var, a1); 2447 MemOperand location = VarOperand(var, a1);
2448 if (generate_debug_code_ && var->mode() == LET && op == Token::INIT) { 2448 if (FLAG_debug_code && var->mode() == LET && op == Token::INIT) {
2449 // Check for an uninitialized let binding. 2449 // Check for an uninitialized let binding.
2450 __ lw(a2, location); 2450 __ lw(a2, location);
2451 __ LoadRoot(t0, Heap::kTheHoleValueRootIndex); 2451 __ LoadRoot(t0, Heap::kTheHoleValueRootIndex);
2452 __ Check(eq, kLetBindingReInitialization, a2, Operand(t0)); 2452 __ Check(eq, kLetBindingReInitialization, a2, Operand(t0));
2453 } 2453 }
2454 EmitStoreToStackLocalOrContextSlot(var, location); 2454 EmitStoreToStackLocalOrContextSlot(var, location);
2455 } 2455 }
2456 2456
2457 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { 2457 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) {
2458 // Const initializers need a write barrier. 2458 // Const initializers need a write barrier.
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
4268 reinterpret_cast<uint32_t>( 4268 reinterpret_cast<uint32_t>(
4269 isolate->builtins()->OsrAfterStackCheck()->entry())); 4269 isolate->builtins()->OsrAfterStackCheck()->entry()));
4270 return OSR_AFTER_STACK_CHECK; 4270 return OSR_AFTER_STACK_CHECK;
4271 } 4271 }
4272 4272
4273 4273
4274 } // namespace internal 4274 } // namespace internal
4275 } // namespace v8 4275 } // namespace v8
4276 4276
4277 #endif // V8_TARGET_ARCH_MIPS 4277 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698