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

Unified Diff: src/compiler/ast-graph-builder.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/ast-graph-builder.h ('k') | src/compiler/interpreter-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 88dc44e3427f89b3ae00d2a1b0f670ce05c4728e..12e121b5069474590509ccf22eea2773f1715fbd 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1985,10 +1985,8 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
if (subexpr->IsSpread()) {
VisitForValue(subexpr->AsSpread()->expression());
Node* iterable = environment()->Pop();
- Node* builtins = BuildLoadBuiltinsObject();
- Node* function = BuildLoadObjectField(
- builtins, JSBuiltinsObject::OffsetOfFunctionWithId(
- Builtins::CONCAT_ITERABLE_TO_ARRAY));
+ Node* function = BuildLoadNativeContextField(
+ Context::CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX);
result = NewNode(javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS,
language_mode()),
function, array, iterable);
@@ -2541,12 +2539,7 @@ void AstGraphBuilder::VisitCallJSRuntime(CallRuntime* expr) {
// The callee and the receiver both have to be pushed onto the operand stack
// before arguments are being evaluated.
CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS;
- Node* global = BuildLoadGlobalObject();
- Node* native_context =
- BuildLoadObjectField(global, GlobalObject::kNativeContextOffset);
- Node* callee_value =
- NewNode(javascript()->LoadContext(0, expr->context_index(), true),
- native_context);
+ Node* callee_value = BuildLoadNativeContextField(expr->context_index());
Node* receiver_value = jsgraph()->UndefinedConstant();
environment()->Push(callee_value);
@@ -3759,6 +3752,14 @@ Node* AstGraphBuilder::BuildLoadGlobalObject() {
}
+Node* AstGraphBuilder::BuildLoadNativeContextField(int index) {
+ Node* global = BuildLoadGlobalObject();
+ Node* native_context =
+ BuildLoadObjectField(global, GlobalObject::kNativeContextOffset);
+ return NewNode(javascript()->LoadContext(0, index, true), native_context);
+}
+
+
Node* AstGraphBuilder::BuildLoadGlobalProxy() {
Node* global = BuildLoadGlobalObject();
Node* proxy =
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/interpreter-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698