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