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

Side by Side Diff: src/hydrogen.cc

Issue 10703005: Allow inlining of functions containing RegExp literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « src/ast.cc ('k') | src/hydrogen-instructions.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 4628 matching lines...) Expand 10 before | Expand all | Expand 10 after
4639 HConstant* instr = 4639 HConstant* instr =
4640 new(zone()) HConstant(expr->handle(), Representation::Tagged()); 4640 new(zone()) HConstant(expr->handle(), Representation::Tagged());
4641 return ast_context()->ReturnInstruction(instr, expr->id()); 4641 return ast_context()->ReturnInstruction(instr, expr->id());
4642 } 4642 }
4643 4643
4644 4644
4645 void HGraphBuilder::VisitRegExpLiteral(RegExpLiteral* expr) { 4645 void HGraphBuilder::VisitRegExpLiteral(RegExpLiteral* expr) {
4646 ASSERT(!HasStackOverflow()); 4646 ASSERT(!HasStackOverflow());
4647 ASSERT(current_block() != NULL); 4647 ASSERT(current_block() != NULL);
4648 ASSERT(current_block()->HasPredecessor()); 4648 ASSERT(current_block()->HasPredecessor());
4649 Handle<JSFunction> closure = function_state()->compilation_info()->closure();
4650 Handle<FixedArray> literals(closure->literals());
4649 HValue* context = environment()->LookupContext(); 4651 HValue* context = environment()->LookupContext();
4650 4652
4651 HRegExpLiteral* instr = new(zone()) HRegExpLiteral(context, 4653 HRegExpLiteral* instr = new(zone()) HRegExpLiteral(context,
4654 literals,
4652 expr->pattern(), 4655 expr->pattern(),
4653 expr->flags(), 4656 expr->flags(),
4654 expr->literal_index()); 4657 expr->literal_index());
4655 return ast_context()->ReturnInstruction(instr, expr->id()); 4658 return ast_context()->ReturnInstruction(instr, expr->id());
4656 } 4659 }
4657 4660
4658 4661
4659 // Determines whether the given array or object literal boilerplate satisfies 4662 // Determines whether the given array or object literal boilerplate satisfies
4660 // all limits to be considered for fast deep-copying and computes the total 4663 // all limits to be considered for fast deep-copying and computes the total
4661 // size of all objects that are part of the graph. 4664 // size of all objects that are part of the graph.
(...skipping 4774 matching lines...) Expand 10 before | Expand all | Expand 10 after
9436 } 9439 }
9437 } 9440 }
9438 9441
9439 #ifdef DEBUG 9442 #ifdef DEBUG
9440 if (graph_ != NULL) graph_->Verify(false); // No full verify. 9443 if (graph_ != NULL) graph_->Verify(false); // No full verify.
9441 if (allocator_ != NULL) allocator_->Verify(); 9444 if (allocator_ != NULL) allocator_->Verify();
9442 #endif 9445 #endif
9443 } 9446 }
9444 9447
9445 } } // namespace v8::internal 9448 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698