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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 23726041: Turn the NumberToStringStub into a hydrogen stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 7 years, 2 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/code-stubs.h ('k') | src/hydrogen.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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 return Pop(); 332 return Pop();
333 } 333 }
334 334
335 335
336 Handle<Code> ToNumberStub::GenerateCode(Isolate* isolate) { 336 Handle<Code> ToNumberStub::GenerateCode(Isolate* isolate) {
337 return DoGenerateCode(isolate, this); 337 return DoGenerateCode(isolate, this);
338 } 338 }
339 339
340 340
341 template <> 341 template <>
342 HValue* CodeStubGraphBuilder<NumberToStringStub>::BuildCodeStub() {
343 info()->MarkAsSavesCallerDoubles();
344 HValue* number = GetParameter(NumberToStringStub::kNumber);
345 return BuildNumberToString(number);
346 }
347
348
349 Handle<Code> NumberToStringStub::GenerateCode(Isolate* isolate) {
350 return DoGenerateCode(isolate, this);
351 }
352
353
354 template <>
342 HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { 355 HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() {
343 Factory* factory = isolate()->factory(); 356 Factory* factory = isolate()->factory();
344 HValue* undefined = graph()->GetConstantUndefined(); 357 HValue* undefined = graph()->GetConstantUndefined();
345 AllocationSiteMode alloc_site_mode = casted_stub()->allocation_site_mode(); 358 AllocationSiteMode alloc_site_mode = casted_stub()->allocation_site_mode();
346 FastCloneShallowArrayStub::Mode mode = casted_stub()->mode(); 359 FastCloneShallowArrayStub::Mode mode = casted_stub()->mode();
347 int length = casted_stub()->length(); 360 int length = casted_stub()->length();
348 361
349 HInstruction* allocation_site = Add<HLoadKeyed>(GetParameter(0), 362 HInstruction* allocation_site = Add<HLoadKeyed>(GetParameter(0),
350 GetParameter(1), 363 GetParameter(1),
351 static_cast<HValue*>(NULL), 364 static_cast<HValue*>(NULL),
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 return js_function; 1122 return js_function;
1110 } 1123 }
1111 1124
1112 1125
1113 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) { 1126 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) {
1114 return DoGenerateCode(isolate, this); 1127 return DoGenerateCode(isolate, this);
1115 } 1128 }
1116 1129
1117 1130
1118 } } // namespace v8::internal 1131 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698