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

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

Issue 23496046: Remove indirection when calling Runtime_StackGuard. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/x64/lithium-codegen-x64.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 VisitVariableDeclaration(function); 273 VisitVariableDeclaration(function);
274 } 274 }
275 VisitDeclarations(scope()->declarations()); 275 VisitDeclarations(scope()->declarations());
276 } 276 }
277 277
278 { Comment cmnt(masm_, "[ Stack check"); 278 { Comment cmnt(masm_, "[ Stack check");
279 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); 279 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS);
280 Label ok; 280 Label ok;
281 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); 281 __ CompareRoot(rsp, Heap::kStackLimitRootIndex);
282 __ j(above_equal, &ok, Label::kNear); 282 __ j(above_equal, &ok, Label::kNear);
283 __ call(isolate()->builtins()->StackCheck(), RelocInfo::CODE_TARGET); 283 __ CallRuntime(Runtime::kStackCheck, 0);
284 __ bind(&ok); 284 __ bind(&ok);
285 } 285 }
286 286
287 { Comment cmnt(masm_, "[ Body"); 287 { Comment cmnt(masm_, "[ Body");
288 ASSERT(loop_depth() == 0); 288 ASSERT(loop_depth() == 0);
289 VisitStatements(function()->body()); 289 VisitStatements(function()->body());
290 ASSERT(loop_depth() == 0); 290 ASSERT(loop_depth() == 0);
291 } 291 }
292 } 292 }
293 293
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 Max(1, distance / kCodeSizeMultiplier)); 379 Max(1, distance / kCodeSizeMultiplier));
380 } 380 }
381 EmitProfilingCounterDecrement(weight); 381 EmitProfilingCounterDecrement(weight);
382 Label ok; 382 Label ok;
383 __ j(positive, &ok, Label::kNear); 383 __ j(positive, &ok, Label::kNear);
384 __ push(rax); 384 __ push(rax);
385 if (info_->ShouldSelfOptimize() && FLAG_direct_self_opt) { 385 if (info_->ShouldSelfOptimize() && FLAG_direct_self_opt) {
386 __ push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 386 __ push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
387 __ CallRuntime(Runtime::kOptimizeFunctionOnNextCall, 1); 387 __ CallRuntime(Runtime::kOptimizeFunctionOnNextCall, 1);
388 } else { 388 } else {
389 __ call(isolate()->builtins()->InterruptCheck(), 389 __ CallRuntime(Runtime::kInterrupt, 0);
390 RelocInfo::CODE_TARGET);
391 } 390 }
392 __ pop(rax); 391 __ pop(rax);
393 EmitProfilingCounterReset(); 392 EmitProfilingCounterReset();
394 __ bind(&ok); 393 __ bind(&ok);
395 } 394 }
396 #ifdef DEBUG 395 #ifdef DEBUG
397 // Add a label for checking the size of the code used for returning. 396 // Add a label for checking the size of the code used for returning.
398 Label check_exit_codesize; 397 Label check_exit_codesize;
399 masm_->bind(&check_exit_codesize); 398 masm_->bind(&check_exit_codesize);
400 #endif 399 #endif
(...skipping 4475 matching lines...) Expand 10 before | Expand all | Expand 10 after
4876 *context_length = 0; 4875 *context_length = 0;
4877 return previous_; 4876 return previous_;
4878 } 4877 }
4879 4878
4880 4879
4881 #undef __ 4880 #undef __
4882 4881
4883 } } // namespace v8::internal 4882 } } // namespace v8::internal
4884 4883
4885 #endif // V8_TARGET_ARCH_X64 4884 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698