OLD | NEW |
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 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2456 Literal* key = property->key()->AsLiteral(); | 2456 Literal* key = property->key()->AsLiteral(); |
2457 Expression* value = property->value(); | 2457 Expression* value = property->value(); |
2458 DCHECK(key != NULL); | 2458 DCHECK(key != NULL); |
2459 | 2459 |
2460 if (property->is_static()) { | 2460 if (property->is_static()) { |
2461 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor | 2461 __ ld(scratch, MemOperand(sp, kPointerSize)); // constructor |
2462 } else { | 2462 } else { |
2463 __ ld(scratch, MemOperand(sp, 0)); // prototype | 2463 __ ld(scratch, MemOperand(sp, 0)); // prototype |
2464 } | 2464 } |
2465 __ push(scratch); | 2465 __ push(scratch); |
2466 VisitForStackValue(key); | 2466 EmitPropertyKey(property); |
2467 VisitForStackValue(value); | 2467 VisitForStackValue(value); |
2468 EmitSetHomeObjectIfNeeded(value, 2); | 2468 EmitSetHomeObjectIfNeeded(value, 2); |
2469 | 2469 |
2470 switch (property->kind()) { | 2470 switch (property->kind()) { |
2471 case ObjectLiteral::Property::CONSTANT: | 2471 case ObjectLiteral::Property::CONSTANT: |
2472 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 2472 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
2473 case ObjectLiteral::Property::COMPUTED: | 2473 case ObjectLiteral::Property::COMPUTED: |
2474 case ObjectLiteral::Property::PROTOTYPE: | 2474 case ObjectLiteral::Property::PROTOTYPE: |
2475 __ CallRuntime(Runtime::kDefineClassMethod, 3); | 2475 __ CallRuntime(Runtime::kDefineClassMethod, 3); |
2476 break; | 2476 break; |
2477 | 2477 |
2478 case ObjectLiteral::Property::GETTER: | 2478 case ObjectLiteral::Property::GETTER: |
2479 __ CallRuntime(Runtime::kDefineClassGetter, 3); | 2479 __ CallRuntime(Runtime::kDefineGetterPropertyUnchecked, 3); |
2480 break; | 2480 break; |
2481 | 2481 |
2482 case ObjectLiteral::Property::SETTER: | 2482 case ObjectLiteral::Property::SETTER: |
2483 __ CallRuntime(Runtime::kDefineClassSetter, 3); | 2483 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 3); |
2484 break; | 2484 break; |
2485 | 2485 |
2486 default: | 2486 default: |
2487 UNREACHABLE(); | 2487 UNREACHABLE(); |
2488 } | 2488 } |
2489 } | 2489 } |
2490 | 2490 |
2491 // prototype | 2491 // prototype |
2492 __ CallRuntime(Runtime::kToFastProperties, 1); | 2492 __ CallRuntime(Runtime::kToFastProperties, 1); |
2493 | 2493 |
(...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5241 Assembler::target_address_at(pc_immediate_load_address)) == | 5241 Assembler::target_address_at(pc_immediate_load_address)) == |
5242 reinterpret_cast<uint64_t>( | 5242 reinterpret_cast<uint64_t>( |
5243 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5243 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5244 return OSR_AFTER_STACK_CHECK; | 5244 return OSR_AFTER_STACK_CHECK; |
5245 } | 5245 } |
5246 | 5246 |
5247 | 5247 |
5248 } } // namespace v8::internal | 5248 } } // namespace v8::internal |
5249 | 5249 |
5250 #endif // V8_TARGET_ARCH_MIPS64 | 5250 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |