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

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

Issue 1376333003: Eliminate no_frame_range data (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h"
11 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
12 #include "src/full-codegen/full-codegen.h" 11 #include "src/full-codegen/full-codegen.h"
13 #include "src/ic/ic.h" 12 #include "src/ic/ic.h"
14 #include "src/parser.h" 13 #include "src/parser.h"
15 #include "src/scopes.h" 14 #include "src/scopes.h"
16 #include "src/x87/frames-x87.h" 15 #include "src/x87/frames-x87.h"
17 16
18 namespace v8 { 17 namespace v8 {
19 namespace internal { 18 namespace internal {
20 19
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 __ bind(&ok); 125 __ bind(&ok);
127 } 126 }
128 127
129 // Open a frame scope to indicate that there is a frame on the stack. The 128 // Open a frame scope to indicate that there is a frame on the stack. The
130 // MANUAL indicates that the scope shouldn't actually generate code to set up 129 // MANUAL indicates that the scope shouldn't actually generate code to set up
131 // the frame (that is done below). 130 // the frame (that is done below).
132 FrameScope frame_scope(masm_, StackFrame::MANUAL); 131 FrameScope frame_scope(masm_, StackFrame::MANUAL);
133 132
134 info->set_prologue_offset(masm_->pc_offset()); 133 info->set_prologue_offset(masm_->pc_offset());
135 __ Prologue(info->IsCodePreAgingActive()); 134 __ Prologue(info->IsCodePreAgingActive());
136 info->AddNoFrameRange(0, masm_->pc_offset());
137 135
138 { Comment cmnt(masm_, "[ Allocate locals"); 136 { Comment cmnt(masm_, "[ Allocate locals");
139 int locals_count = info->scope()->num_stack_slots(); 137 int locals_count = info->scope()->num_stack_slots();
140 // Generators allocate locals, if any, in context slots. 138 // Generators allocate locals, if any, in context slots.
141 DCHECK(!IsGeneratorFunction(literal()->kind()) || locals_count == 0); 139 DCHECK(!IsGeneratorFunction(literal()->kind()) || locals_count == 0);
142 if (locals_count == 1) { 140 if (locals_count == 1) {
143 __ push(Immediate(isolate()->factory()->undefined_value())); 141 __ push(Immediate(isolate()->factory()->undefined_value()));
144 } else if (locals_count > 1) { 142 } else if (locals_count > 1) {
145 if (locals_count >= 128) { 143 if (locals_count >= 128) {
146 Label ok; 144 Label ok;
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 Label ok; 424 Label ok;
427 __ j(positive, &ok, Label::kNear); 425 __ j(positive, &ok, Label::kNear);
428 __ push(eax); 426 __ push(eax);
429 __ call(isolate()->builtins()->InterruptCheck(), 427 __ call(isolate()->builtins()->InterruptCheck(),
430 RelocInfo::CODE_TARGET); 428 RelocInfo::CODE_TARGET);
431 __ pop(eax); 429 __ pop(eax);
432 EmitProfilingCounterReset(); 430 EmitProfilingCounterReset();
433 __ bind(&ok); 431 __ bind(&ok);
434 432
435 SetReturnPosition(literal()); 433 SetReturnPosition(literal());
436 int no_frame_start = masm_->pc_offset();
437 __ leave(); 434 __ leave();
438 435
439 int arg_count = info_->scope()->num_parameters() + 1; 436 int arg_count = info_->scope()->num_parameters() + 1;
440 int arguments_bytes = arg_count * kPointerSize; 437 int arguments_bytes = arg_count * kPointerSize;
441 __ Ret(arguments_bytes, ecx); 438 __ Ret(arguments_bytes, ecx);
442 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
443 } 439 }
444 } 440 }
445 441
446 442
447 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { 443 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const {
448 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 444 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
449 MemOperand operand = codegen()->VarOperand(var, result_register()); 445 MemOperand operand = codegen()->VarOperand(var, result_register());
450 // Memory operands can be pushed directly. 446 // Memory operands can be pushed directly.
451 __ push(operand); 447 __ push(operand);
452 } 448 }
(...skipping 4680 matching lines...) Expand 10 before | Expand all | Expand 10 after
5133 Assembler::target_address_at(call_target_address, 5129 Assembler::target_address_at(call_target_address,
5134 unoptimized_code)); 5130 unoptimized_code));
5135 return OSR_AFTER_STACK_CHECK; 5131 return OSR_AFTER_STACK_CHECK;
5136 } 5132 }
5137 5133
5138 5134
5139 } // namespace internal 5135 } // namespace internal
5140 } // namespace v8 5136 } // namespace v8
5141 5137
5142 #endif // V8_TARGET_ARCH_X87 5138 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698