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

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

Issue 3399005: Add a few missing nops to signal no inlined code was generated. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « no previous file | src/x64/full-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 981
982 // All extension objects were empty and it is safe to use a global 982 // All extension objects were empty and it is safe to use a global
983 // load IC call. 983 // load IC call.
984 __ mov(eax, CodeGenerator::GlobalObject()); 984 __ mov(eax, CodeGenerator::GlobalObject());
985 __ mov(ecx, slot->var()->name()); 985 __ mov(ecx, slot->var()->name());
986 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); 986 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
987 RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF) 987 RelocInfo::Mode mode = (typeof_state == INSIDE_TYPEOF)
988 ? RelocInfo::CODE_TARGET 988 ? RelocInfo::CODE_TARGET
989 : RelocInfo::CODE_TARGET_CONTEXT; 989 : RelocInfo::CODE_TARGET_CONTEXT;
990 __ call(ic, mode); 990 __ call(ic, mode);
991 __ nop();
991 } 992 }
992 993
993 994
994 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions( 995 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(
995 Slot* slot, 996 Slot* slot,
996 Label* slow) { 997 Label* slow) {
997 ASSERT(slot->type() == Slot::CONTEXT); 998 ASSERT(slot->type() == Slot::CONTEXT);
998 Register context = esi; 999 Register context = esi;
999 Register temp = ebx; 1000 Register temp = ebx;
1000 1001
(...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 for (int i = 0; i < arg_count; i++) { 3132 for (int i = 0; i < arg_count; i++) {
3132 VisitForValue(args->at(i), kStack); 3133 VisitForValue(args->at(i), kStack);
3133 } 3134 }
3134 3135
3135 if (expr->is_jsruntime()) { 3136 if (expr->is_jsruntime()) {
3136 // Call the JS runtime function via a call IC. 3137 // Call the JS runtime function via a call IC.
3137 __ Set(ecx, Immediate(expr->name())); 3138 __ Set(ecx, Immediate(expr->name()));
3138 InLoopFlag in_loop = (loop_depth() > 0) ? IN_LOOP : NOT_IN_LOOP; 3139 InLoopFlag in_loop = (loop_depth() > 0) ? IN_LOOP : NOT_IN_LOOP;
3139 Handle<Code> ic = CodeGenerator::ComputeCallInitialize(arg_count, in_loop); 3140 Handle<Code> ic = CodeGenerator::ComputeCallInitialize(arg_count, in_loop);
3140 __ call(ic, RelocInfo::CODE_TARGET); 3141 __ call(ic, RelocInfo::CODE_TARGET);
3141 // Restore context register. 3142 // Restore context register.
3142 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 3143 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
3143 } else { 3144 } else {
3144 // Call the C runtime function. 3145 // Call the C runtime function.
3145 __ CallRuntime(expr->function(), arg_count); 3146 __ CallRuntime(expr->function(), arg_count);
3146 } 3147 }
3147 Apply(context_, eax); 3148 Apply(context_, eax);
3148 } 3149 }
3149 3150
3150 3151
3151 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { 3152 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
3476 void FullCodeGenerator::VisitForTypeofValue(Expression* expr, Location where) { 3477 void FullCodeGenerator::VisitForTypeofValue(Expression* expr, Location where) {
3477 VariableProxy* proxy = expr->AsVariableProxy(); 3478 VariableProxy* proxy = expr->AsVariableProxy();
3478 if (proxy != NULL && !proxy->var()->is_this() && proxy->var()->is_global()) { 3479 if (proxy != NULL && !proxy->var()->is_this() && proxy->var()->is_global()) {
3479 Comment cmnt(masm_, "Global variable"); 3480 Comment cmnt(masm_, "Global variable");
3480 __ mov(eax, CodeGenerator::GlobalObject()); 3481 __ mov(eax, CodeGenerator::GlobalObject());
3481 __ mov(ecx, Immediate(proxy->name())); 3482 __ mov(ecx, Immediate(proxy->name()));
3482 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); 3483 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
3483 // Use a regular load, not a contextual load, to avoid a reference 3484 // Use a regular load, not a contextual load, to avoid a reference
3484 // error. 3485 // error.
3485 __ call(ic, RelocInfo::CODE_TARGET); 3486 __ call(ic, RelocInfo::CODE_TARGET);
3487 __ nop();
3486 if (where == kStack) __ push(eax); 3488 if (where == kStack) __ push(eax);
3487 } else if (proxy != NULL && 3489 } else if (proxy != NULL &&
3488 proxy->var()->slot() != NULL && 3490 proxy->var()->slot() != NULL &&
3489 proxy->var()->slot()->type() == Slot::LOOKUP) { 3491 proxy->var()->slot()->type() == Slot::LOOKUP) {
3490 Label done, slow; 3492 Label done, slow;
3491 3493
3492 // Generate code for loading from variables potentially shadowed 3494 // Generate code for loading from variables potentially shadowed
3493 // by eval-introduced variables. 3495 // by eval-introduced variables.
3494 Slot* slot = proxy->var()->slot(); 3496 Slot* slot = proxy->var()->slot();
3495 EmitDynamicLoadFromSlotFastCase(slot, INSIDE_TYPEOF, &slow, &done); 3497 EmitDynamicLoadFromSlotFastCase(slot, INSIDE_TYPEOF, &slow, &done);
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
3776 // And return. 3778 // And return.
3777 __ ret(0); 3779 __ ret(0);
3778 } 3780 }
3779 3781
3780 3782
3781 #undef __ 3783 #undef __
3782 3784
3783 } } // namespace v8::internal 3785 } } // namespace v8::internal
3784 3786
3785 #endif // V8_TARGET_ARCH_IA32 3787 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698