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/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: Cleanups after first round of comments; FixedArrayLength is always Smi 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') | src/hydrogen-instructions.h » ('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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 475 }
476 476
477 477
478 Handle<Code> KeyedLoadFastElementStub::GenerateCode() { 478 Handle<Code> KeyedLoadFastElementStub::GenerateCode() {
479 return DoGenerateCode(this); 479 return DoGenerateCode(this);
480 } 480 }
481 481
482 482
483 template<> 483 template<>
484 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() { 484 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() {
485 Representation rep = casted_stub()->representation();
485 HObjectAccess access = casted_stub()->is_inobject() ? 486 HObjectAccess access = casted_stub()->is_inobject() ?
486 HObjectAccess::ForJSObjectOffset(casted_stub()->offset()) : 487 HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) :
487 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset()); 488 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep);
488 return AddInstruction(BuildLoadNamedField(GetParameter(0), access, 489 return AddInstruction(BuildLoadNamedField(GetParameter(0), access));
489 casted_stub()->representation()));
490 } 490 }
491 491
492 492
493 Handle<Code> LoadFieldStub::GenerateCode() { 493 Handle<Code> LoadFieldStub::GenerateCode() {
494 return DoGenerateCode(this); 494 return DoGenerateCode(this);
495 } 495 }
496 496
497 497
498 template<> 498 template<>
499 HValue* CodeStubGraphBuilder<KeyedLoadFieldStub>::BuildCodeStub() { 499 HValue* CodeStubGraphBuilder<KeyedLoadFieldStub>::BuildCodeStub() {
500 Representation rep = casted_stub()->representation();
500 HObjectAccess access = casted_stub()->is_inobject() ? 501 HObjectAccess access = casted_stub()->is_inobject() ?
501 HObjectAccess::ForJSObjectOffset(casted_stub()->offset()) : 502 HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) :
502 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset()); 503 HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep);
503 return AddInstruction(BuildLoadNamedField(GetParameter(0), access, 504 return AddInstruction(BuildLoadNamedField(GetParameter(0), access));
504 casted_stub()->representation()));
505 } 505 }
506 506
507 507
508 Handle<Code> KeyedLoadFieldStub::GenerateCode() { 508 Handle<Code> KeyedLoadFieldStub::GenerateCode() {
509 return DoGenerateCode(this); 509 return DoGenerateCode(this);
510 } 510 }
511 511
512 512
513 template <> 513 template <>
514 HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() { 514 HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() {
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 return value; 912 return value;
913 } 913 }
914 914
915 915
916 Handle<Code> StoreGlobalStub::GenerateCode() { 916 Handle<Code> StoreGlobalStub::GenerateCode() {
917 return DoGenerateCode(this); 917 return DoGenerateCode(this);
918 } 918 }
919 919
920 920
921 } } // namespace v8::internal 921 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.h » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698