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

Side by Side Diff: src/mips/full-codegen-mips.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 | « no previous file | src/mips64/full-codegen-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after
2555 ObjectLiteral::Property* property = lit->properties()->at(i); 2555 ObjectLiteral::Property* property = lit->properties()->at(i);
2556 Expression* value = property->value(); 2556 Expression* value = property->value();
2557 2557
2558 if (property->is_static()) { 2558 if (property->is_static()) {
2559 __ lw(scratch, MemOperand(sp, kPointerSize)); // constructor 2559 __ lw(scratch, MemOperand(sp, kPointerSize)); // constructor
2560 } else { 2560 } else {
2561 __ lw(scratch, MemOperand(sp, 0)); // prototype 2561 __ lw(scratch, MemOperand(sp, 0)); // prototype
2562 } 2562 }
2563 __ push(scratch); 2563 __ push(scratch);
2564 EmitPropertyKey(property, lit->GetIdForProperty(i)); 2564 EmitPropertyKey(property, lit->GetIdForProperty(i));
2565
2566 // The static prototype property is read only. We handle the non computed
2567 // property name case in the parser. Since this is the only case where we
2568 // need to check for an own read only property we special case this so we do
2569 // not need to do this for every property.
2570 if (property->is_static() && property->is_computed_name()) {
2571 __ CallRuntime(Runtime::kThrowIfStaticPrototype, 1);
2572 __ push(v0);
2573 }
2574
2565 VisitForStackValue(value); 2575 VisitForStackValue(value);
2566 EmitSetHomeObjectIfNeeded(value, 2); 2576 EmitSetHomeObjectIfNeeded(value, 2);
2567 2577
2568 switch (property->kind()) { 2578 switch (property->kind()) {
2569 case ObjectLiteral::Property::CONSTANT: 2579 case ObjectLiteral::Property::CONSTANT:
2570 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2580 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2571 case ObjectLiteral::Property::PROTOTYPE: 2581 case ObjectLiteral::Property::PROTOTYPE:
2572 UNREACHABLE(); 2582 UNREACHABLE();
2573 case ObjectLiteral::Property::COMPUTED: 2583 case ObjectLiteral::Property::COMPUTED:
2574 __ CallRuntime(Runtime::kDefineClassMethod, 3); 2584 __ CallRuntime(Runtime::kDefineClassMethod, 3);
(...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
5466 Assembler::target_address_at(pc_immediate_load_address)) == 5476 Assembler::target_address_at(pc_immediate_load_address)) ==
5467 reinterpret_cast<uint32_t>( 5477 reinterpret_cast<uint32_t>(
5468 isolate->builtins()->OsrAfterStackCheck()->entry())); 5478 isolate->builtins()->OsrAfterStackCheck()->entry()));
5469 return OSR_AFTER_STACK_CHECK; 5479 return OSR_AFTER_STACK_CHECK;
5470 } 5480 }
5471 5481
5472 5482
5473 } } // namespace v8::internal 5483 } } // namespace v8::internal
5474 5484
5475 #endif // V8_TARGET_ARCH_MIPS 5485 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698