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_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2567 __ mov(r0, Operand(Smi::FromInt(DONT_ENUM))); | 2567 __ mov(r0, Operand(Smi::FromInt(DONT_ENUM))); |
2568 __ push(r0); | 2568 __ push(r0); |
2569 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4); | 2569 __ CallRuntime(Runtime::kDefineSetterPropertyUnchecked, 4); |
2570 break; | 2570 break; |
2571 | 2571 |
2572 default: | 2572 default: |
2573 UNREACHABLE(); | 2573 UNREACHABLE(); |
2574 } | 2574 } |
2575 } | 2575 } |
2576 | 2576 |
2577 // prototype | 2577 // Set both the prototype and constructor to have fast properties, and also |
2578 __ CallRuntime(Runtime::kToFastProperties, 1); | 2578 // freeze them in strong mode. |
2579 | 2579 __ CallRuntime(is_strong(language_mode()) |
2580 // constructor | 2580 ? Runtime::kFinalizeClassDefinitionStrong |
2581 __ CallRuntime(Runtime::kToFastProperties, 1); | 2581 : Runtime::kFinalizeClassDefinition, |
2582 | 2582 2); |
2583 if (is_strong(language_mode())) { | |
2584 __ ldr(scratch, | |
2585 FieldMemOperand(r0, JSFunction::kPrototypeOrInitialMapOffset)); | |
2586 __ push(r0); | |
2587 __ push(scratch); | |
2588 // TODO(conradw): It would be more efficient to define the properties with | |
2589 // the right attributes the first time round. | |
2590 // Freeze the prototype. | |
2591 __ CallRuntime(Runtime::kObjectFreeze, 1); | |
2592 // Freeze the constructor. | |
2593 __ CallRuntime(Runtime::kObjectFreeze, 1); | |
2594 } | |
2595 } | 2583 } |
2596 | 2584 |
2597 | 2585 |
2598 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { | 2586 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { |
2599 __ pop(r1); | 2587 __ pop(r1); |
2600 Handle<Code> code = | 2588 Handle<Code> code = |
2601 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); | 2589 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); |
2602 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. | 2590 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
2603 CallIC(code, expr->BinaryOperationFeedbackId()); | 2591 CallIC(code, expr->BinaryOperationFeedbackId()); |
2604 patch_site.EmitPatchInfo(); | 2592 patch_site.EmitPatchInfo(); |
(...skipping 2864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5469 DCHECK(interrupt_address == | 5457 DCHECK(interrupt_address == |
5470 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5458 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5471 return OSR_AFTER_STACK_CHECK; | 5459 return OSR_AFTER_STACK_CHECK; |
5472 } | 5460 } |
5473 | 5461 |
5474 | 5462 |
5475 } // namespace internal | 5463 } // namespace internal |
5476 } // namespace v8 | 5464 } // namespace v8 |
5477 | 5465 |
5478 #endif // V8_TARGET_ARCH_ARM | 5466 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |