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

Side by Side Diff: src/hydrogen.cc

Issue 14296009: Inline String.fromCharCode in hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | src/runtime.cc » ('j') | src/runtime.cc » ('J')
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 8529 matching lines...) Expand 10 before | Expand all | Expand 10 after
8540 ast_context()->ReturnInstruction(char_code, expr->id()); 8540 ast_context()->ReturnInstruction(char_code, expr->id());
8541 return true; 8541 return true;
8542 } 8542 }
8543 AddInstruction(char_code); 8543 AddInstruction(char_code);
8544 HInstruction* result = 8544 HInstruction* result =
8545 HStringCharFromCode::New(zone(), context, char_code); 8545 HStringCharFromCode::New(zone(), context, char_code);
8546 ast_context()->ReturnInstruction(result, expr->id()); 8546 ast_context()->ReturnInstruction(result, expr->id());
8547 return true; 8547 return true;
8548 } 8548 }
8549 break; 8549 break;
8550 case kStringFromCharCode:
8551 if (argument_count == 2 && check_type == RECEIVER_MAP_CHECK) {
8552 printf("cool\n");
Toon Verwaest 2013/04/16 22:19:30 Please remove.
8553 AddCheckConstantFunction(expr->holder(), receiver, receiver_map);
8554 HValue* argument = Pop();
8555 HValue* context = environment()->LookupContext();
8556 Drop(1); // Receiver.
8557 HInstruction* result =
8558 HStringCharFromCode::New(zone(), context, argument);
8559 ast_context()->ReturnInstruction(result, expr->id());
8560 return true;
8561 }
8562 break;
8550 case kMathExp: 8563 case kMathExp:
8551 if (!FLAG_fast_math) break; 8564 if (!FLAG_fast_math) break;
8552 // Fall through if FLAG_fast_math. 8565 // Fall through if FLAG_fast_math.
8553 case kMathRound: 8566 case kMathRound:
8554 case kMathFloor: 8567 case kMathFloor:
8555 case kMathAbs: 8568 case kMathAbs:
8556 case kMathSqrt: 8569 case kMathSqrt:
8557 case kMathLog: 8570 case kMathLog:
8558 case kMathSin: 8571 case kMathSin:
8559 case kMathCos: 8572 case kMathCos:
(...skipping 3131 matching lines...) Expand 10 before | Expand all | Expand 10 after
11691 } 11704 }
11692 } 11705 }
11693 11706
11694 #ifdef DEBUG 11707 #ifdef DEBUG
11695 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11708 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11696 if (allocator_ != NULL) allocator_->Verify(); 11709 if (allocator_ != NULL) allocator_->Verify();
11697 #endif 11710 #endif
11698 } 11711 }
11699 11712
11700 } } // namespace v8::internal 11713 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698