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

Side by Side Diff: src/ast.cc

Issue 7887038: Enable inlining of functions that reference context slots. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | « no previous file | test/mjsunit/compiler/inline-context-slots.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 } 522 }
523 523
524 524
525 bool Conditional::IsInlineable() const { 525 bool Conditional::IsInlineable() const {
526 return condition()->IsInlineable() && then_expression()->IsInlineable() && 526 return condition()->IsInlineable() && then_expression()->IsInlineable() &&
527 else_expression()->IsInlineable(); 527 else_expression()->IsInlineable();
528 } 528 }
529 529
530 530
531 bool VariableProxy::IsInlineable() const { 531 bool VariableProxy::IsInlineable() const {
532 return var()->IsUnallocated() || var()->IsStackAllocated(); 532 return var()->IsUnallocated()
533 || var()->IsStackAllocated()
534 || var()->IsContextSlot();
533 } 535 }
534 536
535 537
536 bool Assignment::IsInlineable() const { 538 bool Assignment::IsInlineable() const {
537 return target()->IsInlineable() && value()->IsInlineable(); 539 return target()->IsInlineable() && value()->IsInlineable();
538 } 540 }
539 541
540 542
541 bool Property::IsInlineable() const { 543 bool Property::IsInlineable() const {
542 return obj()->IsInlineable() && key()->IsInlineable(); 544 return obj()->IsInlineable() && key()->IsInlineable();
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 int pos) 1171 int pos)
1170 : label_(label), 1172 : label_(label),
1171 statements_(statements), 1173 statements_(statements),
1172 position_(pos), 1174 position_(pos),
1173 compare_type_(NONE), 1175 compare_type_(NONE),
1174 compare_id_(AstNode::GetNextId(isolate)), 1176 compare_id_(AstNode::GetNextId(isolate)),
1175 entry_id_(AstNode::GetNextId(isolate)) { 1177 entry_id_(AstNode::GetNextId(isolate)) {
1176 } 1178 }
1177 1179
1178 } } // namespace v8::internal 1180 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/compiler/inline-context-slots.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698