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

Side by Side Diff: src/hydrogen.cc

Issue 20241005: Fix IsDeletable() for HStringAdd, HStringCharCodeAt, HStringCharFromCode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | src/hydrogen-instructions.h » ('j') | src/hydrogen-instructions.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 9060 matching lines...) Expand 10 before | Expand all | Expand 10 after
9071 9071
9072 // Fast support for Math.random(). 9072 // Fast support for Math.random().
9073 void HOptimizedGraphBuilder::GenerateRandomHeapNumber(CallRuntime* call) { 9073 void HOptimizedGraphBuilder::GenerateRandomHeapNumber(CallRuntime* call) {
9074 HValue* context = environment()->LookupContext(); 9074 HValue* context = environment()->LookupContext();
9075 HGlobalObject* global_object = Add<HGlobalObject>(context); 9075 HGlobalObject* global_object = Add<HGlobalObject>(context);
9076 HRandom* result = new(zone()) HRandom(global_object); 9076 HRandom* result = new(zone()) HRandom(global_object);
9077 return ast_context()->ReturnInstruction(result, call->id()); 9077 return ast_context()->ReturnInstruction(result, call->id());
9078 } 9078 }
9079 9079
9080 9080
9081 // Fast support for StringAdd.
Michael Starzinger 2013/07/25 14:43:18 nit: Can we get the comment back?
titzer 2013/07/25 15:32:55 Well, I wanted that one for my code offsets, but I
9082 void HOptimizedGraphBuilder::GenerateStringAdd(CallRuntime* call) { 9081 void HOptimizedGraphBuilder::GenerateStringAdd(CallRuntime* call) {
9083 ASSERT_EQ(2, call->arguments()->length()); 9082 ASSERT_EQ(2, call->arguments()->length());
9084 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 9083 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
9085 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); 9084 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
9086 HValue* right = Pop(); 9085 HValue* right = Pop();
9087 HValue* left = Pop(); 9086 HValue* left = Pop();
9088 HValue* context = environment()->LookupContext(); 9087 HValue* context = environment()->LookupContext();
9089 HInstruction* result = HStringAdd::New( 9088 HInstruction* result = HStringAdd::New(
9090 zone(), context, left, right, STRING_ADD_CHECK_BOTH); 9089 zone(), context, left, right, STRING_ADD_CHECK_BOTH);
9091 return ast_context()->ReturnInstruction(result, call->id()); 9090 return ast_context()->ReturnInstruction(result, call->id());
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
9916 if (ShouldProduceTraceOutput()) { 9915 if (ShouldProduceTraceOutput()) {
9917 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9916 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9918 } 9917 }
9919 9918
9920 #ifdef DEBUG 9919 #ifdef DEBUG
9921 graph_->Verify(false); // No full verify. 9920 graph_->Verify(false); // No full verify.
9922 #endif 9921 #endif
9923 } 9922 }
9924 9923
9925 } } // namespace v8::internal 9924 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698