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