OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
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 2355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2366 // mode. | 2366 // mode. |
2367 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2367 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
2368 MemOperand location = VarOperand(var, x1); | 2368 MemOperand location = VarOperand(var, x1); |
2369 if (FLAG_debug_code && op == Token::INIT_LET) { | 2369 if (FLAG_debug_code && op == Token::INIT_LET) { |
2370 __ Ldr(x10, location); | 2370 __ Ldr(x10, location); |
2371 __ CompareRoot(x10, Heap::kTheHoleValueRootIndex); | 2371 __ CompareRoot(x10, Heap::kTheHoleValueRootIndex); |
2372 __ Check(eq, kLetBindingReInitialization); | 2372 __ Check(eq, kLetBindingReInitialization); |
2373 } | 2373 } |
2374 EmitStoreToStackLocalOrContextSlot(var, location); | 2374 EmitStoreToStackLocalOrContextSlot(var, location); |
2375 } | 2375 } |
| 2376 } else if (var->IsSignallingAssignmentToConst(op, strict_mode())) { |
| 2377 __ CallRuntime(Runtime::kThrowConstAssignError, 0); |
2376 } | 2378 } |
2377 // Non-initializing assignments to consts are ignored. | |
2378 } | 2379 } |
2379 | 2380 |
2380 | 2381 |
2381 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { | 2382 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
2382 ASM_LOCATION("FullCodeGenerator::EmitNamedPropertyAssignment"); | 2383 ASM_LOCATION("FullCodeGenerator::EmitNamedPropertyAssignment"); |
2383 // Assignment to a property, using a named store IC. | 2384 // Assignment to a property, using a named store IC. |
2384 Property* prop = expr->target()->AsProperty(); | 2385 Property* prop = expr->target()->AsProperty(); |
2385 DCHECK(prop != NULL); | 2386 DCHECK(prop != NULL); |
2386 DCHECK(prop->key()->IsLiteral()); | 2387 DCHECK(prop->key()->IsLiteral()); |
2387 | 2388 |
(...skipping 2890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5278 return previous_; | 5279 return previous_; |
5279 } | 5280 } |
5280 | 5281 |
5281 | 5282 |
5282 #undef __ | 5283 #undef __ |
5283 | 5284 |
5284 | 5285 |
5285 } } // namespace v8::internal | 5286 } } // namespace v8::internal |
5286 | 5287 |
5287 #endif // V8_TARGET_ARCH_ARM64 | 5288 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |