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

Unified Diff: src/builtins/builtins.cc

Issue 2752143004: [refactor] Separate generated builtins and C++ builtins into separate files (Closed)
Patch Set: tentative gcmole fix Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins-arguments.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins.cc
diff --git a/src/builtins/builtins.cc b/src/builtins/builtins.cc
index c7021029ec5a30a28d04bea03f5baec457a7773a..d642f20882d577e176118cafd1705ba0c71bb20e 100644
--- a/src/builtins/builtins.cc
+++ b/src/builtins/builtins.cc
@@ -203,6 +203,77 @@ const char* Builtins::Lookup(byte* pc) {
return NULL;
}
+Handle<Code> Builtins::NewFunctionContext(ScopeType scope_type) {
+ switch (scope_type) {
+ case ScopeType::EVAL_SCOPE:
+ return FastNewFunctionContextEval();
+ case ScopeType::FUNCTION_SCOPE:
+ return FastNewFunctionContextFunction();
+ default:
+ UNREACHABLE();
+ }
+ return Handle<Code>::null();
+}
+
+Handle<Code> Builtins::NewCloneShallowArray(
+ AllocationSiteMode allocation_mode) {
+ switch (allocation_mode) {
+ case TRACK_ALLOCATION_SITE:
+ return FastCloneShallowArrayTrack();
+ case DONT_TRACK_ALLOCATION_SITE:
+ return FastCloneShallowArrayDontTrack();
+ default:
+ UNREACHABLE();
+ }
+ return Handle<Code>::null();
+}
+
+Handle<Code> Builtins::NewCloneShallowObject(int length) {
+ switch (length) {
+ case 0:
+ return FastCloneShallowObject0();
+ case 1:
+ return FastCloneShallowObject1();
+ case 2:
+ return FastCloneShallowObject2();
+ case 3:
+ return FastCloneShallowObject3();
+ case 4:
+ return FastCloneShallowObject4();
+ case 5:
+ return FastCloneShallowObject5();
+ case 6:
+ return FastCloneShallowObject6();
+ default:
+ UNREACHABLE();
+ }
+ return Handle<Code>::null();
+}
+
+Handle<Code> Builtins::NonPrimitiveToPrimitive(ToPrimitiveHint hint) {
+ switch (hint) {
+ case ToPrimitiveHint::kDefault:
+ return NonPrimitiveToPrimitive_Default();
+ case ToPrimitiveHint::kNumber:
+ return NonPrimitiveToPrimitive_Number();
+ case ToPrimitiveHint::kString:
+ return NonPrimitiveToPrimitive_String();
+ }
+ UNREACHABLE();
+ return Handle<Code>::null();
+}
+
+Handle<Code> Builtins::OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint) {
+ switch (hint) {
+ case OrdinaryToPrimitiveHint::kNumber:
+ return OrdinaryToPrimitive_Number();
+ case OrdinaryToPrimitiveHint::kString:
+ return OrdinaryToPrimitive_String();
+ }
+ UNREACHABLE();
+ return Handle<Code>::null();
+}
+
// static
const char* Builtins::name(int index) {
switch (index) {
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins-arguments.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698