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

Unified Diff: src/interpreter/interpreter-assembler.cc

Issue 2541843006: [stubs] Add LoadFixedArrayElements with int index (Closed)
Patch Set: Address comments 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/ic/accessor-assembler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter-assembler.cc
diff --git a/src/interpreter/interpreter-assembler.cc b/src/interpreter/interpreter-assembler.cc
index 34b40ec4f0115038d28af5451f5fa97826404e7d..5b32d2fb338c913138f57f2b6cc169ee5decdca2 100644
--- a/src/interpreter/interpreter-assembler.cc
+++ b/src/interpreter/interpreter-assembler.cc
@@ -591,9 +591,8 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
GotoUnless(is_allocation_site, &check_initialized);
// If it is not the Array() function, mark megamorphic.
- Node* context_slot =
- LoadFixedArrayElement(LoadNativeContext(context),
- Int32Constant(Context::ARRAY_FUNCTION_INDEX));
+ Node* context_slot = LoadContextElement(LoadNativeContext(context),
+ Context::ARRAY_FUNCTION_INDEX);
Node* is_array_function = WordEqual(context_slot, function);
GotoUnless(is_array_function, &mark_megamorphic);
@@ -631,9 +630,8 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
GotoUnless(is_js_function, &mark_megamorphic);
// Check if it is the Array() function.
- Node* context_slot =
- LoadFixedArrayElement(LoadNativeContext(context),
- Int32Constant(Context::ARRAY_FUNCTION_INDEX));
+ Node* context_slot = LoadContextElement(LoadNativeContext(context),
+ Context::ARRAY_FUNCTION_INDEX);
Node* is_array_function = WordEqual(context_slot, function);
GotoIf(is_array_function, &create_allocation_site);
@@ -782,9 +780,8 @@ Node* InterpreterAssembler::CallConstruct(Node* constructor, Node* context,
GotoUnless(is_allocation_site, &check_initialized);
// Make sure the function is the Array() function.
- Node* context_slot =
- LoadFixedArrayElement(LoadNativeContext(context),
- Int32Constant(Context::ARRAY_FUNCTION_INDEX));
+ Node* context_slot = LoadContextElement(LoadNativeContext(context),
+ Context::ARRAY_FUNCTION_INDEX);
Node* is_array_function = WordEqual(context_slot, constructor);
GotoUnless(is_array_function, &mark_megamorphic);
@@ -807,9 +804,8 @@ Node* InterpreterAssembler::CallConstruct(Node* constructor, Node* context,
Comment("initialize the feedback element");
// Create an allocation site if the function is an array function,
// otherwise create a weak cell.
- Node* context_slot =
- LoadFixedArrayElement(LoadNativeContext(context),
- Int32Constant(Context::ARRAY_FUNCTION_INDEX));
+ Node* context_slot = LoadContextElement(LoadNativeContext(context),
+ Context::ARRAY_FUNCTION_INDEX);
Node* is_array_function = WordEqual(context_slot, constructor);
Branch(is_array_function, &create_allocation_site, &create_weak_cell);
« no previous file with comments | « src/ic/accessor-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698