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

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

Issue 18503006: Move representation into HObjectAccess and remove from HLoadNamedField and HStoreNamedField. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Pass elements kind to HObjectAccess::ForArrayLength 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.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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 } 510 }
511 511
512 512
513 Handle<Code> KeyedLoadFastElementStub::GenerateCode() { 513 Handle<Code> KeyedLoadFastElementStub::GenerateCode() {
514 return DoGenerateCode(this); 514 return DoGenerateCode(this);
515 } 515 }
516 516
517 517
518 template<> 518 template<>
519 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() { 519 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() {
520 Representation rep = casted_stub()->representation();
520 HObjectAccess access = casted_stub()->is_inobject() ? 521 HObjectAccess access = casted_stub()->is_inobject() ?
521 HObjectAccess::ForJSObjectOffset(casted_stub()->offset()) : 522 HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) :
522 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset()); 523 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep);
523 return AddInstruction(BuildLoadNamedField(GetParameter(0), access, 524 return AddInstruction(BuildLoadNamedField(GetParameter(0), access));
524 casted_stub()->representation()));
525 } 525 }
526 526
527 527
528 Handle<Code> LoadFieldStub::GenerateCode() { 528 Handle<Code> LoadFieldStub::GenerateCode() {
529 return DoGenerateCode(this); 529 return DoGenerateCode(this);
530 } 530 }
531 531
532 532
533 template<> 533 template<>
534 HValue* CodeStubGraphBuilder<KeyedLoadFieldStub>::BuildCodeStub() { 534 HValue* CodeStubGraphBuilder<KeyedLoadFieldStub>::BuildCodeStub() {
535 Representation rep = casted_stub()->representation();
535 HObjectAccess access = casted_stub()->is_inobject() ? 536 HObjectAccess access = casted_stub()->is_inobject() ?
536 HObjectAccess::ForJSObjectOffset(casted_stub()->offset()) : 537 HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) :
537 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset()); 538 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep);
538 return AddInstruction(BuildLoadNamedField(GetParameter(0), access, 539 return AddInstruction(BuildLoadNamedField(GetParameter(0), access));
539 casted_stub()->representation()));
540 } 540 }
541 541
542 542
543 Handle<Code> KeyedLoadFieldStub::GenerateCode() { 543 Handle<Code> KeyedLoadFieldStub::GenerateCode() {
544 return DoGenerateCode(this); 544 return DoGenerateCode(this);
545 } 545 }
546 546
547 547
548 template <> 548 template <>
549 HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() { 549 HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() {
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 return value; 949 return value;
950 } 950 }
951 951
952 952
953 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() { 953 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() {
954 return DoGenerateCode(this); 954 return DoGenerateCode(this);
955 } 955 }
956 956
957 957
958 } } // namespace v8::internal 958 } } // 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