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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3008 void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { | 3008 void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { |
3009 ZoneList<Expression*>* args = expr->arguments(); | 3009 ZoneList<Expression*>* args = expr->arguments(); |
3010 DCHECK_EQ(1, args->length()); | 3010 DCHECK_EQ(1, args->length()); |
3011 VisitForAccumulatorValue(args->at(0)); | 3011 VisitForAccumulatorValue(args->at(0)); |
3012 __ AssertFunction(rax); | 3012 __ AssertFunction(rax); |
3013 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); | 3013 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); |
3014 __ movp(rax, FieldOperand(rax, Map::kPrototypeOffset)); | 3014 __ movp(rax, FieldOperand(rax, Map::kPrototypeOffset)); |
3015 context()->Plug(rax); | 3015 context()->Plug(rax); |
3016 } | 3016 } |
3017 | 3017 |
3018 void FullCodeGenerator::EmitGetOrdinaryHasInstance(CallRuntime* expr) { | |
3019 DCHECK_EQ(0, expr->arguments()->length()); | |
3020 __ LoadNativeContextSlot(Context::ORDINARY_HAS_INSTANCE_INDEX, rax); | |
3021 context()->Plug(rax); | |
3022 } | |
3023 | |
3024 void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) { | 3018 void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) { |
3025 DCHECK(expr->arguments()->length() == 0); | 3019 DCHECK(expr->arguments()->length() == 0); |
3026 ExternalReference debug_is_active = | 3020 ExternalReference debug_is_active = |
3027 ExternalReference::debug_is_active_address(isolate()); | 3021 ExternalReference::debug_is_active_address(isolate()); |
3028 __ Move(kScratchRegister, debug_is_active); | 3022 __ Move(kScratchRegister, debug_is_active); |
3029 __ movzxbp(rax, Operand(kScratchRegister, 0)); | 3023 __ movzxbp(rax, Operand(kScratchRegister, 0)); |
3030 __ Integer32ToSmi(rax, rax); | 3024 __ Integer32ToSmi(rax, rax); |
3031 context()->Plug(rax); | 3025 context()->Plug(rax); |
3032 } | 3026 } |
3033 | 3027 |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3811 DCHECK_EQ( | 3805 DCHECK_EQ( |
3812 isolate->builtins()->OnStackReplacement()->entry(), | 3806 isolate->builtins()->OnStackReplacement()->entry(), |
3813 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3807 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3814 return ON_STACK_REPLACEMENT; | 3808 return ON_STACK_REPLACEMENT; |
3815 } | 3809 } |
3816 | 3810 |
3817 } // namespace internal | 3811 } // namespace internal |
3818 } // namespace v8 | 3812 } // namespace v8 |
3819 | 3813 |
3820 #endif // V8_TARGET_ARCH_X64 | 3814 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |