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

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

Issue 197603002: Turn StringLengthStub (used by string wrappers only) into a hydrogen stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/ia32/code-stubs-ia32.cc » ('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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 casted_stub()->is_inobject()); 601 casted_stub()->is_inobject());
602 } 602 }
603 603
604 604
605 Handle<Code> LoadFieldStub::GenerateCode(Isolate* isolate) { 605 Handle<Code> LoadFieldStub::GenerateCode(Isolate* isolate) {
606 return DoGenerateCode(isolate, this); 606 return DoGenerateCode(isolate, this);
607 } 607 }
608 608
609 609
610 template<> 610 template<>
611 HValue* CodeStubGraphBuilder<KeyedLoadFieldStub>::BuildCodeStub() { 611 HValue* CodeStubGraphBuilder<StringLengthStub>::BuildCodeStub() {
612 return BuildLoadNamedField(GetParameter(0), 612 HValue* string = BuildLoadNamedField(
613 casted_stub()->representation(), 613 GetParameter(0), Representation::Tagged(), JSValue::kValueOffset, true);
614 casted_stub()->offset(), 614 return BuildLoadNamedField(
615 casted_stub()->is_inobject()); 615 string, Representation::Tagged(), String::kLengthOffset, true);
616 } 616 }
617 617
618 618
619 Handle<Code> KeyedLoadFieldStub::GenerateCode(Isolate* isolate) { 619 Handle<Code> StringLengthStub::GenerateCode(Isolate* isolate) {
620 return DoGenerateCode(isolate, this); 620 return DoGenerateCode(isolate, this);
621 } 621 }
622 622
623 623
624 template <> 624 template <>
625 HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() { 625 HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() {
626 BuildUncheckedMonomorphicElementAccess( 626 BuildUncheckedMonomorphicElementAccess(
627 GetParameter(0), GetParameter(1), GetParameter(2), 627 GetParameter(0), GetParameter(1), GetParameter(2),
628 casted_stub()->is_js_array(), casted_stub()->elements_kind(), 628 casted_stub()->is_js_array(), casted_stub()->elements_kind(),
629 STORE, NEVER_RETURN_HOLE, casted_stub()->store_mode()); 629 STORE, NEVER_RETURN_HOLE, casted_stub()->store_mode());
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 return BuildRegExpConstructResult(length, index, input); 1430 return BuildRegExpConstructResult(length, index, input);
1431 } 1431 }
1432 1432
1433 1433
1434 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) { 1434 Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) {
1435 return DoGenerateCode(isolate, this); 1435 return DoGenerateCode(isolate, this);
1436 } 1436 }
1437 1437
1438 1438
1439 } } // namespace v8::internal 1439 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698