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

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

Issue 22880004: Merged r16139 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add test Created 7 years, 4 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.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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 static_cast<HValue*>(NULL), 345 static_cast<HValue*>(NULL),
346 FAST_ELEMENTS); 346 FAST_ELEMENTS);
347 IfBuilder checker(this); 347 IfBuilder checker(this);
348 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, 348 checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site,
349 undefined); 349 undefined);
350 checker.Then(); 350 checker.Then();
351 351
352 HObjectAccess access = HObjectAccess::ForAllocationSiteTransitionInfo(); 352 HObjectAccess access = HObjectAccess::ForAllocationSiteTransitionInfo();
353 HInstruction* boilerplate = Add<HLoadNamedField>(allocation_site, access); 353 HInstruction* boilerplate = Add<HLoadNamedField>(allocation_site, access);
354 if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) { 354 if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) {
355 HValue* elements = AddLoadElements(boilerplate); 355 HValue* elements = AddLoadElements(boilerplate, NULL);
356 356
357 IfBuilder if_fixed_cow(this); 357 IfBuilder if_fixed_cow(this);
358 if_fixed_cow.If<HCompareMap>(elements, factory->fixed_cow_array_map()); 358 if_fixed_cow.If<HCompareMap>(elements, factory->fixed_cow_array_map());
359 if_fixed_cow.Then(); 359 if_fixed_cow.Then();
360 environment()->Push(BuildCloneShallowArray(boilerplate, 360 environment()->Push(BuildCloneShallowArray(boilerplate,
361 allocation_site, 361 allocation_site,
362 alloc_site_mode, 362 alloc_site_mode,
363 FAST_ELEMENTS, 363 FAST_ELEMENTS,
364 0/*copy-on-write*/)); 364 0/*copy-on-write*/));
365 if_fixed_cow.Else(); 365 if_fixed_cow.Else();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 return DoGenerateCode(this); 506 return DoGenerateCode(this);
507 } 507 }
508 508
509 509
510 template<> 510 template<>
511 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() { 511 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() {
512 Representation rep = casted_stub()->representation(); 512 Representation rep = casted_stub()->representation();
513 HObjectAccess access = casted_stub()->is_inobject() ? 513 HObjectAccess access = casted_stub()->is_inobject() ?
514 HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) : 514 HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) :
515 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep); 515 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep);
516 return AddInstruction(BuildLoadNamedField(GetParameter(0), access)); 516 return AddInstruction(BuildLoadNamedField(GetParameter(0), access, NULL));
517 } 517 }
518 518
519 519
520 Handle<Code> LoadFieldStub::GenerateCode() { 520 Handle<Code> LoadFieldStub::GenerateCode() {
521 return DoGenerateCode(this); 521 return DoGenerateCode(this);
522 } 522 }
523 523
524 524
525 template<> 525 template<>
526 HValue* CodeStubGraphBuilder<KeyedLoadFieldStub>::BuildCodeStub() { 526 HValue* CodeStubGraphBuilder<KeyedLoadFieldStub>::BuildCodeStub() {
527 Representation rep = casted_stub()->representation(); 527 Representation rep = casted_stub()->representation();
528 HObjectAccess access = casted_stub()->is_inobject() ? 528 HObjectAccess access = casted_stub()->is_inobject() ?
529 HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) : 529 HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) :
530 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep); 530 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep);
531 return AddInstruction(BuildLoadNamedField(GetParameter(0), access)); 531 return AddInstruction(BuildLoadNamedField(GetParameter(0), access, NULL));
532 } 532 }
533 533
534 534
535 Handle<Code> KeyedLoadFieldStub::GenerateCode() { 535 Handle<Code> KeyedLoadFieldStub::GenerateCode() {
536 return DoGenerateCode(this); 536 return DoGenerateCode(this);
537 } 537 }
538 538
539 539
540 template <> 540 template <>
541 HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() { 541 HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() {
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 return value; 935 return value;
936 } 936 }
937 937
938 938
939 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() { 939 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() {
940 return DoGenerateCode(this); 940 return DoGenerateCode(this);
941 } 941 }
942 942
943 943
944 } } // namespace v8::internal 944 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698