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

Unified Diff: src/interpreter/interpreter.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/interpreter/interpreter.h ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 7a979a4a3e8ca87314240c87f7f93441f077ee1c..f3a6512bfbab5fc46a97556af9b9509b92982d1f 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -183,14 +183,14 @@ void Interpreter::DoStar(compiler::InterpreterAssembler* assembler) {
}
-void Interpreter::DoBinaryOp(Builtins::JavaScript binop_builtin,
+void Interpreter::DoBinaryOp(int builtin_context_index,
compiler::InterpreterAssembler* assembler) {
// TODO(rmcilroy): Call ICs which back-patch bytecode with type specialized
// operations, instead of calling builtins directly.
Node* reg_index = __ BytecodeOperandReg(0);
Node* lhs = __ LoadRegister(reg_index);
Node* rhs = __ GetAccumulator();
- Node* result = __ CallJSBuiltin(binop_builtin, lhs, rhs);
+ Node* result = __ CallJSBuiltin(builtin_context_index, lhs, rhs);
__ SetAccumulator(result);
__ Dispatch();
}
@@ -200,7 +200,7 @@ void Interpreter::DoBinaryOp(Builtins::JavaScript binop_builtin,
//
// Add register <src> to accumulator.
void Interpreter::DoAdd(compiler::InterpreterAssembler* assembler) {
- DoBinaryOp(Builtins::ADD, assembler);
+ DoBinaryOp(Context::ADD_BUILTIN_INDEX, assembler);
}
@@ -208,7 +208,7 @@ void Interpreter::DoAdd(compiler::InterpreterAssembler* assembler) {
//
// Subtract register <src> from accumulator.
void Interpreter::DoSub(compiler::InterpreterAssembler* assembler) {
- DoBinaryOp(Builtins::SUB, assembler);
+ DoBinaryOp(Context::SUB_BUILTIN_INDEX, assembler);
}
@@ -216,7 +216,7 @@ void Interpreter::DoSub(compiler::InterpreterAssembler* assembler) {
//
// Multiply accumulator by register <src>.
void Interpreter::DoMul(compiler::InterpreterAssembler* assembler) {
- DoBinaryOp(Builtins::MUL, assembler);
+ DoBinaryOp(Context::MUL_BUILTIN_INDEX, assembler);
}
@@ -224,7 +224,7 @@ void Interpreter::DoMul(compiler::InterpreterAssembler* assembler) {
//
// Divide register <src> by accumulator.
void Interpreter::DoDiv(compiler::InterpreterAssembler* assembler) {
- DoBinaryOp(Builtins::DIV, assembler);
+ DoBinaryOp(Context::DIV_BUILTIN_INDEX, assembler);
}
@@ -232,7 +232,7 @@ void Interpreter::DoDiv(compiler::InterpreterAssembler* assembler) {
//
// Modulo register <src> by accumulator.
void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) {
- DoBinaryOp(Builtins::MOD, assembler);
+ DoBinaryOp(Context::MOD_BUILTIN_INDEX, assembler);
}
« no previous file with comments | « src/interpreter/interpreter.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698