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

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

Issue 1316943002: Move (uppercase) JS builtins from js builtins object to native context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove Isolate::js_builtins_object Created 5 years, 4 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/compiler/interpreter-assembler.h ('k') | src/compiler/js-generic-lowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/interpreter-assembler.cc
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc
index 3ee982cce74fb3e9bf70a3327d4cbc8bc1ada48e..d6ca45fc54f5a0e9cc7538fdc6644c9da9308fc1 100644
--- a/src/compiler/interpreter-assembler.cc
+++ b/src/compiler/interpreter-assembler.cc
@@ -195,20 +195,23 @@ Node* InterpreterAssembler::LoadObjectField(Node* object, int offset) {
}
-Node* InterpreterAssembler::LoadContextSlot(int slot_index) {
- return raw_assembler_->Load(kMachAnyTagged, ContextTaggedPointer(),
+Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) {
+ return raw_assembler_->Load(kMachAnyTagged, context,
IntPtrConstant(Context::SlotOffset(slot_index)));
}
-Node* InterpreterAssembler::CallJSBuiltin(Builtins::JavaScript builtin,
- Node* receiver, Node** js_args,
- int js_arg_count) {
+Node* InterpreterAssembler::LoadContextSlot(int slot_index) {
+ return LoadContextSlot(ContextTaggedPointer(), slot_index);
+}
+
+
+Node* InterpreterAssembler::CallJSBuiltin(int context_index, Node* receiver,
+ Node** js_args, int js_arg_count) {
Node* global_object = LoadContextSlot(Context::GLOBAL_OBJECT_INDEX);
- Node* builtins_object =
- LoadObjectField(global_object, GlobalObject::kBuiltinsOffset);
- Node* function = LoadObjectField(
- builtins_object, JSBuiltinsObject::OffsetOfFunctionWithId(builtin));
+ Node* native_context =
+ LoadObjectField(global_object, GlobalObject::kNativeContextOffset);
+ Node* function = LoadContextSlot(native_context, context_index);
Node* context = LoadObjectField(function, JSFunction::kContextOffset);
int index = 0;
@@ -225,15 +228,14 @@ Node* InterpreterAssembler::CallJSBuiltin(Builtins::JavaScript builtin,
}
-Node* InterpreterAssembler::CallJSBuiltin(Builtins::JavaScript builtin,
- Node* receiver) {
- return CallJSBuiltin(builtin, receiver, nullptr, 0);
+Node* InterpreterAssembler::CallJSBuiltin(int context_index, Node* receiver) {
+ return CallJSBuiltin(context_index, receiver, nullptr, 0);
}
-Node* InterpreterAssembler::CallJSBuiltin(Builtins::JavaScript builtin,
- Node* receiver, Node* arg1) {
- return CallJSBuiltin(builtin, receiver, &arg1, 1);
+Node* InterpreterAssembler::CallJSBuiltin(int context_index, Node* receiver,
+ Node* arg1) {
+ return CallJSBuiltin(context_index, receiver, &arg1, 1);
}
« no previous file with comments | « src/compiler/interpreter-assembler.h ('k') | src/compiler/js-generic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698