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

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

Issue 985643003: [es6] Throw TypeError for computed static prototype property name (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Inline BuildThrowStaticPrototype Created 5 years, 9 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 | « 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 2565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 ObjectLiteral::Property* property = lit->properties()->at(i); 2576 ObjectLiteral::Property* property = lit->properties()->at(i);
2577 Expression* value = property->value(); 2577 Expression* value = property->value();
2578 2578
2579 if (property->is_static()) { 2579 if (property->is_static()) {
2580 __ ldr(scratch, MemOperand(sp, kPointerSize)); // constructor 2580 __ ldr(scratch, MemOperand(sp, kPointerSize)); // constructor
2581 } else { 2581 } else {
2582 __ ldr(scratch, MemOperand(sp, 0)); // prototype 2582 __ ldr(scratch, MemOperand(sp, 0)); // prototype
2583 } 2583 }
2584 __ push(scratch); 2584 __ push(scratch);
2585 EmitPropertyKey(property, lit->GetIdForProperty(i)); 2585 EmitPropertyKey(property, lit->GetIdForProperty(i));
2586
2587 // The static prototype property is read only. We handle the non computed
2588 // property name case in the parser. Since this is the only case where we
2589 // need to check for an own read only property we special case this so we do
2590 // not need to do this for every property.
2591 if (property->is_static() && property->is_computed_name()) {
2592 __ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
2593 __ push(r0);
2594 }
2595
2586 VisitForStackValue(value); 2596 VisitForStackValue(value);
2587 EmitSetHomeObjectIfNeeded(value, 2); 2597 EmitSetHomeObjectIfNeeded(value, 2);
2588 2598
2589 switch (property->kind()) { 2599 switch (property->kind()) {
2590 case ObjectLiteral::Property::CONSTANT: 2600 case ObjectLiteral::Property::CONSTANT:
2591 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2601 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2592 case ObjectLiteral::Property::PROTOTYPE: 2602 case ObjectLiteral::Property::PROTOTYPE:
2593 UNREACHABLE(); 2603 UNREACHABLE();
2594 case ObjectLiteral::Property::COMPUTED: 2604 case ObjectLiteral::Property::COMPUTED:
2595 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2605 __ CallRuntime(Runtime::kDefineClassMethod, 3);
(...skipping 2928 matching lines...) Expand 10 before | Expand all | Expand 10 after
5524 5534
5525 DCHECK(interrupt_address == 5535 DCHECK(interrupt_address ==
5526 isolate->builtins()->OsrAfterStackCheck()->entry()); 5536 isolate->builtins()->OsrAfterStackCheck()->entry());
5527 return OSR_AFTER_STACK_CHECK; 5537 return OSR_AFTER_STACK_CHECK;
5528 } 5538 }
5529 5539
5530 5540
5531 } } // namespace v8::internal 5541 } } // namespace v8::internal
5532 5542
5533 #endif // V8_TARGET_ARCH_ARM 5543 #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