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

Unified Diff: src/factory.cc

Issue 2581683003: Introduce {ConstantElementsPair} struct for type safety. (Closed)
Patch Set: Re-cemment bytecode tests. 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
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 95cbc0abc7f59a34f25410c26c2f1e2ba384279e..293302faf6f84d1fba200fa661b01a0864ce9866 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') | src/objects-printer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698