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

Unified Diff: src/crankshaft/x87/lithium-codegen-x87.cc

Issue 2539403002: [X87] [crankshaft] Always use Label:kFar as lable dist in DoWrapReceiver() for debug mode. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-codegen-x87.cc
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
index 5dc3311ebf8e7f10ccdecb26a003846b17832324..c2bf140a3abc66daf65459d38a43c2b1233f02ef 100644
--- a/src/crankshaft/x87/lithium-codegen-x87.cc
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc
@@ -3017,7 +3017,16 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) {
// object as a receiver to normal functions. Values have to be
// passed unchanged to builtins and strict-mode functions.
Label receiver_ok, global_object;
- Label::Distance dist = DeoptEveryNTimes() ? Label::kFar : Label::kNear;
+ Label::Distance dist;
+
+ // For x87 debug version jitted code's size exceeds 128 bytes whether
+ // FLAG_deopt_every_n_times
+ // is set or not. Always use Label:kFar for label distance for debug mode.
+ if (FLAG_debug_code)
+ dist = Label::kFar;
+ else
+ dist = DeoptEveryNTimes() ? Label::kFar : Label::kNear;
+
Register scratch = ToRegister(instr->temp());
if (!instr->hydrogen()->known_function()) {
@@ -3037,9 +3046,9 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) {
// Normal function. Replace undefined or null with global receiver.
__ cmp(receiver, factory()->null_value());
- __ j(equal, &global_object, Label::kNear);
+ __ j(equal, &global_object, dist);
__ cmp(receiver, factory()->undefined_value());
- __ j(equal, &global_object, Label::kNear);
+ __ j(equal, &global_object, dist);
// The receiver should be a JS object.
__ test(receiver, Immediate(kSmiTagMask));
@@ -3047,7 +3056,7 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) {
__ CmpObjectType(receiver, FIRST_JS_RECEIVER_TYPE, scratch);
DeoptimizeIf(below, instr, DeoptimizeReason::kNotAJavaScriptObject);
- __ jmp(&receiver_ok, Label::kNear);
+ __ jmp(&receiver_ok, dist);
__ bind(&global_object);
__ mov(receiver, FieldOperand(function, JSFunction::kContextOffset));
__ mov(receiver, ContextOperand(receiver, Context::NATIVE_CONTEXT_INDEX));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698