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

Unified Diff: src/builtins/builtins-date.cc

Issue 2504913002: Revert of [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: Created 4 years, 1 month 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/builtins/builtins-conversion.cc ('k') | src/builtins/builtins-function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-date.cc
diff --git a/src/builtins/builtins-date.cc b/src/builtins/builtins-date.cc
index 86cee0e6b5cc395062782b07e252e7ac0263a747..949620b6b2c3b683fc478080ee8f569ccedb515e 100644
--- a/src/builtins/builtins-date.cc
+++ b/src/builtins/builtins-date.cc
@@ -908,10 +908,9 @@
}
}
-namespace {
-
-void Generate_DatePrototype_GetField(CodeStubAssembler* assembler,
- int field_index) {
+// static
+void Builtins::Generate_DatePrototype_GetField(CodeStubAssembler* assembler,
+ int field_index) {
typedef CodeStubAssembler::Label Label;
typedef compiler::Node Node;
@@ -966,132 +965,100 @@
}
}
-} // namespace
-
-// static
-void Builtins::Generate_DatePrototypeGetDate(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kDay);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetDay(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kWeekday);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetFullYear(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kYear);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetHours(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kHour);
+// static
+void Builtins::Generate_DatePrototypeGetDate(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kDay);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetDay(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kWeekday);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetFullYear(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kYear);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetHours(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kHour);
}
// static
void Builtins::Generate_DatePrototypeGetMilliseconds(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kMillisecond);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetMinutes(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kMinute);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetMonth(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kMonth);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetSeconds(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kSecond);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetTime(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kDateValue);
+ CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kMillisecond);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetMinutes(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kMinute);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetMonth(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kMonth);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetSeconds(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kSecond);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetTime(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kDateValue);
}
// static
void Builtins::Generate_DatePrototypeGetTimezoneOffset(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kTimezoneOffset);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetUTCDate(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kDayUTC);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetUTCDay(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kWeekdayUTC);
+ CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kTimezoneOffset);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetUTCDate(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kDayUTC);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetUTCDay(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kWeekdayUTC);
}
// static
void Builtins::Generate_DatePrototypeGetUTCFullYear(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kYearUTC);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetUTCHours(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kHourUTC);
+ CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kYearUTC);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetUTCHours(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kHourUTC);
}
// static
void Builtins::Generate_DatePrototypeGetUTCMilliseconds(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kMillisecondUTC);
+ CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kMillisecondUTC);
}
// static
void Builtins::Generate_DatePrototypeGetUTCMinutes(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kMinuteUTC);
-}
-
-// static
-void Builtins::Generate_DatePrototypeGetUTCMonth(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kMonthUTC);
+ CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kMinuteUTC);
+}
+
+// static
+void Builtins::Generate_DatePrototypeGetUTCMonth(CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kMonthUTC);
}
// static
void Builtins::Generate_DatePrototypeGetUTCSeconds(
- compiler::CodeAssemblerState* state) {
- CodeStubAssembler assembler(state);
- Generate_DatePrototype_GetField(&assembler, JSDate::kSecondUTC);
+ CodeStubAssembler* assembler) {
+ Generate_DatePrototype_GetField(assembler, JSDate::kSecondUTC);
}
} // namespace internal
« no previous file with comments | « src/builtins/builtins-conversion.cc ('k') | src/builtins/builtins-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698