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

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

Issue 1301583005: Rename ParserInfo::function() and CompilationInfo::function() to literal(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 CompilationInfo* info = info_; 113 CompilationInfo* info = info_;
114 profiling_counter_ = isolate()->factory()->NewCell( 114 profiling_counter_ = isolate()->factory()->NewCell(
115 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); 115 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate()));
116 SetFunctionPosition(function()); 116 SetFunctionPosition(function());
117 Comment cmnt(masm_, "[ function compiled by full code generator"); 117 Comment cmnt(masm_, "[ function compiled by full code generator");
118 118
119 ProfileEntryHookStub::MaybeCallEntryHook(masm_); 119 ProfileEntryHookStub::MaybeCallEntryHook(masm_);
120 120
121 #ifdef DEBUG 121 #ifdef DEBUG
122 if (strlen(FLAG_stop_at) > 0 && 122 if (strlen(FLAG_stop_at) > 0 &&
123 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 123 info->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
124 __ stop("stop-at"); 124 __ stop("stop-at");
125 } 125 }
126 #endif 126 #endif
127 127
128 // Sloppy mode functions and builtins need to replace the receiver with the 128 // Sloppy mode functions and builtins need to replace the receiver with the
129 // global proxy when called as functions (without an explicit receiver 129 // global proxy when called as functions (without an explicit receiver
130 // object). 130 // object).
131 if (is_sloppy(info->language_mode()) && !info->is_native() && 131 if (is_sloppy(info->language_mode()) && !info->is_native() &&
132 info->MayUseThis() && info->scope()->has_this_declaration()) { 132 info->MayUseThis() && info->scope()->has_this_declaration()) {
133 Label ok; 133 Label ok;
(...skipping 12 matching lines...) Expand all
146 // MANUAL indicates that the scope shouldn't actually generate code to set up 146 // MANUAL indicates that the scope shouldn't actually generate code to set up
147 // the frame (that is done below). 147 // the frame (that is done below).
148 FrameScope frame_scope(masm_, StackFrame::MANUAL); 148 FrameScope frame_scope(masm_, StackFrame::MANUAL);
149 info->set_prologue_offset(masm_->pc_offset()); 149 info->set_prologue_offset(masm_->pc_offset());
150 __ Prologue(info->IsCodePreAgingActive()); 150 __ Prologue(info->IsCodePreAgingActive());
151 info->AddNoFrameRange(0, masm_->pc_offset()); 151 info->AddNoFrameRange(0, masm_->pc_offset());
152 152
153 { Comment cmnt(masm_, "[ Allocate locals"); 153 { Comment cmnt(masm_, "[ Allocate locals");
154 int locals_count = info->scope()->num_stack_slots(); 154 int locals_count = info->scope()->num_stack_slots();
155 // Generators allocate locals, if any, in context slots. 155 // Generators allocate locals, if any, in context slots.
156 DCHECK(!IsGeneratorFunction(info->function()->kind()) || locals_count == 0); 156 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0);
157 if (locals_count > 0) { 157 if (locals_count > 0) {
158 if (locals_count >= 128) { 158 if (locals_count >= 128) {
159 Label ok; 159 Label ok;
160 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize)); 160 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize));
161 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); 161 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex);
162 __ Branch(&ok, hs, t1, Operand(a2)); 162 __ Branch(&ok, hs, t1, Operand(a2));
163 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); 163 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION);
164 __ bind(&ok); 164 __ bind(&ok);
165 } 165 }
166 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex); 166 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex);
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 // 1469 //
1470 // The condition on the declaration scopes is a conservative check for 1470 // The condition on the declaration scopes is a conservative check for
1471 // nested functions that access a binding and are called before the 1471 // nested functions that access a binding and are called before the
1472 // binding is initialized: 1472 // binding is initialized:
1473 // function() { f(); let x = 1; function f() { x = 2; } } 1473 // function() { f(); let x = 1; function f() { x = 2; } }
1474 // 1474 //
1475 bool skip_init_check; 1475 bool skip_init_check;
1476 if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) { 1476 if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) {
1477 skip_init_check = false; 1477 skip_init_check = false;
1478 } else if (var->is_this()) { 1478 } else if (var->is_this()) {
1479 CHECK(info_->function() != nullptr && 1479 CHECK(info_->has_literal() &&
1480 (info_->function()->kind() & kSubclassConstructor) != 0); 1480 (info_->literal()->kind() & kSubclassConstructor) != 0);
1481 // TODO(dslomov): implement 'this' hole check elimination. 1481 // TODO(dslomov): implement 'this' hole check elimination.
1482 skip_init_check = false; 1482 skip_init_check = false;
1483 } else { 1483 } else {
1484 // Check that we always have valid source position. 1484 // Check that we always have valid source position.
1485 DCHECK(var->initializer_position() != RelocInfo::kNoPosition); 1485 DCHECK(var->initializer_position() != RelocInfo::kNoPosition);
1486 DCHECK(proxy->position() != RelocInfo::kNoPosition); 1486 DCHECK(proxy->position() != RelocInfo::kNoPosition);
1487 skip_init_check = var->mode() != CONST_LEGACY && 1487 skip_init_check = var->mode() != CONST_LEGACY &&
1488 var->initializer_position() < proxy->position(); 1488 var->initializer_position() < proxy->position();
1489 } 1489 }
1490 1490
(...skipping 3891 matching lines...) Expand 10 before | Expand all | Expand 10 after
5382 reinterpret_cast<uint64_t>( 5382 reinterpret_cast<uint64_t>(
5383 isolate->builtins()->OsrAfterStackCheck()->entry())); 5383 isolate->builtins()->OsrAfterStackCheck()->entry()));
5384 return OSR_AFTER_STACK_CHECK; 5384 return OSR_AFTER_STACK_CHECK;
5385 } 5385 }
5386 5386
5387 5387
5388 } // namespace internal 5388 } // namespace internal
5389 } // namespace v8 5389 } // namespace v8
5390 5390
5391 #endif // V8_TARGET_ARCH_MIPS64 5391 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698