OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 __ CallStub(&stub); | 299 __ CallStub(&stub); |
300 } | 300 } |
301 | 301 |
302 SetVar(arguments, r2, r3, r4); | 302 SetVar(arguments, r2, r3, r4); |
303 } | 303 } |
304 | 304 |
305 if (FLAG_trace) { | 305 if (FLAG_trace) { |
306 __ CallRuntime(Runtime::kTraceEnter); | 306 __ CallRuntime(Runtime::kTraceEnter); |
307 } | 307 } |
308 | 308 |
309 // Visit the declarations and body unless there is an illegal | 309 // Visit the declarations and body. |
310 // redeclaration. | 310 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); |
311 if (scope()->HasIllegalRedeclaration()) { | 311 { |
312 EmitIllegalRedeclaration(); | 312 Comment cmnt(masm_, "[ Declarations"); |
313 } else { | 313 VisitDeclarations(scope()->declarations()); |
314 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); | 314 } |
315 { | |
316 Comment cmnt(masm_, "[ Declarations"); | |
317 VisitDeclarations(scope()->declarations()); | |
318 } | |
319 | 315 |
320 // Assert that the declarations do not use ICs. Otherwise the debugger | 316 // Assert that the declarations do not use ICs. Otherwise the debugger |
321 // won't be able to redirect a PC at an IC to the correct IC in newly | 317 // won't be able to redirect a PC at an IC to the correct IC in newly |
322 // recompiled code. | 318 // recompiled code. |
323 DCHECK_EQ(0, ic_total_count_); | 319 DCHECK_EQ(0, ic_total_count_); |
324 | 320 |
325 { | 321 { |
326 Comment cmnt(masm_, "[ Stack check"); | 322 Comment cmnt(masm_, "[ Stack check"); |
327 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); | 323 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); |
328 Label ok; | 324 Label ok; |
329 __ LoadRoot(ip, Heap::kStackLimitRootIndex); | 325 __ LoadRoot(ip, Heap::kStackLimitRootIndex); |
330 __ CmpLogicalP(sp, ip); | 326 __ CmpLogicalP(sp, ip); |
331 __ bge(&ok, Label::kNear); | 327 __ bge(&ok, Label::kNear); |
332 __ Call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); | 328 __ Call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); |
333 __ bind(&ok); | 329 __ bind(&ok); |
334 } | 330 } |
335 | 331 |
336 { | 332 { |
337 Comment cmnt(masm_, "[ Body"); | 333 Comment cmnt(masm_, "[ Body"); |
338 DCHECK(loop_depth() == 0); | 334 DCHECK(loop_depth() == 0); |
339 VisitStatements(literal()->body()); | 335 VisitStatements(literal()->body()); |
340 DCHECK(loop_depth() == 0); | 336 DCHECK(loop_depth() == 0); |
341 } | |
342 } | 337 } |
343 | 338 |
344 // 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 |
345 // the body. | 340 // the body. |
346 { | 341 { |
347 Comment cmnt(masm_, "[ return <undefined>;"); | 342 Comment cmnt(masm_, "[ return <undefined>;"); |
348 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); | 343 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); |
349 } | 344 } |
350 EmitReturnSequence(); | 345 EmitReturnSequence(); |
351 } | 346 } |
(...skipping 3641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3993 DCHECK(kOSRBranchInstruction == br_instr); | 3988 DCHECK(kOSRBranchInstruction == br_instr); |
3994 | 3989 |
3995 DCHECK(interrupt_address == | 3990 DCHECK(interrupt_address == |
3996 isolate->builtins()->OnStackReplacement()->entry()); | 3991 isolate->builtins()->OnStackReplacement()->entry()); |
3997 return ON_STACK_REPLACEMENT; | 3992 return ON_STACK_REPLACEMENT; |
3998 } | 3993 } |
3999 | 3994 |
4000 } // namespace internal | 3995 } // namespace internal |
4001 } // namespace v8 | 3996 } // namespace v8 |
4002 #endif // V8_TARGET_ARCH_S390 | 3997 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |