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

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

Issue 993963003: MIPS: [es6] Throw TypeError for computed static prototype property name (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/mips/full-codegen-mips.cc ('k') | no next file » | 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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 ObjectLiteral::Property* property = lit->properties()->at(i); 2553 ObjectLiteral::Property* property = lit->properties()->at(i);
2554 Expression* value = property->value(); 2554 Expression* value = property->value();
2555 2555
2556 if (property->is_static()) { 2556 if (property->is_static()) {
2557 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor 2557 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor
2558 } else { 2558 } else {
2559 __ ld(scratch, MemOperand(sp, 0)); // prototype 2559 __ ld(scratch, MemOperand(sp, 0)); // prototype
2560 } 2560 }
2561 __ push(scratch); 2561 __ push(scratch);
2562 EmitPropertyKey(property, lit->GetIdForProperty(i)); 2562 EmitPropertyKey(property, lit->GetIdForProperty(i));
2563
2564 // The static prototype property is read only. We handle the non computed
2565 // property name case in the parser. Since this is the only case where we
2566 // need to check for an own read only property we special case this so we do
2567 // not need to do this for every property.
2568 if (property->is_static() && property->is_computed_name()) {
2569 __ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
2570 __ push(v0);
2571 }
2572
2563 VisitForStackValue(value); 2573 VisitForStackValue(value);
2564 EmitSetHomeObjectIfNeeded(value, 2); 2574 EmitSetHomeObjectIfNeeded(value, 2);
2565 2575
2566 switch (property->kind()) { 2576 switch (property->kind()) {
2567 case ObjectLiteral::Property::CONSTANT: 2577 case ObjectLiteral::Property::CONSTANT:
2568 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2578 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2569 case ObjectLiteral::Property::PROTOTYPE: 2579 case ObjectLiteral::Property::PROTOTYPE:
2570 UNREACHABLE(); 2580 UNREACHABLE();
2571 case ObjectLiteral::Property::COMPUTED: 2581 case ObjectLiteral::Property::COMPUTED:
2572 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2582 __ CallRuntime(Runtime::kDefineClassMethod, 3);
(...skipping 2900 matching lines...) Expand 10 before | Expand all | Expand 10 after
5473 Assembler::target_address_at(pc_immediate_load_address)) == 5483 Assembler::target_address_at(pc_immediate_load_address)) ==
5474 reinterpret_cast<uint64_t>( 5484 reinterpret_cast<uint64_t>(
5475 isolate->builtins()->OsrAfterStackCheck()->entry())); 5485 isolate->builtins()->OsrAfterStackCheck()->entry()));
5476 return OSR_AFTER_STACK_CHECK; 5486 return OSR_AFTER_STACK_CHECK;
5477 } 5487 }
5478 5488
5479 5489
5480 } } // namespace v8::internal 5490 } } // namespace v8::internal
5481 5491
5482 #endif // V8_TARGET_ARCH_MIPS64 5492 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698