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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/interpreter/bytecode-generator.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/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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 __ CallStub(&stub); 278 __ CallStub(&stub);
279 } 279 }
280 280
281 SetVar(arguments, eax, ebx, edx); 281 SetVar(arguments, eax, ebx, edx);
282 } 282 }
283 283
284 if (FLAG_trace) { 284 if (FLAG_trace) {
285 __ CallRuntime(Runtime::kTraceEnter); 285 __ CallRuntime(Runtime::kTraceEnter);
286 } 286 }
287 287
288 // Visit the declarations and body unless there is an illegal 288 // Visit the declarations and body.
289 // redeclaration. 289 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);
290 if (scope()->HasIllegalRedeclaration()) { 290 {
291 EmitIllegalRedeclaration(); 291 Comment cmnt(masm_, "[ Declarations");
292 } else { 292 VisitDeclarations(scope()->declarations());
293 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); 293 }
294 { Comment cmnt(masm_, "[ Declarations");
295 VisitDeclarations(scope()->declarations());
296 }
297 294
298 // Assert that the declarations do not use ICs. Otherwise the debugger 295 // Assert that the declarations do not use ICs. Otherwise the debugger
299 // won't be able to redirect a PC at an IC to the correct IC in newly 296 // won't be able to redirect a PC at an IC to the correct IC in newly
300 // recompiled code. 297 // recompiled code.
301 DCHECK_EQ(0, ic_total_count_); 298 DCHECK_EQ(0, ic_total_count_);
302 299
303 { Comment cmnt(masm_, "[ Stack check"); 300 {
304 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); 301 Comment cmnt(masm_, "[ Stack check");
305 Label ok; 302 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS);
306 ExternalReference stack_limit 303 Label ok;
307 = ExternalReference::address_of_stack_limit(isolate()); 304 ExternalReference stack_limit =
308 __ cmp(esp, Operand::StaticVariable(stack_limit)); 305 ExternalReference::address_of_stack_limit(isolate());
309 __ j(above_equal, &ok, Label::kNear); 306 __ cmp(esp, Operand::StaticVariable(stack_limit));
310 __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); 307 __ j(above_equal, &ok, Label::kNear);
311 __ bind(&ok); 308 __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET);
312 } 309 __ bind(&ok);
310 }
313 311
314 { Comment cmnt(masm_, "[ Body"); 312 {
315 DCHECK(loop_depth() == 0); 313 Comment cmnt(masm_, "[ Body");
316 VisitStatements(literal()->body()); 314 DCHECK(loop_depth() == 0);
317 DCHECK(loop_depth() == 0); 315 VisitStatements(literal()->body());
318 } 316 DCHECK(loop_depth() == 0);
319 } 317 }
320 318
321 // Always emit a 'return undefined' in case control fell off the end of 319 // Always emit a 'return undefined' in case control fell off the end of
322 // the body. 320 // the body.
323 { Comment cmnt(masm_, "[ return <undefined>;"); 321 { Comment cmnt(masm_, "[ return <undefined>;");
324 __ mov(eax, isolate()->factory()->undefined_value()); 322 __ mov(eax, isolate()->factory()->undefined_value());
325 EmitReturnSequence(); 323 EmitReturnSequence();
326 } 324 }
327 } 325 }
328 326
(...skipping 3669 matching lines...) Expand 10 before | Expand all | Expand 10 after
3998 isolate->builtins()->OnStackReplacement()->entry(), 3996 isolate->builtins()->OnStackReplacement()->entry(),
3999 Assembler::target_address_at(call_target_address, unoptimized_code)); 3997 Assembler::target_address_at(call_target_address, unoptimized_code));
4000 return ON_STACK_REPLACEMENT; 3998 return ON_STACK_REPLACEMENT;
4001 } 3999 }
4002 4000
4003 4001
4004 } // namespace internal 4002 } // namespace internal
4005 } // namespace v8 4003 } // namespace v8
4006 4004
4007 #endif // V8_TARGET_ARCH_X87 4005 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698