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