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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 2207553002: [stubs] Turn FastCloneRegExpStub into a TurboFan code stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix indexing. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/deoptimize-reason.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 65bf423ea200c1fea83444ecd65ccd3adaf11364..71a6b4a92a796f81ba3c78c4174e2dfc793b1ebf 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -344,63 +344,6 @@ Handle<Code> NumberToStringStub::GenerateCode() {
template <>
-HValue* CodeStubGraphBuilder<FastCloneRegExpStub>::BuildCodeStub() {
- HValue* closure = GetParameter(Descriptor::kClosure);
- HValue* literal_index = GetParameter(Descriptor::kLiteralIndex);
-
- // This stub is very performance sensitive, the generated code must be tuned
- // so that it doesn't build and eager frame.
- info()->MarkMustNotHaveEagerFrame();
-
- HValue* literals_array = Add<HLoadNamedField>(
- closure, nullptr, HObjectAccess::ForLiteralsPointer());
- HInstruction* boilerplate = Add<HLoadKeyed>(
- literals_array, literal_index, nullptr, nullptr, FAST_ELEMENTS,
- NEVER_RETURN_HOLE, LiteralsArray::kOffsetToFirstLiteral - kHeapObjectTag);
-
- IfBuilder if_notundefined(this);
- if_notundefined.IfNot<HCompareObjectEqAndBranch>(
- boilerplate, graph()->GetConstantUndefined());
- if_notundefined.Then();
- {
- int result_size =
- JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize;
- HValue* result =
- Add<HAllocate>(Add<HConstant>(result_size), HType::JSObject(),
- NOT_TENURED, JS_REGEXP_TYPE, graph()->GetConstant0());
- Add<HStoreNamedField>(
- result, HObjectAccess::ForMap(),
- Add<HLoadNamedField>(boilerplate, nullptr, HObjectAccess::ForMap()));
- Add<HStoreNamedField>(
- result, HObjectAccess::ForPropertiesPointer(),
- Add<HLoadNamedField>(boilerplate, nullptr,
- HObjectAccess::ForPropertiesPointer()));
- Add<HStoreNamedField>(
- result, HObjectAccess::ForElementsPointer(),
- Add<HLoadNamedField>(boilerplate, nullptr,
- HObjectAccess::ForElementsPointer()));
- for (int offset = JSObject::kHeaderSize; offset < result_size;
- offset += kPointerSize) {
- HObjectAccess access = HObjectAccess::ForObservableJSObjectOffset(offset);
- Add<HStoreNamedField>(result, access,
- Add<HLoadNamedField>(boilerplate, nullptr, access));
- }
- Push(result);
- }
- if_notundefined.ElseDeopt(
- DeoptimizeReason::kUninitializedBoilerplateInFastClone);
- if_notundefined.End();
-
- return Pop();
-}
-
-
-Handle<Code> FastCloneRegExpStub::GenerateCode() {
- return DoGenerateCode(this);
-}
-
-
-template <>
HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() {
Factory* factory = isolate()->factory();
HValue* undefined = graph()->GetConstantUndefined();
« no previous file with comments | « src/code-stubs.cc ('k') | src/deoptimize-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698