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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 Split(eq, if_true, if_false, NULL); 729 Split(eq, if_true, if_false, NULL);
730 __ bind(&skip); 730 __ bind(&skip);
731 } 731 }
732 } 732 }
733 733
734 734
735 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) { 735 void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) {
736 // The variable in the declaration always resides in the current function 736 // The variable in the declaration always resides in the current function
737 // context. 737 // context.
738 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope())); 738 DCHECK_EQ(0, scope()->ContextChainLength(variable->scope()));
739 if (generate_debug_code_) { 739 if (FLAG_debug_code) {
740 // Check that we're not inside a with or catch context. 740 // Check that we're not inside a with or catch context.
741 __ LoadP(r4, FieldMemOperand(cp, HeapObject::kMapOffset)); 741 __ LoadP(r4, FieldMemOperand(cp, HeapObject::kMapOffset));
742 __ CompareRoot(r4, Heap::kWithContextMapRootIndex); 742 __ CompareRoot(r4, Heap::kWithContextMapRootIndex);
743 __ Check(ne, kDeclarationInWithContext); 743 __ Check(ne, kDeclarationInWithContext);
744 __ CompareRoot(r4, Heap::kCatchContextMapRootIndex); 744 __ CompareRoot(r4, Heap::kCatchContextMapRootIndex);
745 __ Check(ne, kDeclarationInCatchContext); 745 __ Check(ne, kDeclarationInCatchContext);
746 } 746 }
747 } 747 }
748 748
749 749
(...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after
2449 __ Push(var->name()); 2449 __ Push(var->name());
2450 __ Push(r3); 2450 __ Push(r3);
2451 __ CallRuntime(is_strict(language_mode()) 2451 __ CallRuntime(is_strict(language_mode())
2452 ? Runtime::kStoreLookupSlot_Strict 2452 ? Runtime::kStoreLookupSlot_Strict
2453 : Runtime::kStoreLookupSlot_Sloppy); 2453 : Runtime::kStoreLookupSlot_Sloppy);
2454 } else { 2454 } else {
2455 // Assignment to var or initializing assignment to let/const in harmony 2455 // Assignment to var or initializing assignment to let/const in harmony
2456 // mode. 2456 // mode.
2457 DCHECK((var->IsStackAllocated() || var->IsContextSlot())); 2457 DCHECK((var->IsStackAllocated() || var->IsContextSlot()));
2458 MemOperand location = VarOperand(var, r4); 2458 MemOperand location = VarOperand(var, r4);
2459 if (generate_debug_code_ && var->mode() == LET && op == Token::INIT) { 2459 if (FLAG_debug_code && var->mode() == LET && op == Token::INIT) {
2460 // Check for an uninitialized let binding. 2460 // Check for an uninitialized let binding.
2461 __ LoadP(r5, location); 2461 __ LoadP(r5, location);
2462 __ CompareRoot(r5, Heap::kTheHoleValueRootIndex); 2462 __ CompareRoot(r5, Heap::kTheHoleValueRootIndex);
2463 __ Check(eq, kLetBindingReInitialization); 2463 __ Check(eq, kLetBindingReInitialization);
2464 } 2464 }
2465 EmitStoreToStackLocalOrContextSlot(var, location); 2465 EmitStoreToStackLocalOrContextSlot(var, location);
2466 } 2466 }
2467 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) { 2467 } else if (var->mode() == CONST_LEGACY && op == Token::INIT) {
2468 // Const initializers need a write barrier. 2468 // Const initializers need a write barrier.
2469 DCHECK(!var->IsParameter()); // No const parameters. 2469 DCHECK(!var->IsParameter()); // No const parameters.
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
4232 return ON_STACK_REPLACEMENT; 4232 return ON_STACK_REPLACEMENT;
4233 } 4233 }
4234 4234
4235 DCHECK(interrupt_address == 4235 DCHECK(interrupt_address ==
4236 isolate->builtins()->OsrAfterStackCheck()->entry()); 4236 isolate->builtins()->OsrAfterStackCheck()->entry());
4237 return OSR_AFTER_STACK_CHECK; 4237 return OSR_AFTER_STACK_CHECK;
4238 } 4238 }
4239 } // namespace internal 4239 } // namespace internal
4240 } // namespace v8 4240 } // namespace v8
4241 #endif // V8_TARGET_ARCH_PPC 4241 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698