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

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

Issue 1819123002: Remove support for legacy const, part 1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased, deleted one more file Created 4 years, 9 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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 SetVar(arguments, v0, a1, a2); 299 SetVar(arguments, v0, a1, a2);
300 } 300 }
301 301
302 if (FLAG_trace) { 302 if (FLAG_trace) {
303 __ CallRuntime(Runtime::kTraceEnter); 303 __ CallRuntime(Runtime::kTraceEnter);
304 } 304 }
305 305
306 // Visit the declarations and body unless there is an illegal 306 // Visit the declarations and body unless there is an illegal
307 // redeclaration. 307 // redeclaration.
308 if (scope()->HasIllegalRedeclaration()) { 308 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);
309 EmitIllegalRedeclaration(); 309 {
310 } else { 310 Comment cmnt(masm_, "[ Declarations");
311 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); 311 VisitDeclarations(scope()->declarations());
312 { Comment cmnt(masm_, "[ Declarations"); 312 }
313 VisitDeclarations(scope()->declarations());
314 }
315 313
316 // Assert that the declarations do not use ICs. Otherwise the debugger 314 // Assert that the declarations do not use ICs. Otherwise the debugger
317 // won't be able to redirect a PC at an IC to the correct IC in newly 315 // won't be able to redirect a PC at an IC to the correct IC in newly
318 // recompiled code. 316 // recompiled code.
319 DCHECK_EQ(0, ic_total_count_); 317 DCHECK_EQ(0, ic_total_count_);
320 318
321 { Comment cmnt(masm_, "[ Stack check"); 319 {
322 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); 320 Comment cmnt(masm_, "[ Stack check");
323 Label ok; 321 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS);
324 __ LoadRoot(at, Heap::kStackLimitRootIndex); 322 Label ok;
325 __ Branch(&ok, hs, sp, Operand(at)); 323 __ LoadRoot(at, Heap::kStackLimitRootIndex);
326 Handle<Code> stack_check = isolate()->builtins()->StackCheck(); 324 __ Branch(&ok, hs, sp, Operand(at));
327 PredictableCodeSizeScope predictable(masm_, 325 Handle<Code> stack_check = isolate()->builtins()->StackCheck();
328 masm_->CallSize(stack_check, RelocInfo::CODE_TARGET)); 326 PredictableCodeSizeScope predictable(
329 __ Call(stack_check, RelocInfo::CODE_TARGET); 327 masm_, masm_->CallSize(stack_check, RelocInfo::CODE_TARGET));
330 __ bind(&ok); 328 __ Call(stack_check, RelocInfo::CODE_TARGET);
331 } 329 __ bind(&ok);
330 }
332 331
333 { Comment cmnt(masm_, "[ Body"); 332 {
334 DCHECK(loop_depth() == 0); 333 Comment cmnt(masm_, "[ Body");
335 VisitStatements(literal()->body()); 334 DCHECK(loop_depth() == 0);
336 DCHECK(loop_depth() == 0); 335 VisitStatements(literal()->body());
337 } 336 DCHECK(loop_depth() == 0);
338 } 337 }
339 338
340 // Always emit a 'return undefined' in case control fell off the end of 339 // Always emit a 'return undefined' in case control fell off the end of
341 // the body. 340 // the body.
342 { Comment cmnt(masm_, "[ return <undefined>;"); 341 { Comment cmnt(masm_, "[ return <undefined>;");
343 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex); 342 __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
344 } 343 }
345 EmitReturnSequence(); 344 EmitReturnSequence();
346 } 345 }
347 346
(...skipping 3774 matching lines...) Expand 10 before | Expand all | Expand 10 after
4122 reinterpret_cast<uint32_t>( 4121 reinterpret_cast<uint32_t>(
4123 isolate->builtins()->OnStackReplacement()->entry())); 4122 isolate->builtins()->OnStackReplacement()->entry()));
4124 return ON_STACK_REPLACEMENT; 4123 return ON_STACK_REPLACEMENT;
4125 } 4124 }
4126 4125
4127 4126
4128 } // namespace internal 4127 } // namespace internal
4129 } // namespace v8 4128 } // namespace v8
4130 4129
4131 #endif // V8_TARGET_ARCH_MIPS 4130 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698