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

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

Issue 2502293002: Reland of [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: fix 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 949620b6b2c3b683fc478080ee8f569ccedb515e..86cee0e6b5cc395062782b07e252e7ac0263a747 100644
--- a/src/builtins/builtins-date.cc
+++ b/src/builtins/builtins-date.cc
@@ -908,9 +908,10 @@ BUILTIN(DatePrototypeToJson) {
}
}
-// static
-void Builtins::Generate_DatePrototype_GetField(CodeStubAssembler* assembler,
- int field_index) {
+namespace {
+
+void Generate_DatePrototype_GetField(CodeStubAssembler* assembler,
+ int field_index) {
typedef CodeStubAssembler::Label Label;
typedef compiler::Node Node;
@@ -965,100 +966,132 @@ void Builtins::Generate_DatePrototype_GetField(CodeStubAssembler* assembler,
}
}
+} // namespace
+
// static
-void Builtins::Generate_DatePrototypeGetDate(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kDay);
+void Builtins::Generate_DatePrototypeGetDate(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kDay);
}
// static
-void Builtins::Generate_DatePrototypeGetDay(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kWeekday);
+void Builtins::Generate_DatePrototypeGetDay(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kWeekday);
}
// static
-void Builtins::Generate_DatePrototypeGetFullYear(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kYear);
+void Builtins::Generate_DatePrototypeGetFullYear(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kYear);
}
// static
-void Builtins::Generate_DatePrototypeGetHours(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kHour);
+void Builtins::Generate_DatePrototypeGetHours(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kHour);
}
// static
void Builtins::Generate_DatePrototypeGetMilliseconds(
- CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kMillisecond);
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kMillisecond);
}
// static
-void Builtins::Generate_DatePrototypeGetMinutes(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kMinute);
+void Builtins::Generate_DatePrototypeGetMinutes(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kMinute);
}
// static
-void Builtins::Generate_DatePrototypeGetMonth(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kMonth);
+void Builtins::Generate_DatePrototypeGetMonth(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kMonth);
}
// static
-void Builtins::Generate_DatePrototypeGetSeconds(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kSecond);
+void Builtins::Generate_DatePrototypeGetSeconds(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kSecond);
}
// static
-void Builtins::Generate_DatePrototypeGetTime(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kDateValue);
+void Builtins::Generate_DatePrototypeGetTime(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kDateValue);
}
// static
void Builtins::Generate_DatePrototypeGetTimezoneOffset(
- CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kTimezoneOffset);
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kTimezoneOffset);
}
// static
-void Builtins::Generate_DatePrototypeGetUTCDate(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kDayUTC);
+void Builtins::Generate_DatePrototypeGetUTCDate(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kDayUTC);
}
// static
-void Builtins::Generate_DatePrototypeGetUTCDay(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kWeekdayUTC);
+void Builtins::Generate_DatePrototypeGetUTCDay(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kWeekdayUTC);
}
// static
void Builtins::Generate_DatePrototypeGetUTCFullYear(
- CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kYearUTC);
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kYearUTC);
}
// static
-void Builtins::Generate_DatePrototypeGetUTCHours(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kHourUTC);
+void Builtins::Generate_DatePrototypeGetUTCHours(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kHourUTC);
}
// static
void Builtins::Generate_DatePrototypeGetUTCMilliseconds(
- CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kMillisecondUTC);
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kMillisecondUTC);
}
// static
void Builtins::Generate_DatePrototypeGetUTCMinutes(
- CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kMinuteUTC);
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kMinuteUTC);
}
// static
-void Builtins::Generate_DatePrototypeGetUTCMonth(CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kMonthUTC);
+void Builtins::Generate_DatePrototypeGetUTCMonth(
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ Generate_DatePrototype_GetField(&assembler, JSDate::kMonthUTC);
}
// static
void Builtins::Generate_DatePrototypeGetUTCSeconds(
- CodeStubAssembler* assembler) {
- Generate_DatePrototype_GetField(assembler, JSDate::kSecondUTC);
+ compiler::CodeAssemblerState* state) {
+ CodeStubAssembler assembler(state);
+ 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