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

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

Issue 150016: Fix issue 392 by disabling the TakeValue optimization for... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 5 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 | « no previous file | test/mjsunit/regress/regress-392.js » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 6303 matching lines...) Expand 10 before | Expand all | Expand 10 after
6314 ASSERT(!is_illegal()); 6314 ASSERT(!is_illegal());
6315 if (type_ != SLOT) { 6315 if (type_ != SLOT) {
6316 GetValue(typeof_state); 6316 GetValue(typeof_state);
6317 return; 6317 return;
6318 } 6318 }
6319 6319
6320 Slot* slot = expression_->AsVariableProxy()->AsVariable()->slot(); 6320 Slot* slot = expression_->AsVariableProxy()->AsVariable()->slot();
6321 ASSERT(slot != NULL); 6321 ASSERT(slot != NULL);
6322 if (slot->type() == Slot::LOOKUP || 6322 if (slot->type() == Slot::LOOKUP ||
6323 slot->type() == Slot::CONTEXT || 6323 slot->type() == Slot::CONTEXT ||
6324 slot->var()->mode() == Variable::CONST) { 6324 slot->var()->mode() == Variable::CONST ||
6325 slot->is_arguments()) {
6325 GetValue(typeof_state); 6326 GetValue(typeof_state);
6326 return; 6327 return;
6327 } 6328 }
6328 6329
6329 // Only non-constant, frame-allocated parameters and locals can reach 6330 // Only non-constant, frame-allocated parameters and locals can
6330 // here. 6331 // reach here. Be careful not to use the optimizations for arguments
6332 // object access since it may not have been initialized yet.
6333 ASSERT(!slot->is_arguments());
6331 if (slot->type() == Slot::PARAMETER) { 6334 if (slot->type() == Slot::PARAMETER) {
6332 cgen_->frame()->TakeParameterAt(slot->index()); 6335 cgen_->frame()->TakeParameterAt(slot->index());
6333 } else { 6336 } else {
6334 ASSERT(slot->type() == Slot::LOCAL); 6337 ASSERT(slot->type() == Slot::LOCAL);
6335 cgen_->frame()->TakeLocalAt(slot->index()); 6338 cgen_->frame()->TakeLocalAt(slot->index());
6336 } 6339 }
6337 } 6340 }
6338 6341
6339 6342
6340 void Reference::SetValue(InitState init_state) { 6343 void Reference::SetValue(InitState init_state) {
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
7849 7852
7850 // Slow-case: Go through the JavaScript implementation. 7853 // Slow-case: Go through the JavaScript implementation.
7851 __ bind(&slow); 7854 __ bind(&slow);
7852 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); 7855 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION);
7853 } 7856 }
7854 7857
7855 7858
7856 #undef __ 7859 #undef __
7857 7860
7858 } } // namespace v8::internal 7861 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-392.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698