Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 288213002: Refactor MacroAssembler::Prologue. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "code-stubs.h" 9 #include "code-stubs.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 __ bind(&ok); 151 __ bind(&ok);
152 } 152 }
153 153
154 // Open a frame scope to indicate that there is a frame on the stack. The 154 // Open a frame scope to indicate that there is a frame on the stack. The
155 // MANUAL indicates that the scope shouldn't actually generate code to set up 155 // MANUAL indicates that the scope shouldn't actually generate code to set up
156 // the frame (that is done below). 156 // the frame (that is done below).
157 FrameScope frame_scope(masm_, StackFrame::MANUAL); 157 FrameScope frame_scope(masm_, StackFrame::MANUAL);
158 158
159 info->set_prologue_offset(masm_->pc_offset()); 159 info->set_prologue_offset(masm_->pc_offset());
160 ASSERT(!info->IsStub()); 160 ASSERT(!info->IsStub());
161 __ Prologue(info); 161 __ Prologue(info->IsCodePreAgingActive());
162 info->AddNoFrameRange(0, masm_->pc_offset()); 162 info->AddNoFrameRange(0, masm_->pc_offset());
163 163
164 { Comment cmnt(masm_, "[ Allocate locals"); 164 { Comment cmnt(masm_, "[ Allocate locals");
165 int locals_count = info->scope()->num_stack_slots(); 165 int locals_count = info->scope()->num_stack_slots();
166 // Generators allocate locals, if any, in context slots. 166 // Generators allocate locals, if any, in context slots.
167 ASSERT(!info->function()->is_generator() || locals_count == 0); 167 ASSERT(!info->function()->is_generator() || locals_count == 0);
168 if (locals_count == 1) { 168 if (locals_count == 1) {
169 __ PushRoot(Heap::kUndefinedValueRootIndex); 169 __ PushRoot(Heap::kUndefinedValueRootIndex);
170 } else if (locals_count > 1) { 170 } else if (locals_count > 1) {
171 if (locals_count >= 128) { 171 if (locals_count >= 128) {
(...skipping 4629 matching lines...) Expand 10 before | Expand all | Expand 10 after
4801 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4801 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4802 Assembler::target_address_at(call_target_address, 4802 Assembler::target_address_at(call_target_address,
4803 unoptimized_code)); 4803 unoptimized_code));
4804 return OSR_AFTER_STACK_CHECK; 4804 return OSR_AFTER_STACK_CHECK;
4805 } 4805 }
4806 4806
4807 4807
4808 } } // namespace v8::internal 4808 } } // namespace v8::internal
4809 4809
4810 #endif // V8_TARGET_ARCH_X64 4810 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698