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

Side by Side Diff: src/rewriter.cc

Issue 3432022: Clean up some messiness in Scopes. (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 | « src/liveedit.cc ('k') | src/scopeinfo.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 node->right()->set_no_negative_zero(true); 518 node->right()->set_no_negative_zero(true);
519 break; 519 break;
520 case Token::MUL: { 520 case Token::MUL: {
521 VariableProxy* lvar_proxy = node->left()->AsVariableProxy(); 521 VariableProxy* lvar_proxy = node->left()->AsVariableProxy();
522 VariableProxy* rvar_proxy = node->right()->AsVariableProxy(); 522 VariableProxy* rvar_proxy = node->right()->AsVariableProxy();
523 if (lvar_proxy != NULL && rvar_proxy != NULL) { 523 if (lvar_proxy != NULL && rvar_proxy != NULL) {
524 Variable* lvar = lvar_proxy->AsVariable(); 524 Variable* lvar = lvar_proxy->AsVariable();
525 Variable* rvar = rvar_proxy->AsVariable(); 525 Variable* rvar = rvar_proxy->AsVariable();
526 if (lvar != NULL && rvar != NULL) { 526 if (lvar != NULL && rvar != NULL) {
527 if (lvar->mode() == Variable::VAR && rvar->mode() == Variable::VAR) { 527 if (lvar->mode() == Variable::VAR && rvar->mode() == Variable::VAR) {
528 Slot* lslot = lvar->slot(); 528 Slot* lslot = lvar->AsSlot();
529 Slot* rslot = rvar->slot(); 529 Slot* rslot = rvar->AsSlot();
530 if (lslot->type() == rslot->type() && 530 if (lslot->type() == rslot->type() &&
531 (lslot->type() == Slot::PARAMETER || 531 (lslot->type() == Slot::PARAMETER ||
532 lslot->type() == Slot::LOCAL) && 532 lslot->type() == Slot::LOCAL) &&
533 lslot->index() == rslot->index()) { 533 lslot->index() == rslot->index()) {
534 // A number squared doesn't give negative zero. 534 // A number squared doesn't give negative zero.
535 node->set_no_negative_zero(true); 535 node->set_no_negative_zero(true);
536 } 536 }
537 } 537 }
538 } 538 }
539 } 539 }
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 optimizer.Optimize(body); 1013 optimizer.Optimize(body);
1014 if (optimizer.HasStackOverflow()) { 1014 if (optimizer.HasStackOverflow()) {
1015 return false; 1015 return false;
1016 } 1016 }
1017 } 1017 }
1018 return true; 1018 return true;
1019 } 1019 }
1020 1020
1021 1021
1022 } } // namespace v8::internal 1022 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/liveedit.cc ('k') | src/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698