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

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

Issue 749633002: harmony-scoping: make assignment to 'const' a late error. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment update Created 6 years 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 | « no previous file | src/arm64/full-codegen-arm64.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 DCHECK((var->IsStackAllocated() || var->IsContextSlot())); 2678 DCHECK((var->IsStackAllocated() || var->IsContextSlot()));
2679 MemOperand location = VarOperand(var, r1); 2679 MemOperand location = VarOperand(var, r1);
2680 if (generate_debug_code_ && op == Token::INIT_LET) { 2680 if (generate_debug_code_ && op == Token::INIT_LET) {
2681 // Check for an uninitialized let binding. 2681 // Check for an uninitialized let binding.
2682 __ ldr(r2, location); 2682 __ ldr(r2, location);
2683 __ CompareRoot(r2, Heap::kTheHoleValueRootIndex); 2683 __ CompareRoot(r2, Heap::kTheHoleValueRootIndex);
2684 __ Check(eq, kLetBindingReInitialization); 2684 __ Check(eq, kLetBindingReInitialization);
2685 } 2685 }
2686 EmitStoreToStackLocalOrContextSlot(var, location); 2686 EmitStoreToStackLocalOrContextSlot(var, location);
2687 } 2687 }
2688 } else if (IsSignallingAssignmentToConst(var, op, strict_mode())) {
2689 __ CallRuntime(Runtime::kThrowConstAssignError, 0);
2688 } 2690 }
2689 // Non-initializing assignments to consts are ignored.
2690 } 2691 }
2691 2692
2692 2693
2693 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { 2694 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
2694 // Assignment to a property, using a named store IC. 2695 // Assignment to a property, using a named store IC.
2695 Property* prop = expr->target()->AsProperty(); 2696 Property* prop = expr->target()->AsProperty();
2696 DCHECK(prop != NULL); 2697 DCHECK(prop != NULL);
2697 DCHECK(prop->key()->IsLiteral()); 2698 DCHECK(prop->key()->IsLiteral());
2698 2699
2699 // Record source code position before IC call. 2700 // Record source code position before IC call.
(...skipping 2598 matching lines...) Expand 10 before | Expand all | Expand 10 after
5298 5299
5299 DCHECK(interrupt_address == 5300 DCHECK(interrupt_address ==
5300 isolate->builtins()->OsrAfterStackCheck()->entry()); 5301 isolate->builtins()->OsrAfterStackCheck()->entry());
5301 return OSR_AFTER_STACK_CHECK; 5302 return OSR_AFTER_STACK_CHECK;
5302 } 5303 }
5303 5304
5304 5305
5305 } } // namespace v8::internal 5306 } } // namespace v8::internal
5306 5307
5307 #endif // V8_TARGET_ARCH_ARM 5308 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698