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

Unified Diff: src/objects.cc

Issue 1416493007: [turbofan] Implement the implicit ToObject for property access. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 40e06c24ce43d5bffff4aa56429cdd5fc5e95ce6..40651f373432508f539f095cd6d7d8897b24cb83 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1679,6 +1679,20 @@ void JSObject::PrintElementsTransition(
}
+// static
+MaybeHandle<JSFunction> Map::GetConstructorFunction(
+ Handle<Map> map, Handle<Context> native_context) {
+ if (map->IsPrimitiveMap()) {
+ int const constructor_function_index = map->GetConstructorFunctionIndex();
+ if (constructor_function_index != kNoConstructorFunctionIndex) {
+ return handle(
+ JSFunction::cast(native_context->get(constructor_function_index)));
+ }
+ }
+ return MaybeHandle<JSFunction>();
+}
+
+
void Map::PrintReconfiguration(FILE* file, int modify_index, PropertyKind kind,
PropertyAttributes attributes) {
OFStream os(file);
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698