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

Unified Diff: src/hydrogen.cc

Issue 1167813003: [date] Refactor the %_DateField intrinsic to be optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 5 years, 7 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/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 5916860f766ba0f2adac6145d801db1a5d0848af..f99fa35b0f0714e79dd42a02c654305ad1578d37 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -11928,6 +11928,17 @@ void HOptimizedGraphBuilder::GenerateJSValueGetValue(CallRuntime* call) {
}
+void HOptimizedGraphBuilder::GenerateThrowIfNotADate(CallRuntime* call) {
+ DCHECK_EQ(1, call->arguments()->length());
+ CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
+ HValue* obj = Pop();
+ BuildCheckHeapObject(obj);
+ HCheckInstanceType* check =
+ New<HCheckInstanceType>(obj, HCheckInstanceType::IS_JS_DATE);
+ return ast_context()->ReturnInstruction(check, call->id());
+}
+
+
void HOptimizedGraphBuilder::GenerateDateField(CallRuntime* call) {
DCHECK(call->arguments()->length() == 2);
DCHECK_NOT_NULL(call->arguments()->at(1)->AsLiteral());
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698