| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // frames-x64.h for its layout. | 91 // frames-x64.h for its layout. |
| 92 void FullCodeGenerator::Generate() { | 92 void FullCodeGenerator::Generate() { |
| 93 CompilationInfo* info = info_; | 93 CompilationInfo* info = info_; |
| 94 profiling_counter_ = isolate()->factory()->NewCell( | 94 profiling_counter_ = isolate()->factory()->NewCell( |
| 95 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); | 95 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); |
| 96 SetFunctionPosition(literal()); | 96 SetFunctionPosition(literal()); |
| 97 Comment cmnt(masm_, "[ function compiled by full code generator"); | 97 Comment cmnt(masm_, "[ function compiled by full code generator"); |
| 98 | 98 |
| 99 ProfileEntryHookStub::MaybeCallEntryHook(masm_); | 99 ProfileEntryHookStub::MaybeCallEntryHook(masm_); |
| 100 | 100 |
| 101 #ifdef DEBUG | |
| 102 if (strlen(FLAG_stop_at) > 0 && | |
| 103 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { | |
| 104 __ int3(); | |
| 105 } | |
| 106 #endif | |
| 107 | |
| 108 if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) { | 101 if (FLAG_debug_code && info->ExpectsJSReceiverAsReceiver()) { |
| 109 StackArgumentsAccessor args(rsp, info->scope()->num_parameters()); | 102 StackArgumentsAccessor args(rsp, info->scope()->num_parameters()); |
| 110 __ movp(rcx, args.GetReceiverOperand()); | 103 __ movp(rcx, args.GetReceiverOperand()); |
| 111 __ AssertNotSmi(rcx); | 104 __ AssertNotSmi(rcx); |
| 112 __ CmpObjectType(rcx, FIRST_JS_RECEIVER_TYPE, rcx); | 105 __ CmpObjectType(rcx, FIRST_JS_RECEIVER_TYPE, rcx); |
| 113 __ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver); | 106 __ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver); |
| 114 } | 107 } |
| 115 | 108 |
| 116 // Open a frame scope to indicate that there is a frame on the stack. The | 109 // Open a frame scope to indicate that there is a frame on the stack. The |
| 117 // MANUAL indicates that the scope shouldn't actually generate code to set up | 110 // MANUAL indicates that the scope shouldn't actually generate code to set up |
| (...skipping 4495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4613 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4606 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4614 Assembler::target_address_at(call_target_address, | 4607 Assembler::target_address_at(call_target_address, |
| 4615 unoptimized_code)); | 4608 unoptimized_code)); |
| 4616 return OSR_AFTER_STACK_CHECK; | 4609 return OSR_AFTER_STACK_CHECK; |
| 4617 } | 4610 } |
| 4618 | 4611 |
| 4619 } // namespace internal | 4612 } // namespace internal |
| 4620 } // namespace v8 | 4613 } // namespace v8 |
| 4621 | 4614 |
| 4622 #endif // V8_TARGET_ARCH_X64 | 4615 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |