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 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2551 __ li(a0, Operand(Smi::FromInt(DONT_ENUM))); | 2551 __ li(a0, Operand(Smi::FromInt(DONT_ENUM))); |
2552 __ push(a0); | 2552 __ push(a0); |
2553 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4); | 2553 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4); |
2554 break; | 2554 break; |
2555 | 2555 |
2556 default: | 2556 default: |
2557 UNREACHABLE(); | 2557 UNREACHABLE(); |
2558 } | 2558 } |
2559 } | 2559 } |
2560 | 2560 |
2561 // prototype | 2561 // Set both the prototype and constructor to have fast properties, and also |
2562 __ CallRuntime(Runtime::kToFastProperties, 1); | 2562 // freeze them in strong mode. |
2563 | 2563 __ CallRuntime(is_strong(language_mode()) |
2564 // constructor | 2564 ? Runtime::kFinalizeClassDefinitionStrong |
2565 __ CallRuntime(Runtime::kToFastProperties, 1); | 2565 : Runtime::kFinalizeClassDefinition, |
2566 | 2566 2); |
2567 if (is_strong(language_mode())) { | |
2568 __ ld(scratch, | |
2569 FieldMemOperand(v0, JSFunction::kPrototypeOrInitialMapOffset)); | |
2570 __ Push(v0, scratch); | |
2571 // TODO(conradw): It would be more efficient to define the properties with | |
2572 // the right attributes the first time round. | |
2573 // Freeze the prototype. | |
2574 __ CallRuntime(Runtime::kObjectFreeze, 1); | |
2575 // Freeze the constructor. | |
2576 __ CallRuntime(Runtime::kObjectFreeze, 1); | |
2577 } | |
2578 } | 2567 } |
2579 | 2568 |
2580 | 2569 |
2581 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { | 2570 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { |
2582 __ mov(a0, result_register()); | 2571 __ mov(a0, result_register()); |
2583 __ pop(a1); | 2572 __ pop(a1); |
2584 Handle<Code> code = | 2573 Handle<Code> code = |
2585 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); | 2574 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); |
2586 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. | 2575 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
2587 CallIC(code, expr->BinaryOperationFeedbackId()); | 2576 CallIC(code, expr->BinaryOperationFeedbackId()); |
(...skipping 2847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5435 reinterpret_cast<uint64_t>( | 5424 reinterpret_cast<uint64_t>( |
5436 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5425 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5437 return OSR_AFTER_STACK_CHECK; | 5426 return OSR_AFTER_STACK_CHECK; |
5438 } | 5427 } |
5439 | 5428 |
5440 | 5429 |
5441 } // namespace internal | 5430 } // namespace internal |
5442 } // namespace v8 | 5431 } // namespace v8 |
5443 | 5432 |
5444 #endif // V8_TARGET_ARCH_MIPS64 | 5433 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |