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

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

Issue 691503002: MIPS: Classes: Add super support in methods and accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« 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 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 Expression* value = property->value(); 2500 Expression* value = property->value();
2501 DCHECK(key != NULL); 2501 DCHECK(key != NULL);
2502 2502
2503 if (property->is_static()) { 2503 if (property->is_static()) {
2504 __ lw(scratch, MemOperand(sp, kPointerSize)); // constructor 2504 __ lw(scratch, MemOperand(sp, kPointerSize)); // constructor
2505 } else { 2505 } else {
2506 __ lw(scratch, MemOperand(sp, 0)); // prototype 2506 __ lw(scratch, MemOperand(sp, 0)); // prototype
2507 } 2507 }
2508 __ push(scratch); 2508 __ push(scratch);
2509 VisitForStackValue(key); 2509 VisitForStackValue(key);
2510 VisitForStackValue(value);
2510 2511
2511 switch (property->kind()) { 2512 switch (property->kind()) {
2512 case ObjectLiteral::Property::CONSTANT: 2513 case ObjectLiteral::Property::CONSTANT:
2513 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 2514 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
2514 case ObjectLiteral::Property::COMPUTED: 2515 case ObjectLiteral::Property::COMPUTED:
2515 case ObjectLiteral::Property::PROTOTYPE: 2516 case ObjectLiteral::Property::PROTOTYPE:
2516 VisitForStackValue(value); 2517 __ CallRuntime(Runtime::kDefineClassMethod, 3);
2517 __ li(scratch, Operand(Smi::FromInt(NONE)));
2518 __ push(scratch);
2519 __ CallRuntime(Runtime::kDefineDataPropertyUnchecked, 4);
2520 break; 2518 break;
2521 2519
2522 case ObjectLiteral::Property::GETTER: 2520 case ObjectLiteral::Property::GETTER:
2523 VisitForStackValue(value); 2521 __ CallRuntime(Runtime::kDefineClassGetter, 3);
2524 __ LoadRoot(scratch, Heap::kNullValueRootIndex);
2525 __ push(scratch);
2526 __ li(scratch, Operand(Smi::FromInt(NONE)));
2527 __ push(scratch);
2528 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
2529 break; 2522 break;
2530 2523
2531 case ObjectLiteral::Property::SETTER: 2524 case ObjectLiteral::Property::SETTER:
2532 __ LoadRoot(scratch, Heap::kNullValueRootIndex); 2525 __ CallRuntime(Runtime::kDefineClassSetter, 3);
2533 __ push(scratch);
2534 VisitForStackValue(value);
2535 __ li(scratch, Operand(Smi::FromInt(NONE)));
2536 __ push(scratch);
2537 __ CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
2538 break; 2526 break;
2539 2527
2540 default: 2528 default:
2541 UNREACHABLE(); 2529 UNREACHABLE();
2542 } 2530 }
2543 } 2531 }
2544 2532
2545 // prototype 2533 // prototype
2546 __ CallRuntime(Runtime::kToFastProperties, 1); 2534 __ CallRuntime(Runtime::kToFastProperties, 1);
2547 2535
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after
5288 Assembler::target_address_at(pc_immediate_load_address)) == 5276 Assembler::target_address_at(pc_immediate_load_address)) ==
5289 reinterpret_cast<uint32_t>( 5277 reinterpret_cast<uint32_t>(
5290 isolate->builtins()->OsrAfterStackCheck()->entry())); 5278 isolate->builtins()->OsrAfterStackCheck()->entry()));
5291 return OSR_AFTER_STACK_CHECK; 5279 return OSR_AFTER_STACK_CHECK;
5292 } 5280 }
5293 5281
5294 5282
5295 } } // namespace v8::internal 5283 } } // namespace v8::internal
5296 5284
5297 #endif // V8_TARGET_ARCH_MIPS 5285 #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