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

Unified Diff: src/factory.cc

Issue 2581683003: Introduce {ConstantElementsPair} struct for type safety. (Closed)
Patch Set: Rebased. Created 4 years 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/factory.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index c1266c2effd2dd22879c7ea2033a48e205e3a718..db83d06de35a534e6d5e855cb5687ea3040da4c5 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -129,6 +129,15 @@ Handle<ContextExtension> Factory::NewContextExtension(
return result;
}
+Handle<ConstantElementsPair> Factory::NewConstantElementsPair(
+ ElementsKind elements_kind, Handle<FixedArrayBase> constant_values) {
+ Handle<ConstantElementsPair> result = Handle<ConstantElementsPair>::cast(
+ NewStruct(CONSTANT_ELEMENTS_PAIR_TYPE));
+ result->set_elements_kind(elements_kind);
+ result->set_constant_values(*constant_values);
+ return result;
+}
+
Handle<Oddball> Factory::NewOddball(Handle<Map> map, const char* to_string,
Handle<Object> to_number,
const char* type_of, byte kind) {
« no previous file with comments | « src/factory.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698