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

Unified Diff: src/runtime/runtime-object.cc

Issue 2144643004: [builtins] Turn StoreIC_Miss and StoreIC_Slow builtins to TurboFan code stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/runtime/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index 88c3490f87153dd83ba709251fc08f9a87543b1c..0c0c8a0e9ab548a99cf5b88b66623f9af591e336 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -348,10 +348,15 @@ RUNTIME_FUNCTION(Runtime_GetProperty) {
Runtime::GetObjectProperty(isolate, object, key));
}
-namespace {
+RUNTIME_FUNCTION(Runtime_GetGlobal) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(3, args.length());
+ CONVERT_SMI_ARG_CHECKED(slot, 0);
+ CONVERT_ARG_HANDLE_CHECKED(TypeFeedbackVector, vector, 1);
+ CONVERT_SMI_ARG_CHECKED(typeof_mode_value, 2);
+ TypeofMode typeof_mode = static_cast<TypeofMode>(typeof_mode_value);
+ bool should_throw_reference_error = typeof_mode == NOT_INSIDE_TYPEOF;
-Object* GetGlobal(Isolate* isolate, int slot, Handle<TypeFeedbackVector> vector,
- bool should_throw_reference_error) {
FeedbackVectorSlot vector_slot = vector->ToSlot(slot);
DCHECK_EQ(FeedbackVectorSlotKind::LOAD_GLOBAL_IC,
vector->GetKind(vector_slot));
@@ -384,24 +389,6 @@ Object* GetGlobal(Isolate* isolate, int slot, Handle<TypeFeedbackVector> vector,
return *result;
}
-} // namespace
-
-RUNTIME_FUNCTION(Runtime_GetGlobalInsideTypeof) {
- HandleScope scope(isolate);
- DCHECK_EQ(2, args.length());
- CONVERT_SMI_ARG_CHECKED(slot, 0);
- CONVERT_ARG_HANDLE_CHECKED(TypeFeedbackVector, vector, 1);
- return GetGlobal(isolate, slot, vector, false);
-}
-
-RUNTIME_FUNCTION(Runtime_GetGlobalNotInsideTypeof) {
- HandleScope scope(isolate);
- DCHECK_EQ(2, args.length());
- CONVERT_SMI_ARG_CHECKED(slot, 0);
- CONVERT_ARG_HANDLE_CHECKED(TypeFeedbackVector, vector, 1);
- return GetGlobal(isolate, slot, vector, true);
-}
-
// KeyedGetProperty is called from KeyedLoadIC::GenerateGeneric.
RUNTIME_FUNCTION(Runtime_KeyedGetProperty) {
HandleScope scope(isolate);
@@ -414,7 +401,6 @@ RUNTIME_FUNCTION(Runtime_KeyedGetProperty) {
isolate, KeyedGetObjectProperty(isolate, receiver_obj, key_obj));
}
-
RUNTIME_FUNCTION(Runtime_AddNamedProperty) {
HandleScope scope(isolate);
DCHECK_EQ(4, args.length());
@@ -493,8 +479,7 @@ RUNTIME_FUNCTION(Runtime_SetProperty) {
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1);
CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
- CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode_arg, 3);
- LanguageMode language_mode = language_mode_arg;
+ CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 3);
RETURN_RESULT_OR_FAILURE(
isolate,
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698